CLM 2.0 Using the CLM tools to create your own input datasets - erika72/clm-docs GitHub Wiki
There are several tools provided with CLM that allow you to create your own input datasets at resolutions you choose, or to interpolate initial conditions to a different resolution, or used to compare CLM history files between different cases. The tools are all available in the models/lnd/clm/tools
directory. Most of the tools are FORTRAN stand-alone programs in their own directory, but there is also a suite of NCL scripts in the shared/ncl_scripts
directory, and some of the tools are scripts that may also call the ESMF regridding program. Some of the NCL scripts are very specialized and not meant for general use, and we won't document them here. They still contain documentation in the script itself and the README file in the tools directory.
The tools are divided into three directories for three categories: clm4_0, clm4_5, and shared. The first two are of course for tools that are designed to work with either the CLM4.0 or CLM4.5 versions of the model. The last one are shared utilities that can be used by either, or have a "-phys" option so you can specify which version you want to use.
The list of generally important scripts and programs are as follows.
- tools/cprnc (relative to top level directory) to compare NetCDF files with a time axis.
-
shared/mkmapgrids to create SCRIP grid data files from old CLM format grid files that can then be used to create new CLM datasets (deprecated). There is also a NCL script (
shared/mkmapgrids/mkscripgrid.ncl
to create SCRIP grid files for regular latitude/longitude grids. - shared/mkmapdata to create SCRIP mapping data file from SCRIP grid files (uses ESMF).
- shared/gen_domain to create a domain file for datm from a mapping file. The domain file is then used by BOTH datm AND CLM to define the grid and land-mask.
- mksurfdata_map to create surface datasets from grid datasets (clm4_0 and clm4_5 versions).
- interpinic to interpolate initial condition files (clm4_0 and clm4_5 versions).
- shared/mkprocdata_map to interpolate output unstructured grids (such as the CAM HOMME dy-core "ne" grids like ne30np4) into a 2D regular lat/long grid format that can be plotted easily. Can be used by either clm4_0 or clm4_5.
In the sections to come we will go into detailed description of how to use each of these tools in turn. First, however we will discuss the common environment variables and options that are used by all of the FORTRAN tools. Second, we go over the outline of the entire file creation process for all input files needed by CLM for a new resolution, then we turn to each tool. In the last section we will discuss how to customize files for particular observational sites.
- 2.1 Common environment variables and options used in building the FORTRAN tools
- 2.2 General information on running the FORTRAN tools
- 2.3 Using NCL scripts
- 2.4 The File Creation Process
- 2.5 Using the cprnc tool to compare two history files
- 2.6 Using interpinic to interpolate initial conditions to different resolutions
- 2.7 Creating an output SCRIP grid file at a resolution to run the model on
- 2.8 Creating mapping files that mksurfdata_map will use
- 2.9 Creating a domain file for CLM and DATM
- 2.10 Using mksurfdata_map to create surface datasets from grid datasets
- 2.11 Converting unstructured grid output to gridded datasets for post processing
- 2.12 How to Customize Datasets for particular Observational Sites
- 2.13 Conclusion of tools description