FATES-sp simulations at NEON sites#
Create and run a case called BONA.FATESsp using the:
compset
I1PtClm60FatesRsGs, theresolution
CLM_USRDAT, and thatapplies
USERMODSto set up a NEON site.
The run_tower script we’ve been using is very useful, but it simplifies a number of steps that users may want to take control of in their workflow. We’ll introduce how you can control aspects of your case setup and configuration here. For example, you can use the CTSM workflow to configure your case to run a FATES case at a supported tower site. We’ll use material from the basic tutorial and customizing your case for this example
Background#
For an SP case, we want to run NEON sites for a bit to let soil water and temperatures equilibrate before comparing to observations. Luckily, this only takes a few years (in most cases).
Usermods#
A usermod directory (“user modifications” directory) is a bundle of case-specific settings that CLM/CIME can apply when you create or clone a case. It’s a convenient way to start from a known configuration rather than manually setting every option afterward. The usermods may include files such as CLM namelist settings (user_nl_clm), settings for other model components, and XML configuration changes.
You pass the bundle to CIME when creating a case. For example:
./create_newcase ... --user-mods-dir clm/NEON/FATES/BONA
Have a look at the standard usermods we provide in CLM6 in the cime_config directory of your CTSM checkout:
ls /glade/u/home/$USER/code/my_clm_code/cime_config/usermods_dirs/clm
Move into the NEON usermods directory:
cd /glade/u/home/$USER/code/my_clm_code/cime_config/usermods_dirs/clm/NEON
List its contents:
ls -1
You should see several directories, including:
ABBY
BARR
BART
BLAN
BONA
CLBJ
CPER
DCFS
defaults
DEJU
DELA
DSNY
FATES
GRSM
...
You’ll notice that FATES has its own directory. Have a look inside.
ls FATES
The
defaultdirectory in NEON/FATES contains shell commands and user_nl_* settings that are shared across all sites. Look and see.
ls -1 FATES/defaults
expected output includes:
shell_commands
user_nl_clm
user_nl_cpl
user_nl_datm
user_nl_datm_streams
You can look to see what default settings your NEON cases will inherit.
Each NEON site also includes custom XML changes. Look and see:
ls -1 FATES/BONA
expected output includes:
include_user_mods
shell_commands
Check Your Understanding
How are NEON site-level details passed to CLM?
Hint: look at the shell_commands in the CLM usermods_dirs for NEON
Get Started#
Let’s create a FATES sp case at a NEON site.
Click here for hints
Is my workspace set up?
Did you already create a cases directory where you will put all new cases
cd /glade/u/home/$USER
mkdir cases
Did you create a new case?
You can create a new case with the command:
./create_newcase --case /glade/u/home/$USER/cases/CASE --res RES --compset COMPSET --user-mods-dir USERMODS --run-unsupported
Make sure you use the correct information for the CASE, RES, COMPSET, and USERMODS inputs.
How do you customize your case to run a FATES SP experiment?
Specifically you’ll want to make namelist changes that:
set up a FATES-SP case.
modify history file output for an SP case. NOTE These should be done with a compset in CLM6, but we don’t have a single point FATESsp compset at this time.
And XML changes to run:
From a ‘cold start’ (as we don’t have initial conditions);
A quick spinup to initialize the soil moisture state (~4 years should be enough?);
For the full observational record.
Did you set up the case?
You can invoke case set up as follows:
./case.setup
How do I check my case
You can check your CaseDocs (especially lnd_in) after you run:
./preview_namelists
How do I compile?
You can compile with the command:
qcmd -- ./case.build
How do I check my job status?
You can check job status using the command:
qstat -u $USER
Click here for the solution
Create a new case BONA.FATESsp :#
cd /glade/u/home/$USER/code/my_clm_code/cime/scripts
Change the 4-character NEON site below.
export neon_site="BONA"
Then create a new case.
./create_newcase --case /glade/u/home/$USER/cases/${neon_site}.FATESsp \
--res CLM_USRDAT \
--compset I1PtClm60FatesRsGs \
--run-unsupported \
--user-mods-dir clm/NEON/FATES/${neon_site} \
--handle-preexisting-dirs r
Case setup:#
cd /glade/u/home/$USER/cases/BONA.FATESsp
./case.setup
Case customization:#
user_nl_clm changes. We currently don’t have a FATES sp compset in CLM. We’re working on it, but in the meantime you can request this by adding the following into user_nl_clm.
echo "use_fates_sp = .true." >> user_nl_clm
echo "hist_fincl2 = 'FCEV','FCTR','FGEV','FIRA','FSA','FSH','FATES_GPP','FATES_GPP_PF','H2OSOI','SNOW_DEPTH','TBOT','TSOI'" >> user_nl_clm
XML changes First look and see what default settings are for:
Running from a cold start (without initial conditions)
What years of DATM data do we have?
How long are we running the case?
./xmlquery CLM_FORCE_COLDSTART
./xmlquery DATM_YR_START DATM_YR_ALIGN DATM_YR_END
./xmlquery STOP_OPTION STOP_N
Expected results are:
CLM_FORCE_COLDSTART: off
DATM_YR_START: 2018
DATM_YR_ALIGN: 2018
DATM_YR_END: 2021
STOP_OPTION: ndays
STOP_N: 5
For most NEON sites we have at least 4 complete years of data to work with (2018-2021). Now we’ll change this to:
Force a cold start
Cycle over the full 4 years of DATM data available two times
Start the simulation in 2014, then we’ll have 4 years of spinup and 4 years to compare with the observed data.
./xmlchange CLM_FORCE_COLDSTART=on
./xmlchange STOP_OPTION=nyears
./xmlchange STOP_N=8
./xmlchange RUN_STARTDATE=2014-01-01
Case build:#
qcmd -- ./case.build
Preview namelist:#
./preview_namelists
Check that your lnd_in file looks OK, e.g.:
use_fates_sp = .true.,
fsurdat = 16pfts,
finidat = ‘ ‘
etc…
cat CaseDocs/lnd_in | head -50
Case submit:#
./case.submit
Check the status:
qstat -u $USER
When the run is completed, look into the archive directory for: BONA.FATESsp.
Check that your archive directory on derecho (The path will be different on other machines):
cd /glade/derecho/scratch/$USER/archive/BONA.FATESsp
ls
Test your understanding#
Did your run complete successfully?
Where is your case directory?
Where is your run directory?
What sorts of files did you get as output?
What years did you run over?