Skip to content

Commit

Permalink
1. Manual merge with the mainline. In this first step, the goal was t…
Browse files Browse the repository at this point in the history
…o reconcile some of

   the parallel efforts between Xiangtao and myself, which led to some important code
   changes too.  This is not a working version, I need to run simulations first and see
   if it works before I make the official merge.
2. Main change: vegetation heat capacity.  Now that the internal water is dynamic, we
   must make sure water and energy is conserved.  The easiest way was to remove internal
   leaf and sapwood water from the bulk specific heat of plant tissues, and add them
   separately.  There are still some inconsistencies to be resolved (e.g. now all internal
   sapwood water is added to energy, whereas only the branch oven-dry biomass is accounted
   for), but this is the easiest approach to conserve water and energy.
3. To account for addition/losses of internal water due to demography (growth, mortality,
   and recruitment), I added new budget variables wbudget_wcapeffect and ebudget_wcapeffect
4. Code housekeeping: eliminated multiple code redundancies and removed obsolete
   preprocessor checks for HDF5 (which is required, so no need to check).
  • Loading branch information
mpaiao committed Sep 19, 2019
1 parent 7436fbf commit 79aa937
Show file tree
Hide file tree
Showing 93 changed files with 9,452 additions and 1,939 deletions.
78 changes: 74 additions & 4 deletions BRAMS/Template/RAMSIN
Original file line number Diff line number Diff line change
Expand Up @@ -1909,6 +1909,8 @@ $ED2_INFO
! of points for the diurnal cycle is 86400 / FRQANL !
! IYOUTPUT -- Annual output. !
! ITOUTPUT -- Instantaneous fluxes, mostly polygon-level variables, one file per year. !
! IOOUTPUT -- Observation time output. Equivalent to IFOUTPUT, except only at the !
! times specified in OBSTIME_DB. !
! ISOUTPUT -- restart file, for HISTORY runs. The time interval between files is !
! determined by FRQHIS !
!---------------------------------------------------------------------------------------!
Expand All @@ -1918,6 +1920,7 @@ $ED2_INFO
IQOUTPUT = 3,
IYOUTPUT = 0,
ITOUTPUT = 0,
IOOUTPUT = 0,
ISOUTPUT = 0,
!---------------------------------------------------------------------------------------!

Expand Down Expand Up @@ -2086,8 +2089,8 @@ $ED2_INFO
! growing-degree days, which is used to drive the cold-deciduous !
! phenology (you must always provide this, even when your PFTs are !
! not cold deciduous). !
! ED_MET_DRIVER_DB -- File containing information for meteorological driver !
! instructions (the "header" file). !
! OBSTIME_DB -- File containing times of desired IOOUTPUT !
! Reference file: /ED/run/obstime_template.time !
! SOILSTATE_DB -- If ISOILSTATEINIT=1, this variable specifies the full path of !
! the file that contains soil moisture and temperature !
! information. !
Expand All @@ -2100,6 +2103,7 @@ $ED2_INFO
PLANTATION_FILE = '',
LU_RESCALE_FILE = '/n/gstore/Labs/moorcroft_lab_protected/data/ed2_data/restarts_sci_006/rescale/SA1relative.lu.area-22km-2008.txt',
THSUMS_DATABASE = '/n/gstore/Labs/moorcroft_lab_protected/data/ed2_data/ed_inputs/',
OBSTIME_DB = '', !Reference file: /ED/run/obstime_template.time
SOILSTATE_DB = '/n/gstore/Labs/moorcroft_lab_protected/data/ed2_data/ed_inputs/STW1996OCT.dat',
SOILDEPTH_DB = '/n/gstore/Labs/moorcroft_lab_protected/data/ed2_data/ed_inputs/soil_depths.dat',
!---------------------------------------------------------------------------------------!
Expand Down Expand Up @@ -2534,16 +2538,82 @@ $ED2_INFO
! where psi is the matric potentital at layer k, z is the layer depth, H it the !
! crown height and psi_fc and psi_wp are the matric potentials at wilting point !
! and field capacity. !
! 3. (Beta) Similar to 2, but the water supply directly affects gsw, as opposed to !
! 3. (Beta) Use leaf water potential to modify fsw following Powell et al. (2017). !
! This setting requires PLANT_HYDRO_SCHEME to be non-zero. !
! 4. (Beta) Use leaf water potential to modify the optimization-based stomatal model !
! following Xu et al. (2016). This setting requires PLANT_HYDRO_SCHEME to be !
! non-zero values and set ISTOMATA_SCHEME to 1. !
! 5. (Beta) Similar to 2, but the water supply directly affects gsw, as opposed to !
! fsw. This is done by making D0 a function of soil moisture. Note that this !
! still uses Kw but Kw must be significantly lower, at least for tropical trees !
! (1/15 - 1/10 of the original). !
! (1/15 - 1/10 of the original). This works only with PLANT_HYDRO_SCHEME set to 0. !
!---------------------------------------------------------------------------------------!
H2O_PLANT_LIM = 2,
!---------------------------------------------------------------------------------------!



!---------------------------------------------------------------------------------------!
! PLANT_HYDRO_SCHEME -- Flag to set dynamic plant hydraulics. !
! 0 - (ED-2.2 default) No dynamic hydraulics (leaf and wood are always saturated). !
! 1 - (Beta) Track plant hydrodynamics using parameters from C16. !
! 2 - (ED-2.2 alternative) Track plant hydrodynamics using parameters from X16. !
! -1 - (Beta) Similar to 1 but leaf/wood heat capacity does not change. !
! -2 - (Beta) Same as 2 but leaf/wood heat capacity does not change. !
! !
! References: !
! !
! Christoffersen BO, Gloor M, Fauset S, Fyllas NM, Galbraith DR, Baker TR, Kruijt B, !
! Rowland L, Fisher RA, Binks OJ et al. 2016. Linking hydraulic traits to tropical !
! forest function in a size- structured and trait-driven model (TFS v.1-Hydro). !
! Geosci. Model Dev., 9: 4227-4255. doi:10.5194/gmd- 9-4227-2016 (C16). !
! !
! Xu X, Medvigy D, Powers JS, Becknell JM , Guan K. 2016. Diversity in plant hydraulic !
! traits explains seasonal and inter-annual variations of vegetation dynamics in !
! seasonally dry tropical forests. New Phytol., 212: 80-95. doi:10.1111/nph.14009 !
! (X16). !
!---------------------------------------------------------------------------------------!
PLANT_HYDRO_SCHEME = 0,
!---------------------------------------------------------------------------------------!



!---------------------------------------------------------------------------------------!
! ISTRUCT_GROWTH_SCHEME -- Different methods to perform structural growth. !
! 0. (ED-2.2 default) Use all bstorage allocation to growth to increase heartwood. !
! This option will be eventually deprecated, as it creates problems for drought- !
! deciduous plants and for allometric settings that properly calculate sapwood !
! (IALLOM = 3). !
! 1. (ED-2.2 alternative) Correct the fraction of storage allocated to heartwood, so !
! storage has sufficient carbon to increment all living tissues in the upcoming !
! month. This option will eventually become the default. !
!---------------------------------------------------------------------------------------!
ISTRUCT_GROWTH_SCHEME = 1,
!---------------------------------------------------------------------------------------!



!---------------------------------------------------------------------------------------!
! ISTOMATA_SCHEME -- Which stomatal conductance model to use. !
! 0. (ED-2.2 default) Leuning (L95) model. !
! 1. (Beta) Katul's optimization-based model (see X16) !
! !
! References: !
! !
! Leuning R. 1995. A critical appraisal of a combined stomatal-photosynthesis model for !
! C3 plants. Plant Cell Environ., 18: 339-355. !
! doi:10.1111/j.1365-3040.1995.tb00370.x (L95). !
! !
! Xu X, Medvigy D, Powers JS, Becknell JM , Guan K. 2016. Diversity in plant hydraulic !
! traits explains seasonal and inter-annual variations of vegetation dynamics in !
! seasonally dry tropical forests. New Phytol., 212: 80-95. doi:10.1111/nph.14009 !
! (X16). !
!---------------------------------------------------------------------------------------!
ISTOMATA_SCHEME = 0,
!---------------------------------------------------------------------------------------!



!---------------------------------------------------------------------------------------!
! TRAIT_PLASTICITY_SCHEME -- Whether/How plant traits vary with local environment. !
! !
Expand Down
5 changes: 3 additions & 2 deletions BRAMS/build/bin/objects.mk
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ OBJ_MODEL = \
ename_coms.o \
euler_driver.o \
events.o \
farq_katul.o \
farq_leuning.o \
fatal_error.o \
fire_ed10.o \
Expand All @@ -346,14 +347,14 @@ OBJ_MODEL = \
mortality.o \
multiple_scatter.o \
old_twostream_rad.o \
optimiz_coms.o \
pft_coms.o \
phenology_aux.o \
phenology_coms.o \
phenology_driv.o \
phenology_startup.o \
photosyn_driv.o \
physiology_coms.o \
pft_coms.o \
plant_hydro.o \
radiate_driver.o \
radiate_utils.o \
random_utils.o \
Expand Down
23 changes: 14 additions & 9 deletions BRAMS/build/bin/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -1549,10 +1549,10 @@ ed_read_ed10_20_history.o : $(ED_IO)/ed_read_ed10_20_history.f90
$(F90_COMMAND) $(<F:.f90=.f90)
rm -f $(<F:.f90=.f90)

ed_read_ed21_history.o : $(ED_IO)/ed_read_ed21_history.F90
cp -f $< $(<F:.F90=.F90)
$(FPP_COMMAND) $(HDF5_INCS) $(<F:.F90=.F90)
rm -f $(<F:.F90=.F90)
ed_read_ed21_history.o : $(ED_IO)/ed_read_ed21_history.f90
/bin/rm -f $(<F:.f90=.f90)
/bin/cp -f $< $(<F:.f90=.f90)
$(F90_COMMAND) $(<F:.f90=.f90)

ed_state_vars.o : $(ED_MEMORY)/ed_state_vars.F90
cp -f $< $(<F:.F90=.F90)
Expand Down Expand Up @@ -1609,6 +1609,11 @@ events.o : $(ED_DYNAMICS)/events.f90
$(F90_COMMAND) $(<F:.f90=.f90)
rm -f $(<F:.f90=.f90)

farq_katul.o : $(ED_DYNAMICS)/farq_katul.f90
/bin/rm -f $(<F:.f90=.f90)
/bin/cp -f $< $(<F:.f90=.f90)
$(F90_COMMAND) $(<F:.f90=.f90)

farq_leuning.o : $(ED_DYNAMICS)/farq_leuning.f90
cp -f $< $(<F:.f90=.f90)
$(F90_COMMAND) $(<F:.f90=.f90)
Expand Down Expand Up @@ -1744,10 +1749,10 @@ old_twostream_rad.o : $(ED_DYNAMICS)/old_twostream_rad.f90
$(F90_COMMAND) $(<F:.f90=.f90)
rm -f $(<F:.f90=.f90)

optimiz_coms.o : $(ED_MEMORY)/optimiz_coms.f90
pft_coms.o : $(ED_MEMORY)/pft_coms.f90
cp -f $< $(<F:.f90=.f90)
$(F90_COMMAND) $(<F:.f90=.f90)
rm -f $(<F:.f90=.f90)
rm -f $(<F:.f90=.f90)

phenology_aux.o : $(ED_DYNAMICS)/phenology_aux.f90
cp -f $< $(<F:.f90=.f90)
Expand Down Expand Up @@ -1779,10 +1784,10 @@ physiology_coms.o : $(ED_MEMORY)/physiology_coms.f90
$(F90_COMMAND) $(<F:.f90=.f90)
rm -f $(<F:.f90=.f90)

pft_coms.o : $(ED_MEMORY)/pft_coms.f90
cp -f $< $(<F:.f90=.f90)
plant_hydro.o : $(ED_DYNAMICS)/plant_hydro.f90
/bin/rm -f $(<F:.f90=.f90)
/bin/cp -f $< $(<F:.f90=.f90)
$(F90_COMMAND) $(<F:.f90=.f90)
rm -f $(<F:.f90=.f90)

radiate_driver.o : $(ED_DYNAMICS)/radiate_driver.f90
cp -f $< $(<F:.f90=.f90)
Expand Down
Loading

0 comments on commit 79aa937

Please sign in to comment.