Chapter 7. Scripts for testing CLM

Table of Contents
Testing CLM Using the CESM Test Scripts
Testing CLM Using the CLM Specific Stand-Alone Tools Testing Scripts
Testing CLM tools using the CLM Stand-Alone Tools Testing Scripts

Technically, you could use the customization we gave in Chapter 1 to test various configuration and namelist options for CLM. Sometimes, it's also useful to have automated tests though to test that restarts give exactly the same results as without a restart. It's also useful to have automated tests to run over a wide variety of configurations, resolutions, and namelist options. To do that we have several different types of scripts set up to make running comprehensive testing of CLM easy. There are two types of testing scripts for CLM. The first are the CESM test scripts, which utilize the create_newcase scripts that we shown how to use in this User's Guide. The second are a set of stand-alone scripts that use the CLM configure and build-namelist scripts to build and test the model as well as testing the CLM tools as well. Below we will go into further details of how to use both methods.

Testing CLM Using the CESM Test Scripts

We first introduce the test scripts that work for all CESM components. We will use the create_test and then the create_test_suite scripts. The create_test runs a specific type of test, at a given resolution, for a given compset using a given machine. There is a list of different tests, but the "ERI" tests do several things at once, running from startup, as well as doing exact branch and restart tests. So to run "ERI" testing at 2-degree with the I1850CN compset on yellowstone_intel you do the following.

> cd scripts
> ./create_test -testname ERI.f19_g16.I1850CN.yellowstone_intel
> cd ERI.f19_g16.I1850CN.yellowstone_intel.$id
> ./ERI.f19_g16.I1850CN.yellowstone_intel.$
> ERI.f19_g16.I1850CN.yellowstone_intel.$id.submit
When the test is done it will update the file TestStatus with either a PASS or FAIL message.

To run a suite of tests from a list of tests with syntax similar to above you use create_test_suite as follows passing it a ASCII list of tests. There are already some test lists in the scripts/ccsm_utils/Testlists directory a few of which are specific to CLM. To run for the CLM yellowstone test list, on yellowstone, you would do the following:

> cd scripts
> ./create_test_suite -input_list ccsm_utils/Testlists/yellowstone.clm.auxtest
# Submit the suite of tests (note $id refers to the integer job number for this job)
> ./cs.submit.$id.yellowstone
# Later check the tests with...
> ./cs.status.$id
# The above will give a PASS or FAIL message for each test.
For more information on doing testing with the CESM scripts see the CESM1.1.1 User's Guide on testing.