3: Modify input data

3: Modify input data#

We can modify the input to CLM by changing one of the plant functional type properties. We will then compare these results with the control experiment.

Note that you will need to change a netcdf file for this exercise. Because netcdf are in binary format you will need a type of script or interperter to read the file and write it out again. (e.g. ferret, IDL, NCL, NCO, Perl, Python, Matlab, Yorick). Below in the solution we will show how to do this using NCO.

NOTE: For any tasks other than setting up, building, submitting cases you should probably do these tasks on the Data Visualization Cluster - casper, and not on the derecho login nodes.

Exercise: Run an experimental case

Create a case called i.day5.a_pft using the compset I2000Clm50Sp at f09_g17_gl4 resolution.

Look at variable “rholvis” in the forcing file using ncview or ncdump –v rholvis. This is the visible leaf reflectance for every pft. Modify the rholvis parameter to . /glade/campaign/cesm/cesmdata/cseg/inputdata/lnd/clm2/paramdata/clm5_params.c171117.nc

Set the run length to 5 days.

Build and run the model.

Click here for the solution

Create a clone from the control experiment i.day5.a_pft :

cd /glade/u/home/$USER/code/my_cesm_code/cime/scripts
./create_clone --case ~/cases/i.day5.a_pft --clone ~/cases/i.day5.a

Modify the rholvis parameter in the physiology file:

cd /glade/derecho/scratch/$USER
cp /glade/campaign/cesm/cesmdata/cseg/inputdata/lnd/clm2/paramdata/clm5_params.c171117.nc .
chmod u+w clm5_params.c171117.nc
cp clm5_params.c171117.nc clm5_params.c171117.new.nc
ncap2 -A -v -s 'rholvis(4)=0.4' clm5_params.c171117.nc clm5_params.c171117.new.nc

Check the new rholvis parameter to be sure the modification worked:

ncdump -v rholvis clm5_params.c171117.new.nc
# and compare it to the original file
ncdiff clm5_params.c171117.nc clm5_params.c171117.new.nc ncdiff.nc
ncdump -v rholvis ncdiff.nc

Case setup:

cd ~/cases/i.day5.a_pft
./case.setup

Change the clm namelist using user_nl_clm to point at the modified file. Add the following line:

paramfile = '/glade/derecho/scratch/$USER/clm5_params.c171117.new.nc' 

Check the namelist by running:

./preview_namelists

If needed, change job queue, account number, or wallclock time. For instance:

./xmlchange JOB_QUEUE=tutorial,PROJECT=UESM0013 --force,JOB_WALLCLOCK_TIME=0:15:00

Build case:

qcmd -- ./case.build

Compare the namelists from the two experiments:

diff CaseDocs/lnd_in ../i.day5.a/CaseDocs/lnd_in

Submit case:

./case.submit

When the run is completed, look into the archive directory for: i.day5.a.

(1) Check that your archive directory on derecho (The path will be different on other machines):

cd /glade/derecho/scratch/$USER/archive/i.day5.a_pft/lnd/hist

ls 

(2) Compare to control run:

ncdiff i.day5.a_pft.clm2.XXX.nc /glade/derecho/scratch/$USER/archive/i.day5.a/lnd/hist/i.day5.a.clm2.XXX.nc i_diff.nc

ncview i_diff.nc

Test your understanding#

  • How did rholvis change (increase/decrease)? Given this, what do you expect the model response to be?

  • What changes do you see from the control case with the modified rholvis parameter?

  • … OTHERS?