User’s Guide to version |version| of the Community Land Model (CLM)
Authors: Benjamin Andre, Erik Kluzek, William Sacks
The National Center for Atmospheric Research (NCAR) is operated by the nonprofit University Corporation for Atmospheric Research (UCAR) under the sponsorship of the National Science Foundation. Any opinions, findings, conclusions, or recommendations expressed in this publication are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.
National Center for Atmospheric Research P. O. Box 3000, Boulder, Colorado 80307-3000
The Community Land Model (release-clm5.0 in CESM2.1) is the latest in a series of global land models developed by the CESM Land Model Working Group (LMWG) and maintained at the National Center for Atmospheric Research (NCAR). This guide is intended to instruct both the novice and experienced user on running CLM. This guide pertains to the latest version CLM5.0 in CESM2.1 available for download from the public release subversion repository as a part of CESM2.1. Documentation may be different if you are using an older version, you should either use the documentation for that release version, update to the latest version, or use the documentation inside your own source tree. There is information in the ChangeLog file and in the What is new with |version| in |cesmrelease| since previous public releases? regarding the changes from previous versions of CESM.
This release of CLM5.0 in CESM2.1 includes BOTH CLM4.0 physics and CLM4.5 physics used in previous releases as well as the updated CLM5.0 physics. CLM allow you to trigger between the three physics modes. Most often when we refer to CLM4.0 we are referring to the CLM4.0 physics in CLM5.0 in CESM2.1 rather than to a specific version of CLM4.0 (where we would give the exact version). And when we refer to CLM4.5 we are referring to the CLM4.5 physics in CLM5.0 in CESM2.1 rather than to a specific version of CLM4.5. Likewise, when referring to CLM5.0 we are referring to the CLM5.0 physics in CLM5.0 in CESM2.1.
The novice user should read Chapter 1 in detail before beginning work, while the expert user should read What is new with |version| in |cesmrelease| since previous public releases? and Quickstart to using |version| chapters, and then use the more detailed chapters as reference. Before novice users go onto more technical problems covered in Chapter 2, Chapter 3, Chapter 4, or Chapter 5 they should know the material covered in Chapter 1 and be able to replicate some of the examples given there.
All users should read the How to Use This Document and Other resources to get help from sections to understand the document conventions and the various ways of getting help on using CLM5.0. Users should also read the What is scientifically validated and functional in |version| in |cesmrelease|? section to see if their planned use of the model is something that has been scientifically validated and well tested. Users that are NOT using NCAR machines or our list of well tested machines should also read the What are the UNIX utilities required to use CLM5.0? section to make sure they have all the required UNIX utilities on the system they want to do their work.
Developers that are making changes to CLM either for their own development or for development that they hope will eventually become a part of the main CLM should read the Chapter 8 chapter. We have a suite of test scripts that automatically test many different model configurations and namelist options, as well as ensuring things like restarts are bit-for-bit and the like. It’s helpful to use these scripts to ensure your changes are working correctly. As well as being a required part of the process to bring in new code developments. And it’s far easier to use the automated scripts rather than having to figure out, what to test, how to do it, and then finally do it by hand. If you are using non supported machines you may also want to use the test scripts to make sure your machine is working correctly.
1.1.2. What is New with CLM5.0¶
Previous release pages give similar list of changes for previous versions of the model.
1.1.3. Overview of User’s Guide¶
In this introduction we first give a simple guide to understand the document conventions in How to Use This Document. The next section What is new with |version| in |cesmrelease| since previous public releases? gives references to describe the differences between CLM5.0 in CESM2.1 and previous CESM releases both from a scientific as well as a software engineering point of view. For information on previous releases of CLM5.0 before CLM5.0 in CESM2.1 see the CESM1.2.2 documentation. The next section Quickstart to using |version| is for users that are already experts in using CLM and gives a quickstart guide to the bare details on how to use CLM5.0. The next What is scientifically validated and functional in |version| in |cesmrelease|? tells you about what has been extensively tested and scientifically validated (and maybe more importantly) what has NOT. What are the UNIX utilities required to use |version|? lists the UNIX utilities required to use CLM5.0 and is important if you are running on non-NCAR machines, generic local machines, or machines NOT as well tested by us at NCAR. Next we have Important Notes and Best Practices for Usage of |version| to detail some of the best practices for using CLM5.0 for science. The last introductory section is Other resources to get help from which lists different resources for getting help with CLM5.0 and CESM2.1.
Chapter 1 goes into detail on how to setup and run simulations with CLM5.0 and especially how to customize cases. Details of cesm_setup modes and build-namelist options as well as namelist options are given in this chapter.
Chapter 2 gives instructions on the CLM tools for either CLM4.5 or CLM5.0 physics for creating input datasets for use by CLM, for the expert user. There’s an overview of what each tool does, and some general notes on how to build the FORTRAN tools. Then each tool is described in detail along with different ways in which the tool might be used. A final section on how to customize datasets for observational sites for very savvy expert users is given as the last section of this chapter.
As a followup to the tools chapter, Chapter 3 tells how to add files to the XML database for build-namelist to use. This is important if you want to use the XML database to automatically select user-created input files that you have created when you setup new cases with CLM (CLM4.0, CLM4.5 and CLM5.0 physics).
In Chapter 4, again for the expert user, we give details on how to do some particularly difficult special cases. For example, we give the protocol for spinning up the CLM5.0-BGC and CLMCN models as well as CLM with dynamic vegetation active (CNDV). We give instructions to do a spinup case from a previous case with Coupler history output for atmospheric forcing. We also give instructions on running both the prognostic crop and irrigation models. Lastly we tell the user how to use the DATM model to send historical CO2 data to CLM.
Chapter 5 outlines how to do single-point or regional simulations using CLM5.0. This is useful to either compare CLM5.0 simulations with point observational stations, such as tower sites (which might include your own atmospheric forcing), or to do quick simulations with CLM for example to test a new parameterization. There are several different ways given on how to perform single-point simulations which range from simple PTS_MODE to more complex where you create all your own datasets, tying into Chapter 2 and also Chapter 3 to add the files into the build-namelist XML database. The PTCLM python script to run single-point simulations was added back in for this release (but it has bugs that don’t allow it to work out of the box). CLM4 in CESM1.0.5 has a fully working versions of PTCLM.
Need Chapter 6 blurb…
Chapter 7 gives some guidance on trouble-shooting problems when using CLM5.0. It doesn’t cover all possible problems with CLM, but gives you some guidelines for things that can be done for some common problems.
Chapter 8 goes over the automated testing scripts for validating that the CLM is working correctly. The test scripts run many different configurations and options with CLM4.0 physics as well and CLM5.0 physics making sure that they work, as well as doing automated testing to verify restarts are working correctly, and testing at many different resolutions. In general this is an activity important only for a developer of CLM5.0, but could also be used by users who are doing extensive code modifications and want to ensure that the model continues to work correctly.
In the appendices we talk about some issues that are useful for advanced users and developers of CLM5.0.
Finally in Appendix A we give instructions on how to build the documentation associated with CLM5.0 (i.e. how to build this document). This document is included in every CLM distribution and can be built so that you can view a local copy rather than having to go to the CESM website. This also could be useful for developers who need to update the documentation due to changes they have made.
1.1.4. README file describing CLM5.0¶
The README (which can be found in
$CTSMROOT/doc) is repeated here.
$CTSMROOT/README 06/08/2018 Community Land Surface Model (CLM) science version 5.0.0 series -- source code, tools, offline-build and test scripts. This gives you everything you need to run CLM with CESM with datm8 to provide CRU NCEP or GSWP3 forcing data in place of a modeled atmosphere. For lists of current bugs (issues) and current development see the CTSM GitHub page: https://github.com/ESCOMP/ctsm IMPORTANT NOTE ON CESM CHECKOUT VERSUS A CTSM CHECKOUT: If this is the top level directory from making a clone of CTSM the directory structure is a little bit different than if CTSM is from a clone of the entire CESM. If this is part of CESM this directory will be under components/clm alongside other CESM component models. For a CTSM checkout this will be the top level directory. Other documentation will refer to $CTSMROOT and it means the directory that this file is at. CIMEROOT is the directory where "cime" is for this checkout. For a CESM checkout $CIMEROOT will be the "cime" directory beneath the top level directory. For a CTSM checkout $CIMEROOT will be $CTSMROOT/cime. General directory structure ($CTSMROOT): doc --------------- Documentation of CLM. bld --------------- Template, configure and build-namelist scripts for clm. src --------------- CLM Source code. test -------------- CLM Testing scripts for CLM offline tools. tools ------------- CLM Offline tools to prepare input datasets and process output. cime_config ------- Configuration files of cime for compsets and CLM settings manage_externals -- Script to manage the external source directories Directory structure only for a CTSM checkout: components -------- Other active sub-components needed for CLM to run (river routing and land-ice models) cime/scripts --------------- cesm/cime driver scripts cime/src/drivers/mct/main ----------- CESM top level driver source code. cime/src/drivers/mct/shr ------------ CESM top level driver shared code. cime/src/components/data_comps/datm - CESM Data model version 8 source code. cime/src/components/stub_comps/sice - CESM stub sea-ice model source code. cime/src/components/stub_comps/socn - CESM stub ocean model source code. cime/src/components/stub_comps/sglc - CESM stub glacier model source code. cime/src/externals ------------------ CESM external utility codes (Model Coupling Toolkit (MCT) (Earth System Model Framework) (timing -- code timing utility) (pio -- Parallel Input/Output) components/cism --------------------- CESM Community land Ice Sheet Model. components/mosart ------------------- Model for Scale Adaptive River Transport components/rtm ---------------------- CESM River Transport Model. Top level documentation ($CTSMROOT): README ------------------- This file README.rst --------------- File that displays under the project in github README_EXTERNALS.rst ----- Information on how to work with subversion externals for clm CODE_OF_CONDUCT.md ------- Code of Conduct for how to work with each other on the CTSM project Copyright ---------------- CESM Copyright file doc/UpdateChangeLog.pl ------- Script to add documentation on a tag to the ChangeLog/ChangeSum files doc/ChangeLog ---------------- Documents different CLM versions doc/ChangeSum ---------------- Summary documentation of different CLM versions Documentation of Namelist Items: (view the following in a web browser) bld/namelist_files/namelist_definition.xml --- Definition of all namelist items bld/namelist_files/namelist_defaults_clm4_5.xml - Default values for CLM4.5/CLM5.0 ============================================================================================= Important files in main directories (under $CTSMROOT): ============================================================================================= Externals.cfg --------------- File for management of the main high level externals Externals_CLM.cfg ----------- File for management of the CLM specific externals (i.e. FATES) parse_cime.cs.status -------- Script to parse test status files cs.status.* created by create_test doc/Quickstart.GUIDE -------- Quick guide to using cpl7 scripts. doc/IMPORTANT_NOTES --------- Some important notes about this version of clm, configuration modes and namelist items that are not validated or functional. doc/ChangeLog --------------- Detailed list of changes for each model version. doc/ChangeSum --------------- Summary one-line list of changes for each model version. doc/README ------------------ Documentation similar to this file doc/UsersGuide -------------- CLM Users Guide doc/CodeReference ----------- CLM Code Reference Guide bld/README ------------------ Description of how to use the configure and build-namelist scripts. bld/configure --------------- Script to prepare CLM to be built. bld/build-namelist ---------- Script to build CLM namelists. cime_config/buildnml ------------- Build the CLM namelist for CIME cime_config/buildlib ------------- Build the CLM library cime_config/config_compsets.xml -- Define CLM compsets cime_config/config_component.xml - Define CLM XML settings cime_config/config_tests.xml ----- Define CLM specific tests cime_config/config_pes.xml ------- Define Processor layouts for various CLM grids and compsets cime_config/testdefs ------------- Directory for specification of CLM testing cime_config/testdefs/ExpectedTestFails.xml -- List of tests that are expected to fail cime_config/usermods_dirs -------- Directories of sets of user-modification subdirs (These are directories that add specific user modifications to simulations created using "cime/scripts/create_newcase --user-mods-dir". Current sub directories are for various CMIP6 configurations) test/tools/test_driver.sh -- Script for general software testing of CLM's offline tools. tools/mksurfdata_map ---------- Directory to build program to create surface dataset at any resolution. tools/mkdatadomain ------------ Directory to build program to create datm7 or docn7 domain files from clm files. tools/mkprocdata_map ---------- Process history data from unstructed grids to a gridded format. tools/mkmapgrids -------------- NCL script to create a SCRIP grid file for a regular lat/lon grid tools/ncl_scripts ------------ Directory of NCL and perl scripts to do various tasks. Most notably to plot perturbation error growth testing and to extract regional information from global datasets for single-point/regional simulations. tools/contrib ----------------- Miscellansous useful scripts for pre and post processing as well as case management of CTSM. These scripts are contributed by users and may not be as well tested or supported as other tools. ============================================================================================= Source code directory structure: ============================================================================================= src/biogeochem ---- Biogeochemisty src/main ---------- Main control and high level code src/cpl ----------- Land model high level MCT and ESMF drivers src/biogeophys ---- Biogeophysics (Hydrology) src/dyn_subgrid --- Dynamic land unit change src/init_interp --- Online interpolation scr/fates --------- FATES model and sub-directories Functionally Assembled Terrestrial Ecosystem Simulator (FATES) Experimental Ecosystem Demography model src/utils --------- Utility codes src/unit_test_shr - Unit test shared modules for unit testing src/unit_test_stubs Unit test stubs that replicate CTSM code simpler src_clm40 --------- CLM4.0 source code directory ============================================================================================= QUICKSTART: using the CPL7 scripts ============================================================================================= cd $CIMEROOT/scripts ./create_newcase # get help on how to run create_newcase ./create_newcase --case testI --res f19_g17_gl4 --compset I2000Clm50BgcCrop # create new "I" case for default machine at 1.9x2.5_gx1v7 # with 4km greenland ice sheetres resolution # "I2000Clm50BgcCrop" case is clm5_0 active, datm8, and inactive ice/ocn # With no-evolve ice-sheet, and MOSART for river-routing cd testI ./case.setup # create the $CASE.run file ./case.build # build model and create namelists ./case.submit # submit script # (NOTE: ./xmlchange RESUBMIT=10 to set RESUBMIT to number # # of times to automatically resubmit -- 10 in this example)
1.1.5. Best Practices¶
CLM5.0 includes BOTH the old CLM4.0, CLM4.5 physics AND the new CLM5.0 physics and you can toggle between those three. The “standard” practice for CLM4.0 is to run with CN on, and with Qian atmospheric forcing. While the “standard” practice for CLM4.5 is to run with BGC on, and CRUNCEP atmospheric forcing. And finally the “standard” practice for CLM5.0 is to run with BGC and Prognostic Crop on, with the MOSART model for river routing, as well as the CISM ice sheet model, and using GSWP3 atmospheric forcing. “BGC” is the new CLM5.0 biogeochemistry and include CENTURY-like pools, vertical resolved carbon, as well as Nitrification and de-Nitrification (see the Section called Some Acronym’s and Terms We’ll be Using in Other resources to get help from ).
When running with CLMCN (either CLM4.0 or CLM5.0 physics) or CLM5.0-BGC, it is critical to begin with initial conditions that are provided with the release or to spin the model up following the CN spinup procedure before conducting scientific runs (see the Section called Spinning up the |version| biogeochemistry (CLMBGC spinup) in Chapter 4 for CLM5.0 or the Section called Spinning up the CLM4.0 biogeochemistry Carbon-Nitrogen Model (CN spinup) in Chapter 4 for CLM4.0). Simulations without a proper spinup will effectively be starting from an unvegetated world. See the Section called Setting Your Initial Conditions File in Chapter 1 for information on how to provide initial conditions for your simulation.
Initial condition files are provided for CLM4.0-CN as before, for fully coupled BCN and offline ICN cases for 1850 and 2000 at finite volume grids: 1deg (0.9x1.25), 2deg (1.9x2.5), and T31 resolutions. We also have interpolated initial conditions for BCN for 1850 and 2000 for two finite volume grids: 10x15, 4x5 and two HOMME grids (ne30np4 and ne120np4). There’s also an initial condition file for ICN with the prognostic crop model for 2000 at 2deg resolution, and one with CLMSP for 2000 at 2deg resolution. We also have initial conditions for offline CNDV for 1850. The 1850 initial condition files are in ‘reasonable’ equilibrium. The 2000 initial condition files represent the model state for the year 2000, and have been taken from transient simulations. Therefore, by design the year 2000 initial condition files do not represent an equilibrium state. Note also that spinning the 2000 initial conditions out to equilibrium will not reflect the best estimate of the real carbon/nitrogen state for the year 2000.
Initial condition files are also provided for CLM5.0 for several configurations and resolutions. For CLM4.5-SP and CLM4.5-BGC with both CRUNCEP and GSWP3 forcing we have initial conditions at 1deg resolution for 1850. For CLM5.0-SP and CLM5.0-BGC-Crop with both CRUNCEP and GSWP3 forcing we have initial conditions at 1deg resolution for 1850. Normally, these files are interpolated to any other resolution that you run at.
Users can interpolate initial condition files at different resolutions at startup of a CLM4.5 or CLM5.0 simulation. And the file created can be stored for later use. Interpolated initial condition files may no longer be in ‘reasonable’ equilibrium.
In CLM5.0 for both CLM5.0-CN, CLM5.0-BGC, and CLM5.0-BGC-Crop the new fire model requires lightning frequency data, and human population density (both are read inside of CLM). By default we have provided a climatology dataset for lightning frequency and a dataset with coverage from 1850 to 2014 for population density. Both of these datasets are interpolated from the native resolution of the datasets to the resolution you are running the model on. If you are running with an atmosphere model or forcing that is significantly different than present day – the lightning frequency may NOT appropriately correspond to your atmosphere forcing and fire initiation would be inappropriate.
Aerosol deposition is a required field to both CLM4.0, CLM4.5 and CLM5.0 physics, sent from the atmosphere model. Simulations without aerosol deposition will exhibit unreasonably high snow albedos. The model sends aerosol deposition from the atmospheric model (either CAM or DATM). When running with prescribed aerosol the atmosphere model will interpolate the aerosols from 2-degree resolution to the resolution the atmosphere model is running at.
1.1.6. A CTSM versus a CESM checkout¶
The directory structure for CLM5.0 is different depending on if it’s checked out from release-clm5.0 or CESM2.1. If CLM5.0 is checked out from https://github.com/ESCOMP/ctsm the CLM source code is directly under the top level directory. If CESM2.1 is checkout out from https://github.com/ESCOMP/cesm then the CLM source directories are under “components/clm” from the top level directory. We will refer to this directory for the CLM source directories in the User’s Guide as “$CTSMROOT”.
1.1.7. How To Use This Document¶
Links to descriptions and definitions have been provided in the code below. We use the same conventions used in the CESM documentation as outlined below.
Throughout the document this style is used to indicate shell commands and options, fragments of code, namelist variables, etc. Where examples from an interactive shell session are presented, lines starting with > indicate the shell prompt. A backslash "\" at the end of a line means the line continues onto the next one (as it does in standard UNIX shell). Note that $EDITOR" is used to refer to the text editor of your choice. $EDITOR is a standard UNIX environment variable and should be set on most UNIX systems. Comment lines are signaled with a "#" sign, which is the standard UNIX comment sign as well. $CSMDATA is used to denote the path to the inputdata directory for your CESM data. > This is a shell prompt with commands \ that continues to the following line. > $EDITOR filename # means you are using a text editor to edit "filename" # This is a comment line $CTSMROOT means the path to the root of the CTSM model