Using NCL scripts ndepregrid.ncl and aerdepregrid.ncl to interpolate aerosol deposition datasets

Unlike the other tools, these are NCAR Command Language (NCL) scripts and you will need to get a copy of NCL in order to use them. You also won't have to build an executable in order to use them, hence no Makefile is provided. NCL is provided for free download as either binaries or source code from: http://www.ncl.ucar.edu/. The NCL web-site also contains documentation on NCL and it's use.

By default at this point neither of these scripts HAS to be used, as the model is now constructed to read aerosol and Nitrogen deposition from 2-degree datasets and interpolate to the model resolution on the fly. The main reason you might want to do this now, is for better performance for single-point simulations.

Both the ndepregrid.ncl and aerdepregrid.ncl scripts have similar interfaces and you customize the output resolution and characteristics based on the settings of environment variables that you set (if you don't set any of the variables, the script has defaults that it will use). The list of environment variables that can be set are:

RES -- output resolution name
RCP -- representative concentration pathway for future scenarios (example 2.6, 4.5, 6, or 8.5)
SIM_YR -- simulation year (example 1850 or 2000)
SIM_YR_RNG -- simulation year range (example 1850-2000 or 1850-2100)
GRDFIL -- full pathname of grid file to use (in place of getting the default grid file based on the RES value)
CSMDATA -- CESM inputdata directory
CLM_ROOT -- root directory for CLM (models/lnd/clm directory)

Important: You MUST provide either RES or both GRDFIL AND RES. If you just give RES the default namelist database in models/lnd/clm/bld will be used to find the default grid file based on the resolution name RES. If you provide GRDFIL the input pathname of the gridfile provided will be used, and the output filename will include RES as part of it's name to designate it as an output file at that resolution.

Both scripts assume that you will be interpolating from a native resolution of 1.9x2.5 and using the default files found in the namelist database to interpolate from. If you want to interpolate from another resolution or use other files, you would need to edit the scripts to do so. Both scripts also use a bilinear interpolation to do the regridding. The environment variables: RCP, SIM_YR, and SIM_YR_RNG will be used to query the namelist database to determine which native dataset to interpolate from. If you don't provide valid values for these variables, it won't be able to find a dataset to interpolate from. You can use the build-namelist script to query what the valid values for these can be. Likewise, when you use RES to determine the grid file to interpolate to, it needs to be a valid value from the namelist database.

The scripts can be used to interpolate from (and create output) constant or transient datasets. Constant datasets specify the SIM_YR and set SIM_YR_RNG to constant (which is also the default). Transient datasets need to specify both SIM_YR and SIM_YR_RNG, where SIM_YR is set to the first year in the interval (typically 1850).

The default for CSMDATA works for NCAR computers, but will need to be set to the top level directory location of your CESM input data on other computers. If you set this as a default for your shell when you login (for example with your $HOME/.cshrc if you use csh) you won't have to set it each time you run the script. CLM_ROOT will default to the proper location when you run it in the models/lnd/clm/tools/ncl_script directory. It is only useful if you want to run the script out of a different directory.

Using ndepregrid.ncl to interpolate Nitrogen deposition datasets

ndepregrid.ncl interpolates the Nitrogen deposition datasets from one resolution to another.

Note: Interpolating Nitrogen deposition files is no longer needed, because the model can read Nitrogen deposition files at one resolution and interpolate to the resolution the model is running at on the fly. Interpolating to another resolution is only useful for very course resolutions, if you want to save some computing resources in reading larger datasets. For example, this may be useful in obtaining single-point datasets.

For example, to interpolate to an output resolution of 0.9x1.25, for a constant simulation-year of 1850, you would do the following:


> env RES=0.9x1.25 SIM_YR=1850 ncl ndepregrid.ncl

Using aerdepregrid.ncl to interpolate Aerosol deposition datasets

aerdepregrid.ncl interpolates the Aerosol deposition datasets from one resolution. It can be used to interpolate either constant datasets (for example: aerosoldep_monthly_2000_0.9x1.25_c090828.nc) or transient datasets (for example: aerosoldep_monthly_1849-2006_0.9x1.25_c090830.nc).

Note: Interpolating aerosol deposition files is no longer needed, because the DATM model can read aerosol deposition files at one resolution and interpolate to the resolution the model is running at on the fly. Interpolating to another resolution is only useful for very course resolutions, if you want to save some computing resources in reading larger datasets. For example, this may be useful in obtaining single-point datasets.

For example, to interpolate to an output resolution of 4x5, for a transient simulation-year range of 1850 to 2100 and the rcp of 8.5, you would do the following:


> env RES=4x5 SIM_YR=1850 SIM_YR_RNG=1850-2100 RCP=8.5 ncl ndepregrid.ncl