Modify the rain_threshold in CLM#
In the below exercise, we will change the rain threshold for stress deciduous vegetation, which includes C3 grasses. The rain threshold is the amount of rain required to initiate leaf onset. Reaching the rain threshold is one of several requirements for stress deciduous vegetation leaf onset.
If you are interested, you can find more information about the stress deciduous phenology representation in the CLM Technical Note.
The current value of rain_threshold is 20mm as specified in the code:
rain_threshold = 20._r8
Create a case called b1850_rain_threshold using the compset B1850C_LTso at resolution ne16pg3_t201.
Use --run-unsupported because the ne16pg3_t201 resolution is not supported at this stage.
Change the
rain_thresholdfrom 20 mm to 1 mm.Interpolate CAM history output to a regular 2° × 2° latitude–longitude grid.
Make a 1-month run.
Click here for hints
Tip to locate the ‘rain_threshold’ parameter
Find the subroutine containing rain_threshold. For instance, in CESMROOT, use the command:
grep -r rain_threshold *
Click here for the solution
#Create a new case b1850_rain_threshold with the command:
cd /glade/u/home/$USER/code/my_cesm_code/cime/scripts
./create_newcase --case ~/cases/b1850_rain_threshold \
--compset B1850C_LTso \
--res ne16pg3_t201 \
--run-unsupported
#Case setup:
cd ~/cases/b1850_rain_threshold
./case.setup
#Make SourceMods
Locate the file where rain_threshold is defined and copy it into
SourceMods/src.lnd:
cp /glade/u/home/$USER/code/my_cesm_code/components/clm/src/biogeochem/CNPhenologyMod.F90 SourceMods/src.clm
Edit the file SourceMods/src.clm/CNPhenologyMod.F90 and add the lines:
! specify rain threshold for leaf onset
rain_threshold = 20._r8
to
! specify rain threshold for leaf onset
rain_threshold = 1._r8
#Change the run length:
./xmlchange STOP_N=1,STOP_OPTION=nmonths
#If needed, change job queue and account number
For instance:
./xmlchange JOB_QUEUE=tutorial,PROJECT=UESM0016 --force
#Build and submit:
qcmd -- ./case.build
./case.submit