Using mkgriddata to create grid datasets

mkgriddata is used to create grid, fraction, and topography datasets to run CLM at a new resolution. It is typically the first step in creating datasets needed to run CLM at a new resolution (followed by mksurfdata, and then the interpolation programs, aerdepregrid.ncl, and ndepregrid.ncl when running with CN).

mkgriddata namelist

mkgriddata is controlled by a namelist. There are ten different namelist items, and you need to use enough of them so that files will be output. The different types of input datasets contain different input data types, that correspond to the three different types of output files: grid, fraction, and topography. Output files for each of these will only be output if there is input data that correspond to these. If you only have input data for grid locations -- you will only get an output grid file. If you have both grid and fraction data you will get grid and fraction data files. If you also have topography data you will also get topo files.

Namelist options to mkgriddata include:

mksrf_fnavyoro -- Navy orography file to use for land fraction and surface heights.
mksrf_frawtopo -- Raw topography file with just surface heights.
mksrf_fcamfile -- CAM initial conditions file with land-fractions and topography
mksrf_fclmgrid -- CLM grid file
mksrf_fccsmdom -- CESM domain file
mksrf_fcamtopo -- CAM topography file
mksrf_lsmlon -- number of longitude for regional grid
mksrf_lsmlatnumber of latitudes for regional grid
mksrf_edgen -- Northern edge for regional grid
mksrf_edgee -- Southern edge for regional grid
mksrf_edges -- Eastern edge for regional grid
mksrf_edgew -- Western edge for regional grid

You need to enter one of the following four options:


   mksrf_fnavyoro    - high resolution topo dataset (topo data)
   mksrf_lsmlon      - number of longitudes
   mksrf_lsmlat      - number of latitudes
   mksrf_edgen       - northern edge of grid (degrees)
   mksrf_edgee       - eastern  edge of grid (degrees)
   mksrf_edges       - southern edge of grid (degrees)
   mksrf_edgew       - western  edge of grid (degrees)
or

   mksrf_fcamfile    - CAM topo file (grid and possibly fraction data)
or

   mksrf_fccsmdom    - CESM domain file (both grid, and fraction data)
or

   mksrf_fclmgrid    - CLM grid or surface dataset file (grid data)
Note, you can provide more than one of the needed datasets, and the output data will be determined by the datasets according to an order of precedence. The order of precedence for data is as follows:

  1. mksrf_fcamfile

  2. mksrf_fclmgrid

  3. mksrf_fnavyoro

  4. mksrf_fccsmdom

Grid data then will be established by the file with the highest precedence. CESM domain files sometimes have latitudes and longitudes that are "off" from the standard by a small amount. By establishing an order of precedence you can ensure that grid locations exactly match a given standard file, even if the values in the domain file are off from that.

There are three different major modes for using "mkgriddata" to create grid files for CLM:

mksrf_fnavyoro -- Navy orography file to use for land fraction and surface heights.
mksrf_frawtopo -- Raw topography file with just surface heights.
mksrf_fcamfile -- CAM initial conditions file with land-fractions and topography
mksrf_fclmgrid -- CLM grid file
mksrf_fccsmdom -- CESM domain file
mksrf_fcamtopo -- CAM topography file
mksrf_lsmlon -- number of longitude for regional grid
mksrf_lsmlat -- number of latitudes for regional grid
mksrf_edgen -- Northern edge for regional grid
mksrf_edgee -- Southern edge for regional grid
mksrf_edges -- Eastern edge for regional grid
mksrf_edgew -- Western edge for regional grid

You need to enter one of the following four options:


   mksrf_fnavyoro    - high resolution topo dataset (topo data)
   mksrf_lsmlon      - number of longitudes
   mksrf_lsmlat      - number of latitudes
   mksrf_edgen       - northern edge of grid (degrees)
   mksrf_edgee       - eastern  edge of grid (degrees)
   mksrf_edges       - southern edge of grid (degrees)
   mksrf_edgew       - western  edge of grid (degrees)
or

   mksrf_fcamfile    - CAM topo file (grid and possibly fraction data)
or

   mksrf_fccsmdom    - CESM domain file (both grid, and fraction data)
or

   mksrf_fclmgrid    - CLM grid or surface dataset file (grid data)
Note, you can provide more than one of the needed datasets, and the output data will be determined by the datasets according to an order of precedence. The order of precedence for data is as follows:

  1. mksrf_fcamfile

  2. mksrf_fclmgrid

  3. mksrf_fnavyoro

  4. mksrf_fccsmdom

Grid data then will be established by the file with the highest precedence. CESM domain files sometimes have latitudes and longitudes that are "off" from the standard by a small amount. By establishing an order of precedence you can ensure that grid locations exactly match a given standard file, even if the values in the domain file are off from that.

There are three different major modes for using mkgriddata to create grid files for CLM:

Convert CESM domain files to CLM grid files
Create single point or regional area grid files
Convert CAM files to CLM grid files

Convert CESM domain files to CLM grid files

CESM domain files such as used for DATM, include all the information needed to create CLM grid and fraction files.

Example 2-3. Example mkgriddata namelist to convert CESM 4x5 domain files to CLM grid files


&clmexp
 mksrf_fccsmdom=
'/fs/cgd/csm/inputdata/lnd/dlnd7/domain.lnd.4x5_gx3v5.060404.nc'
 mksrf_fclmgrid=
'/fs/cgd/csm/inputdata/lnd/clm2/griddata/griddata_4x5_060404.nc'
/

Tip: Notice that in the above example, a CLM grid file is included as well, even though it's not required. The reason for this is to ensure that the latitude and longitudes on the output files exactly match a standard grid file.

Create single point or regional area grid files

The process to create single-point or regional area CLM grid files is the same. You enter the number of latitudes and longitudes you want on your output file and the extent of the grid: North, East, South and West. You also tell mkgriddata that you are entering a "regional" grid and you also enter the standard Navy orography dataset (or your own orography file if desired). For a single point you simply enter "1" for the number of latitudes and longitudes, but you still enter the grid extent (of the single grid cell). Here is a sample regional namelist to create a 5x5 regional grid over the Amazon:

Example 2-4. Example mkgriddata namelist to create regional grid over Amazon


&clmexp
 mksrf_fnavyoro=
"/fs/cgd/csm/inputdata/lnd/clm2/rawdata/mksrf_navyoro_20min.c010129.nc"
 mksrf_lsmlon = 5
 mksrf_lsmlat = 5
 mksrf_edgee = 303.75
 mksrf_edgew = 286.25
 mksrf_edges = -15.
 mksrf_edgen = -4.
/

Warning

Currently you can NOT have regional grids that straddle both sides of the Greenwich (longitude = zero) line.

Important: You should enter longitudes with values from 0 to 360 East.

Convert CAM files to CLM grid files (deprecated)

Older CAM initial files included all the information needed to create CLM grid files. Newer CAM files no longer include land fraction data. Hence you can use CAM files to give you the grid coordinates, but you need other data to give you the land-mask and topography. Since, CAM files no longer contain the needed information, this option is now deprecated. In most cases you should use one of the other two options.