4.4. File name templating¶
If the names of input files follow particular patterns, JULES can use a substitution template rather than requiring a potentially long list of file names. Templating comes in two forms, time templating and variable name templating, which can be used separately or together.
Substitution strings are 3-character strings, starting with
%. JULES will automatically detect the use of either form of templating by checking for the presence of the substitution strings in file names.
4.4.1. Time templating¶
If any of the time templating substitution strings are present in a file name, then JULES assumes time-templating is to be used. The valid substitution strings for time templating are:
1- or 2-digit month
3-character month abbreviation
2-digit day of month
JULES will automatically detect the period (or frequency) of files based on the specific substitution strings in the following manner:
This means that monthly files must also have a year substitution string present, and daily files must have both month and year substitution strings present. Only yearly, monthly and daily files are allowed with time templating, with each file containing a single period (year, month or day respectively) of data. For yearly files, the first data in each file must apply from 00:00:00 on 1st January for each year. For monthly files, the first data in the file must apply from 00:00:00 on the 1st of the month. For daily files, the first data in the file must apply from 00:00:00 on the given day. Other configurations can be specified using a list of files with their respective start times.
4.4.2. Variable name templating¶
Variable name templating can be used when related variables are stored in separate files with file names that are identical apart from a section that indicates what variable is in each file. Examples of the use of this are given in the next section. JULES will automatically detect if the variable name substitution string -
%vv - is present in a file name, and apply variable name templating if appropriate.
4.4.3. Examples of file name templating¶
18.104.22.168. Time templating only¶
Data is in monthly files with all related variables in the same file.
22.214.171.124. Variable name templating only¶
Ancillary (non-time-varying) data with each variable in similarly named but separate files.
126.96.36.199. Time and variable name templating together¶
Data is in monthly files with each variable in similarly named but separate files.
188.8.131.52. Variable name templating with a list of files¶
Data in 6-monthly files with each variable in similarly named but separate files.
Since the time templating cannot handle 6-monthly files, the files and their start times must be specified as a list. However, variable name templating can still be used.
Also note that it is possible to use a substitution string more than once in a template.