Templating over ENSEMBLE
In version 2.0, with the introduction of the extra grid dimension for ensembles, support was also added for file templating over E. The sole substitution template is %e
and the substitution string is the ensemble name, which is provided in the EDEF entry in the descriptor file. Note that the ensemble names are limited to 15 characters -- keep this limit in mind when designing your data directory structure and file naming conventions (or use symbolic links to create short aliases for longer filenames). If you are templating over the ensemble dimension, there can be only one ensemble member per file. If your data set has an ensemble dimension, and you are using templating over T but not E (i.e., there is no %e in the DSET entry), then all ensemble members are presumed to have identical time axes, and all members must be contained in the data file for a given time. Templating over T but not E is not supported for data sets in flat binary or GRIB1 formats.
Examples
-
Here's a set of binary files spanning a single month, where each day's worth of hourly data is contained in individual files:1may92.dat2may92.dat...31may92.datThree records must be modified in the data descriptor file. Note that the TDEF entry reflects the entire month's worth of data:DSET ^%d1may92.datOPTIONS templateTDEF 744 linear 0z1may1992 1hr
-
If your data set expanded, and there were more files containing hourly data for other months and years:1jun92.dat2jun92.dat...1jan93.datThen you would add a template for month and year in your DSET entry and extend the length of your TDEF:DSET ^%d1%mc%y2.datOPTIONS templateTDEF 6624 linear 0z1may1992 1hr
-
Suppose you have a set of seven netcdf files, each containing monthly data spanning a decade:
pr.1880_1889.nc
pr.1890_1899.nc
pr.1900_1909.nc
pr.1910_1919.nc
pr.1920_1929.nc
pr.1930_1939.nc
pr.1940_1949.nc
Then your descriptor file would include the following entries:DSET ^pr.%x30_%x39.nc
OPTIONS template
DTYPE netcdf
TDEF 840 linear jan1880 1mo
-
Here are two netcdf files, one containing 50 years of monthly data (600 time steps), the other 100 years (1200 time steps):
pr.1851-1900.nc
pr.1901-2000.nc
Your descriptor file should include the following entries:DSET ^pr.%ch.nc
CHSUB 1 600 1851-1900
CHSUB 601 1800 1901-2000
OPTIONS template
DTYPE netcdf
TDEF 1800 linear jan1851 1mo
If these two data files were located on different disks, you could write out the relevant descriptor file entries this way instead:DSET %ch
CHSUB 1 600 /disk1/pr.1851-1900.nc
CHSUB 601 1800 /disk2/pr.1901-2000.nc
-
Your forecast model output looks like this:MMOUT_DOMAIN1_00MMOUT_DOMAIN1_01MMOUT_DOMAIN1_02so your DSET enry will look like this:DSET ^MMOUT_DOMAIN1_%tm2