Using Templates

Grads allows you use a single data descriptor file to aggregate multiple data files and handle them as if they were one individual file. The individual data files must be identical in all dimensions except time and in a format GrADS can read. The time range of each individual file must be indicated it its filename.

An example might be a timeseries spanning a single month, where each day's worth of hourly data is contained in individual files:

In order to tell GrADS that there are multiple files in this time series, three records are modified in the data descriptor (.ctl) file:

First, the DSET entry has a substitution template instead of a filename. See below for a description of all the possible components of the template. Second, the OPTIONS entry contains the template keyword. Third, the TDEF entry describes the time range for the entire set of data files.

Templating works on the following GrADS data types: gridded binary, GRIB, and station data. If you specify any additional options keywords in the data descriptor file, make sure the options apply equally to each file included in the template.

Valid components of the substitution template are as follows:

When specifying the initial time (e.g., NWP model output from NMC and FNMOC), use these substitutions: