Skip to content

Commit

Permalink
1. DECOMP_SCHEME = 2. Updated so it follows the CENTURY implementatio…
Browse files Browse the repository at this point in the history
…n by Bolker et al.

    (1998) more closely.  With this option the code enables 5 time-related pools
    (metabolic litter aka fast, structural, microbial, humified aka slow, and passive).
2.  For all DECOMP_SCHEME cases, now both the "fast" and "structural pools are split into
    above- and below-ground.  This is not because they have different typical decay rates,
    but because we need the above-ground fraction for the fire model both to account for
    fuels and to burn them.
3.  Minor bug fix to H2O_PLANT_LIM = 3.  When leaf is not resolved, stomatal conductance
    must be set to a non-zero value, to avoid singularities when the plant becomes active
    again.
4.  Updates to R scripts and Template directory, so the Template ED2IN no longer has
    paths that are specific to odyssey.
  • Loading branch information
mpaiao committed Aug 9, 2018
1 parent 73d08c7 commit 21344b5
Show file tree
Hide file tree
Showing 44 changed files with 1,752 additions and 590 deletions.
30 changes: 17 additions & 13 deletions BRAMS/Template/RAMSIN
Original file line number Diff line number Diff line change
Expand Up @@ -2425,20 +2425,18 @@ $ED2_INFO


!---------------------------------------------------------------------------------------!
! DECOMP_SCHEME -- This specifies the dependence of soil decomposition on temperature. !
! 0. ED-2.1 default, the original exponential (low temperature !
! limitation only). !
! 1. Lloyd and Taylor (1994) model !
! DECOMP_SCHEME -- This specifies the soil Carbon (decomposition) model. !
! 0. ED-2.1 default, with three soil carbon pools. Temperature the !
! original exponential (low temperature limitation only). !
! 1. Similar to option 0, except that temperature is solved using !
! the Lloyd and Taylor (1994) model. !
! [[option 1 requires parameters to be set in xml]] !
! 2. RothC model, which contains one extra pools (microbial SOM), !
! based on Sierra et al. (2012, GMD). The inertial/passive pool !
! was not included because RothC assumes it to be completely !
! detached from the other ground/soil carbon pools. Thee temper- !
! ature and moisture dependencies are similar to ED-1.0 and the !
! CENTURY models, although the functional forms were rewritten so !
! the functions were continuous AND differentiable (moisture) and !
! without the risk of FPE due to the square root of negative !
! numbers (temperature). !
! 2. Based on Bolker et al. (1998) CENTURY model. Five necromass !
! pools (litter aka fast, structural, microbial, !
! humified aka slow, and passive). Temperature and moisture !
! functions are similar to Bolker et al. (1998) and ED-1.0, except !
! that the curves were refitted to make them continuous and !
! differentiable. !
!---------------------------------------------------------------------------------------!
DECOMP_SCHEME = 2,
!---------------------------------------------------------------------------------------!
Expand All @@ -2461,6 +2459,12 @@ $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. 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, as means to avoid double counting the effect of VPD on !
! stomatal conductance. Note that this still uses Kw but Kw must !
! be significantly lower, at least for tropical trees (1/15 - 1/10 !
! of the original). !
!---------------------------------------------------------------------------------------!
H2O_PLANT_LIM = 2,
!---------------------------------------------------------------------------------------!
Expand Down
30 changes: 17 additions & 13 deletions BRAMS/run/RAMSIN
Original file line number Diff line number Diff line change
Expand Up @@ -2463,20 +2463,18 @@ $ED2_INFO


!---------------------------------------------------------------------------------------!
! DECOMP_SCHEME -- This specifies the dependence of soil decomposition on temperature. !
! 0. ED-2.1 default, the original exponential (low temperature !
! limitation only). !
! 1. Lloyd and Taylor (1994) model !
! DECOMP_SCHEME -- This specifies the soil Carbon (decomposition) model. !
! 0. ED-2.1 default, with three soil carbon pools. Temperature the !
! original exponential (low temperature limitation only). !
! 1. Similar to option 0, except that temperature is solved using !
! the Lloyd and Taylor (1994) model. !
! [[option 1 requires parameters to be set in xml]] !
! 2. RothC model, which contains one extra pools (microbial SOM), !
! based on Sierra et al. (2012, GMD). The inertial/passive pool !
! was not included because RothC assumes it to be completely !
! detached from the other ground/soil carbon pools. Thee temper- !
! ature and moisture dependencies are similar to ED-1.0 and the !
! CENTURY models, although the functional forms were rewritten so !
! the functions were continuous AND differentiable (moisture) and !
! without the risk of FPE due to the square root of negative !
! numbers (temperature). !
! 2. Based on Bolker et al. (1998) CENTURY model. Five necromass !
! pools (litter aka fast, structural, microbial, !
! humified aka slow, and passive). Temperature and moisture !
! functions are similar to Bolker et al. (1998) and ED-1.0, except !
! that the curves were refitted to make them continuous and !
! differentiable. !
!---------------------------------------------------------------------------------------!
DECOMP_SCHEME = 2,
!---------------------------------------------------------------------------------------!
Expand All @@ -2499,6 +2497,12 @@ $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. 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, as means to avoid double counting the effect of VPD on !
! stomatal conductance. Note that this still uses Kw but Kw must !
! be significantly lower, at least for tropical trees (1/15 - 1/10 !
! of the original). !
!---------------------------------------------------------------------------------------!
H2O_PLANT_LIM = 2,
!---------------------------------------------------------------------------------------!
Expand Down
42 changes: 23 additions & 19 deletions ED/Template/Template/ED2IN
Original file line number Diff line number Diff line change
Expand Up @@ -562,14 +562,14 @@ $ED_NL
! soil temperature and moisture. !
! SOILDEPTH_DB -- Dataset in case you want to read in soil depth information. !
!---------------------------------------------------------------------------------------!
NL%VEG_DATABASE = '/n/gstore/Labs/moorcroft_lab_protected/data/ed2_data/oge2OLD/OGE2_'
NL%SOIL_DATABASE = '/n/gstore/Labs/moorcroft_lab_protected/data/ed2_data/soil_ed22/Quesada+RADAM+IGBP/Quesada+RADAM+IGBP_'
NL%VEG_DATABASE = 'myinpmain/veget_data/OGE2/OGE2_'
NL%SOIL_DATABASE = 'myinpmain/soil_data/texture/Quesada+RADAM+IGBP/Quesada+RADAM+IGBP_'
NL%LU_DATABASE = 'myludatabase'
NL%PLANTATION_FILE = ''
NL%THSUMS_DATABASE = '/n/gstore/Labs/moorcroft_lab_protected/data/ed2_data/ed_inputs/'
NL%THSUMS_DATABASE = 'myinpmain/thermal_sums/'
NL%ED_MET_DRIVER_DB = 'mymetdriverdb'
NL%SOILSTATE_DB = '/n/gstore/Labs/moorcroft_lab_protected/data/ed2_data/ed_inputs/STW1996OCT.dat'
NL%SOILDEPTH_DB = '/n/gstore/Labs/moorcroft_lab_protected/data/ed2_data/ed_inputs/soil_depths.dat'
NL%SOILSTATE_DB = 'myinpmain/soil_data/temp+moist/STW1996OCT.dat'
NL%SOILDEPTH_DB = 'myinpmain/soil_data/depth/soil_depths.dat'
!---------------------------------------------------------------------------------------!


Expand Down Expand Up @@ -949,20 +949,18 @@ $ED_NL


!---------------------------------------------------------------------------------------!
! DECOMP_SCHEME -- This specifies the dependence of soil decomposition on temperature. !
! 0. ED-2.1 default, the original exponential (low temperature !
! limitation only). !
! 1. Lloyd and Taylor (1994) model !
! DECOMP_SCHEME -- This specifies the soil Carbon (decomposition) model. !
! 0. ED-2.1 default, with three soil carbon pools. Temperature the !
! original exponential (low temperature limitation only). !
! 1. Similar to option 0, except that temperature is solved using !
! the Lloyd and Taylor (1994) model. !
! [[option 1 requires parameters to be set in xml]] !
! 2. RothC model, which contains one extra pools (microbial SOM), !
! based on Sierra et al. (2012, GMD). The inertial/passive pool !
! was not included because RothC assumes it to be completely !
! detached from the other ground/soil carbon pools. Thee temper- !
! ature and moisture dependencies are similar to ED-1.0 and the !
! CENTURY models, although the functional forms were rewritten so !
! the functions were continuous AND differentiable (moisture) and !
! without the risk of FPE due to the square root of negative !
! numbers (temperature). !
! 2. Based on Bolker et al. (1998) CENTURY model. Five necromass !
! pools (litter aka fast, structural, microbial, !
! humified aka slow, and passive). Temperature and moisture !
! functions are similar to Bolker et al. (1998) and ED-1.0, except !
! that the curves were refitted to make them continuous and !
! differentiable. !
!---------------------------------------------------------------------------------------!
NL%DECOMP_SCHEME = mydecomp
!---------------------------------------------------------------------------------------!
Expand All @@ -986,6 +984,12 @@ $ED_NL
! 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. This is !
! 3. 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, as means to avoid double counting the effect of VPD on !
! stomatal conductance. Note that this still uses Kw but Kw must !
! be significantly lower, at least for tropical trees (1/15 - 1/10 !
! of the original). !
!---------------------------------------------------------------------------------------!
NL%H2O_PLANT_LIM = myh2olimit
!---------------------------------------------------------------------------------------!
Expand Down Expand Up @@ -1599,7 +1603,7 @@ $ED_NL
NL%IPHENYSF = 2003
NL%IPHENYF1 = 1992
NL%IPHENYFF = 2003
NL%PHENPATH = '/n/gstore/Labs/moorcroft_lab_protected/data/ed2_data/phenology/phenology'
NL%PHENPATH = 'myinpdata/phenology/phenology'
!---------------------------------------------------------------------------------------!


Expand Down
37 changes: 24 additions & 13 deletions ED/Template/Template/plot_yearly.r
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,9 @@ for (place in myplaces){
}#end if
#----- Check whether the user wants to have this variable plotted. ------------------#
if (plotit && length(pftuse) > 0 && any(is.finite(thisvar))){
#------ Append "all" to the PFT classes to plot. ---------------------------------#
pftplt = c(pftuse,npft+1)
#---------------------------------------------------------------------------------#

#---------------------------------------------------------------------------------#
# Check whether the time series directory exists. If not, create it. #
Expand All @@ -707,28 +710,36 @@ for (place in myplaces){
# Find the limit, make some room for the legend, and in case the field is a #
# constant, nudge the limits so the plot command will not complain. #
#---------------------------------------------------------------------------------#
xlimit = pretty.xylim(u=datum$toyear ,fracexp=0.0,is.log=FALSE)
ylimit = pretty.xylim(u=thisvar[,,pftuse],fracexp=0.0,is.log=plog)
if (plog){
xylog = "y"
ydrought = c( exp(sqrt(ylimit[1]^3/ylimit[2]))
, exp(sqrt(ylimit[2]^3/ylimit[1]))
)#end c
}else{
xylog = ""
ydrought = c( ylimit[1] - 0.5 * diff(ylimit),ylimit[2] + 0.5 * diff(ylimit) )
}#end if
xlimit = pretty.xylim(u=datum$toyear ,fracexp=0.0,is.log=FALSE)
ylimit.pft = pretty.xylim(u=thisvar[,,pftuse],fracexp=0.0,is.log=plog)
ylimit.all = pretty.xylim(u=thisvar[,,npft+1],fracexp=0.0,is.log=plog)
#---------------------------------------------------------------------------------#



#---------------------------------------------------------------------------------#
# Loop over plant functional types. #
#---------------------------------------------------------------------------------#
for (p in pftuse){
pftlab = paste0("pft-",sprintf("%2.2i",p))
for (p in pftplt){
if (p == (npft + 1)){
pftlab = "pft-00"
ylimit = ylimit.all
}else{
pftlab = paste0("pft-",sprintf("%2.2i",p))
ylimit = ylimit.pft
}#end if
cat0(" - ",pft$name[p],".")

if (plog){
xylog = "y"
ydrought = c( exp(sqrt(ylimit[1]^3/ylimit[2]))
, exp(sqrt(ylimit[2]^3/ylimit[1]))
)#end c
}else{
xylog = ""
ydrought = c( ylimit[1] - 0.5 * diff(ylimit)
, ylimit[2] + 0.5 * diff(ylimit) )
}#end if

#----- Loop over output formats. ----------------------------------------------#
for (o in sequence(nout)){
Expand Down
13 changes: 8 additions & 5 deletions ED/Template/scripts/odyssey/spawn_poly.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ moi=$(whoami)
#----- Description of this simulation, used to create unique job names. -------------------#
desc=$(basename ${here})
#----- Original and scratch main data paths. ----------------------------------------------#
#d_path="/n/home00/mlongo/data"
d_path="/n/moorcroftfs5/mlongo/data"
d_path="/n/home00/mlongo/data"
#d_path="/n/moorcroftfs5/mlongo/data"
#----- Path where biomass initialisation files are: ---------------------------------------#
bioinit="${d_path}/ed2_data/site_bio_data"
alsinit="${d_path}/ed2_data/lidar_spline_bio_data"
Expand All @@ -35,6 +35,8 @@ metmaindef="${d_path}/ed2_data"
packdatasrc="${d_path}/to_scratch"
#----- Path with land use scenarios. ------------------------------------------------------#
lumain="${d_path}/ed2_data/land_use"
#----- Path with other input data bases (soil texture, DGD, land mask, etc). --------------#
inpmain="${d_path}/ed2_data"
#----- Should the met driver be copied to local scratch disks? ----------------------------#
copy2scratch=false
#------------------------------------------------------------------------------------------#
Expand Down Expand Up @@ -63,10 +65,10 @@ optsrc="-n" # Option for .bashrc (for special submission setti
#----- Submit job automatically? (It may become false if something prevents submission). --#
submit=false
#----- Settings for this group of polygons. -----------------------------------------------#
global_queue="moorcroft_amd" # Queue
global_queue="huce_intel" # Queue
sim_memory=0 # Memory per simulation. Zero uses queue's default
n_cpt=8 # Number of cpus per task (it will be limited by maximum)
partial=true # Partial submission (false will ignore polya and npartial
n_cpt=12 # Number of cpus per task (it will be limited by maximum)
partial=false # Partial submission (false will ignore polya and npartial
# and send all polygons.
polya=21 # First polygon to submit
npartial=300 # Maximum number of polygons to include in this bundle
Expand Down Expand Up @@ -1836,6 +1838,7 @@ do
#---------------------------------------------------------------------------------------#
ED2IN="${here}/${polyname}/ED2IN"
sed -i~ s@paththere@${here}@g ${ED2IN}
sed -i~ s@myinpmain@${inpmain}@g ${ED2IN}
sed -i~ s@myyeara@${thisyeara}@g ${ED2IN}
sed -i~ s@mymontha@${montha}@g ${ED2IN}
sed -i~ s@mydatea@${datea}@g ${ED2IN}
Expand Down
3 changes: 3 additions & 0 deletions ED/Template/scripts/sdumont/spawn_poly.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ shefhead='SHEF_NCEP_DRIVER_DS314'
metmain="${d_scratch}/ed2_data"
#----- Path with land use scenarios. ------------------------------------------------------#
lumain="${d_scratch}/lu_scenarios"
#----- Path with other input data bases (soil texture, DGD, land mask, etc). --------------#
inpmain="${d_scratch}/ed2_data"
#----- Memory per simulation. -------------------------------------------------------------#
sim_memory=8000
#------------------------------------------------------------------------------------------#
Expand Down Expand Up @@ -1701,6 +1703,7 @@ do
#---------------------------------------------------------------------------------------#
ED2IN="${here}/${polyname}/ED2IN"
sed -i~ s@paththere@${here}@g ${ED2IN}
sed -i~ s@myinpmain@${inpmain}@g ${ED2IN}
sed -i~ s@myyeara@${thisyeara}@g ${ED2IN}
sed -i~ s@mymontha@${montha}@g ${ED2IN}
sed -i~ s@mydatea@${datea}@g ${ED2IN}
Expand Down
Loading

0 comments on commit 21344b5

Please sign in to comment.