|VCS Scripts: Scripting Formats Attributes: Th_name|
The Format attribute set defines the name, units, and format of a dimension.
The Format attributes are assigned as follows:
A different format is assigned for each of a set of variables that are defined by name and units. The Format attributes are:
name=name of the variable that uses the format
units=units of the variable that uses the format
format=description of the format
****name = name of the variable that uses the format****
The variables that use formats are the single-valued dimensions of the array data, which require descriptors for the dimension name and units, and the mean (`mean'), maximum (`max') , and minimum (`min') of the array data variable whose units are the same as those of the variable.
****units = units of the variable that uses the format****
A single Format attribute set can contain multiple formats that are selected by comparing the name and units of the variable to be formatted with those defined by the attributes. The formats are used to convert floating point numbers to a text form. The selection of units for time is especially rich (see below).
Note, the units attribute can be specified with an asterisk (*) to indicate that it has no effect on the format; that is, any variable with the specified (*) can use the format.
**** format = description of the format****
Formats are character strings that can be up to 120 characters in length. (In VCS, character strings are denoted by use of double quotes "...") They may contain printing characters and blanks as well as:
%n to display the name of the variable
%u to display the units of the variable
%g to format the floating point value to a string of digits
%t[a:b:c] to format the floating point value using the bracketted descriptors
The name and units of the variable determine which of the formats to use. For example, the bracketted descriptors [a:b:c] above are designed to express time in various units. Available format descriptors include:
y=last two digits of the year (e.g., 93)
c=full century and year designation (e.g., 1993)
mon=lower case, three-character month designation (e.g., jan)
Mon=capitalized, three-character month designation (e.g., Jan)
MON=upper case, three-character month designation (e.g., JAN)
S=upper case, three-character season designator (e.g., DJF)
Sea= capitalized, three-character month as a season designator (e.g., Dec-Jan-Feb)
SEA= uppercase, three-character month as a season designator (e.g., DEC-JAN-FEB)
season= lowercase, full-month season designator (e.g., december-january-february)
Season= capitalized, full-month season designator (e.g., December-January-February)
SEASON= uppercase, full month season designator (e.g., DECEMBER-JANUARY-FEBRUARY)
An example of a Format script follows: