In the last chapter we gave the details on how to create new files for input into
CLM. These files could be either global resolutions, regional-grids or even a single
grid point. If you want to easily have these files available for continued use in your
development you will then want to include them in the build-namelist database so
that build-namelist can easily find them for you. You can deal with them, just by
putting the settings in the user_nl_clm namelist file, or by using
CLM_USRDAT_NAME. Another way to deal with them is to enter them into
the database for build-namelist, so that build-namelist can find them for you.
This keeps one central database for all your files, rather than having multiple locations
to keep track of files. If you have a LOT of files to keep track of it also might
be easier than keeping track by hand, especially if you have to periodically update
your files. If you just have a few quick experiments to try, for a short time period
you might be best off using the other methods mentioned above.
There are two parts to adding files to the build-namelist database. The first part
is adding new resolution names which is done in the
(and in the
when adding supported single-point datasets). You can then use the new resolution
CLM_USRDAT_NAME. If you also want to be able to give the resolution into
create_newcase -- you'll need to add the grid to the
The second part is actually adding the new filenames which is done in the models/lnd/clm/bld/namelist_files/namelist_defaults_clm.xml file (models/lnd/clm/bld/namelist_files/namelist_defaults_clm_tools.xml file for CLM tools). If you aren't adding any new resolutions, and you are just changing the files for existing resolutions, you don't need to edit the namelist_definition file.
If you are running on a supported machine (such as yellowstone or hopper) the standard
input datasets will already be available and you won't have to check them out of the
subversion inputdata server. However, you also will NOT be able to add your own datafiles
to these standard inputdata directories -- because most likely you won't have permissions
to do so. In order to add files to the XML database or to use
CLM_USRDAT_NAME you need
to put data in the standard locations so that they can be found. The recommended
way to do this is to use the link_dirtree tool in the CESM scripts.
Some information on link_dirtree is available in the
CESM1.1.1 Scripts User's Guide. We also have
some examples of it's use here and in other sections of this User's Guide.
Using link_dirtree is quite simple, you give the directory where
data exists and then the directory that you want to create where datasets will point
to the original source files. In the example below we use "$HOME/inputdata", but
MYCSMDATA could be any directory you have access to where you want to
put your data.
> cd scripts # First make sure you have a inputdata location that you can write to # You only need to do this step once, so you won't need to do this in the future # (except to bring in any updated files in the original $CSMDATA location). > setenv MYCSMDATA $HOME/inputdata # Set env var for the directory for input data > ./link_dirtree $CSMDATA $MYCSMDATA
DIN_LOC_ROOT_CSMDATAto point to the location you linked to rather than the default location.
> ./xmlchange DIN_LOC_ROOT_CSMDATA=$MYCSMDATA
In order to list the files that you have created you merely need to use the UNIX command find to find the files that are NOT softlinks. So for example executing the following command:
> find $MYCSMDATA -type f -print
CLM_USRDAT_NAMEfiles that I have created.
/blhome/erik/inputdata/atm/cam/chem/trop_mozart_aero/aero/aerosoldep_monthly_1849-2006_1x1pt_US-Ha1.nc /blhome/erik/inputdata/atm/cam/chem/trop_mozart_aero/aero/aerosoldep_monthly_1849-2006_13x12pt_f19_alaskaUSA.nc /blhome/erik/inputdata/atm/cam/chem/trop_mozart_aero/aero/aerosoldep_rcp8.5_monthly_1850-2100_13x12pt_f19_alaskaUSA.nc /blhome/erik/inputdata/atm/cam/chem/trop_mozart_aero/aero/aerosoldep_rcp4.5_monthly_1850-2100_13x12pt_f19_alaskaUSA.nc /blhome/erik/inputdata/atm/datm7/domain.clm/domain.lnd.1x1pt_US-Ha1_USGS.nc /blhome/erik/inputdata/atm/datm7/domain.clm/domain.lnd.13x12pt_f19_alaskaUSA_gx1v6.nc /blhome/erik/inputdata/lnd/clm2/griddata/fracdata_13x12pt_f19_alaskaUSA_gx1v6.nc /blhome/erik/inputdata/lnd/clm2/griddata/fracdata_1x1pt_US-Ha1_USGS.nc /blhome/erik/inputdata/lnd/clm2/griddata/topodata_13x12pt_f19_alaskaUSA.nc /blhome/erik/inputdata/lnd/clm2/griddata/griddata_1x1pt_US-Ha1.nc /blhome/erik/inputdata/lnd/clm2/griddata/griddata_13x12pt_f19_alaskaUSA.nc /blhome/erik/inputdata/lnd/clm2/surfdata/surfdata_13x12pt_f19_alaskaUSA_simyr1850.nc /blhome/erik/inputdata/lnd/clm2/surfdata/surfdata_1x1pt_US-Ha1_simyr2000.nc /blhome/erik/inputdata/lnd/clm2/surfdata/surfdata.pftdyn_rcp4.5_13x12pt_f19_alaskaUSA_simyr1850-2100.nc /blhome/erik/inputdata/lnd/clm2/surfdata/surfdata_1x1pt_US-Ha1_simyr1850.nc /blhome/erik/inputdata/lnd/clm2/surfdata/surfdata_13x12pt_f19_alaskaUSA_simyr2000.nc /blhome/erik/inputdata/lnd/clm2/surfdata/surfdata.pftdyn_1x1pt_US-Ha1_simyr1849-2006.nc /blhome/erik/inputdata/lnd/clm2/surfdata/surfdata.pftdyn_13x12pt_f19_alaskaUSA_simyr1850-2100.nc /blhome/erik/inputdata/lnd/clm2/surfdata/surfdata.pftdyn_rcp8.5_13x12pt_f19_alaskaUSA_simyr1850-2100.nc /blhome/erik/inputdata/lnd/clm2/surfdata/surfdata.pftdyn_13x12pt_f19_alaskaUSA_simyr1849-2006.nc /blhome/erik/inputdata/lnd/clm2/surfdata/surfdata.pftdyn_1x1pt_US-Ha1_simyr1850-2100.nc