1 |
<chapter> |
---|
2 |
<title> |
---|
3 |
Description of the Data |
---|
4 |
</title> |
---|
5 |
|
---|
6 |
<para> |
---|
7 |
The attributes described in this section are used to |
---|
8 |
provide a description of the content and the units |
---|
9 |
of measurement for each variable. We continue to |
---|
10 |
support the use of the |
---|
11 |
<varname>units</varname> |
---|
12 |
and |
---|
13 |
<varname>long_name</varname> attributes |
---|
14 |
as defined in COARDS. We extend COARDS by adding the |
---|
15 |
optional |
---|
16 |
<varname>standard_name</varname> |
---|
17 |
attribute which is used to provide |
---|
18 |
unique identifiers for variables. This is important for |
---|
19 |
data exchange since one cannot necessarily identify a |
---|
20 |
particular variable based on the name assigned to it by |
---|
21 |
the institution that provided the data. |
---|
22 |
</para> |
---|
23 |
|
---|
24 |
<para> |
---|
25 |
The |
---|
26 |
<varname>standard_name</varname> |
---|
27 |
attribute can |
---|
28 |
be used to identify variables that contain coordinate |
---|
29 |
data. But since it is an optional attribute, applications |
---|
30 |
that implement these standards must continue to be |
---|
31 |
able to identify coordinate types based on the COARDS |
---|
32 |
conventions. |
---|
33 |
</para> |
---|
34 |
|
---|
35 |
<section id="units"> |
---|
36 |
<title>Units</title> |
---|
37 |
<para> |
---|
38 |
The <varname>units</varname> attribute is required for all variables |
---|
39 |
that represent dimensional quantities (except for boundary variables |
---|
40 |
defined in <xref linkend="cell-boundaries"/> and climatology variables |
---|
41 |
defined in <xref linkend="climatological-statistics"/>). The value of |
---|
42 |
the <varname>units</varname> attribute is a string that can be |
---|
43 |
recognized by UNIDATA"s Udunits package <biblioref linkend="udunits"/>, |
---|
44 |
with a few exceptions that are given below. |
---|
45 |
The <ulink url="http://www.unidata.ucar.edu/software/udunits/">Udunits package</ulink> includes a file |
---|
46 |
<filename>udunits.dat</filename>, |
---|
47 |
which lists its supported unit names. Note that case is significant in the <varname>units</varname> strings. |
---|
48 |
</para> |
---|
49 |
|
---|
50 |
<para> |
---|
51 |
The COARDS convention prohibits the unit |
---|
52 |
<constant>degrees</constant> altogether, but this unit is not |
---|
53 |
forbidden by the CF convention because it may in fact be appropriate |
---|
54 |
for a variable containing, say, solar zenith angle. The unit |
---|
55 |
<constant>degrees</constant> is also allowed on coordinate variables |
---|
56 |
such as the latitude and longitude coordinates of a transformed grid. |
---|
57 |
In this case the coordinate values are not true latitudes and |
---|
58 |
longitudes which must always be identified using the more specific |
---|
59 |
forms of <constant>degrees</constant> as described in |
---|
60 |
<xref linkend="latitude-coordinate"/> and <xref linkend="longitude-coordinate"/>. |
---|
61 |
</para> |
---|
62 |
|
---|
63 |
<para> |
---|
64 |
Units are not required for dimensionless quantities. A variable with no units attribute is assumed to be dimensionless. However, a units attribute specifying a dimensionless unit may optionally be included. The Udunits package defines a few dimensionless units, such as <constant>percent</constant>, but is lacking commonly used units such as ppm (parts per million). This convention does not support the addition of new dimensionless units that are not udunits compatible. The conforming unit for quantities that represent fractions, or parts of a whole, is "1". The conforming unit for parts per million is "1e-6". Descriptive information about dimensionless quantities, such as sea-ice concentration, cloud fraction, probability, etc., should be given in the <varname>long_name</varname> or <varname>standard_name</varname> attributes (see below) rather than the <varname>units</varname>. |
---|
65 |
</para> |
---|
66 |
|
---|
67 |
<para> |
---|
68 |
The units <constant>level</constant>, <constant>layer</constant>, and <constant>sigma_level</constant> are allowed for dimensionless vertical coordinates to maintain backwards compatibility with COARDS. These units are not compatible with Udunits and are deprecated by this standard because conventions for more precisely identifying dimensionless vertical coordinates are introduced (see <xref linkend="dimensionless-vertical-coordinate"/>). |
---|
69 |
</para> |
---|
70 |
|
---|
71 |
<para> |
---|
72 |
The Udunits syntax that allows scale factors and offsets to be applied to |
---|
73 |
a unit is not supported by this standard. The application of any scale |
---|
74 |
factors or offsets to data should be indicated by the |
---|
75 |
<varname>scale_factor</varname> and <varname>add_offset</varname> |
---|
76 |
attributes. Use of these attributes for data packing, |
---|
77 |
which is their most important application, |
---|
78 |
is discussed in detail in <xref linkend="packed-data"/>. |
---|
79 |
</para> |
---|
80 |
|
---|
81 |
<para> |
---|
82 |
Udunits recognizes the following prefixes and their abbreviations. |
---|
83 |
<table frame="all"><title>Supported Units</title> |
---|
84 |
<tgroup cols="7" align="left" colsep="1" rowsep="1"> |
---|
85 |
<thead> |
---|
86 |
<row> |
---|
87 |
<entry>Factor</entry> |
---|
88 |
<entry>Prefix</entry> |
---|
89 |
<entry>Abbreviation</entry> |
---|
90 |
<entry></entry> |
---|
91 |
<entry>Factor</entry> |
---|
92 |
<entry>Prefix</entry> |
---|
93 |
<entry>Abbreviation</entry> |
---|
94 |
</row> |
---|
95 |
</thead> |
---|
96 |
<tbody> |
---|
97 |
<row> |
---|
98 |
<entry>1e1</entry> |
---|
99 |
<entry>deca,deka</entry> |
---|
100 |
<entry>da</entry> |
---|
101 |
<entry></entry> |
---|
102 |
<entry>1e-1</entry> |
---|
103 |
<entry>deci</entry> |
---|
104 |
<entry>d</entry> |
---|
105 |
</row> |
---|
106 |
<row> |
---|
107 |
<entry>1e2</entry> |
---|
108 |
<entry>hecto</entry> |
---|
109 |
<entry>h</entry> |
---|
110 |
<entry></entry> |
---|
111 |
<entry>1e-2</entry> |
---|
112 |
<entry>deci</entry> |
---|
113 |
<entry>c</entry> |
---|
114 |
</row> |
---|
115 |
<row> |
---|
116 |
<entry>1e3</entry> |
---|
117 |
<entry>kilo</entry> |
---|
118 |
<entry>k</entry> |
---|
119 |
<entry></entry> |
---|
120 |
<entry>1e-3</entry> |
---|
121 |
<entry>milli</entry> |
---|
122 |
<entry>m</entry> |
---|
123 |
</row> |
---|
124 |
<row> |
---|
125 |
<entry>1e6</entry> |
---|
126 |
<entry>mega</entry> |
---|
127 |
<entry>M</entry> |
---|
128 |
<entry></entry> |
---|
129 |
<entry>1e-6</entry> |
---|
130 |
<entry>micro</entry> |
---|
131 |
<entry>u</entry> |
---|
132 |
</row> |
---|
133 |
<row> |
---|
134 |
<entry>1e9</entry> |
---|
135 |
<entry>giga</entry> |
---|
136 |
<entry>G</entry> |
---|
137 |
<entry></entry> |
---|
138 |
<entry>1e-9</entry> |
---|
139 |
<entry>nano</entry> |
---|
140 |
<entry>n</entry> |
---|
141 |
</row> |
---|
142 |
<row> |
---|
143 |
<entry>1e12</entry> |
---|
144 |
<entry>tera</entry> |
---|
145 |
<entry>T</entry> |
---|
146 |
<entry></entry> |
---|
147 |
<entry>1e-12</entry> |
---|
148 |
<entry>pico</entry> |
---|
149 |
<entry>p</entry> |
---|
150 |
</row> |
---|
151 |
<row> |
---|
152 |
<entry>1e15</entry> |
---|
153 |
<entry>peta</entry> |
---|
154 |
<entry>P</entry> |
---|
155 |
<entry></entry> |
---|
156 |
<entry>1e-15</entry> |
---|
157 |
<entry>femto</entry> |
---|
158 |
<entry>f</entry> |
---|
159 |
</row> |
---|
160 |
<row> |
---|
161 |
<entry>1e18</entry> |
---|
162 |
<entry>exa</entry> |
---|
163 |
<entry>E</entry> |
---|
164 |
<entry></entry> |
---|
165 |
<entry>1e-18</entry> |
---|
166 |
<entry>atto</entry> |
---|
167 |
<entry>a</entry> |
---|
168 |
</row> |
---|
169 |
<row> |
---|
170 |
<entry>1e21</entry> |
---|
171 |
<entry>zetta</entry> |
---|
172 |
<entry>Z</entry> |
---|
173 |
<entry></entry> |
---|
174 |
<entry>1e-21</entry> |
---|
175 |
<entry>zepto</entry> |
---|
176 |
<entry>z</entry> |
---|
177 |
</row> |
---|
178 |
<row> |
---|
179 |
<entry>1e24</entry> |
---|
180 |
<entry>yotta</entry> |
---|
181 |
<entry>Y</entry> |
---|
182 |
<entry></entry> |
---|
183 |
<entry>1e-24</entry> |
---|
184 |
<entry>yocto</entry> |
---|
185 |
<entry>y</entry> |
---|
186 |
</row> |
---|
187 |
</tbody> |
---|
188 |
</tgroup> |
---|
189 |
</table> |
---|
190 |
</para> |
---|
191 |
|
---|
192 |
</section> |
---|
193 |
<section id="long-name"> |
---|
194 |
<title>Long Name</title> |
---|
195 |
<para> |
---|
196 |
The <varname>long_name</varname> attribute is defined by the NUG to contain a long descriptive name which may, for example, be used for labeling plots. For backwards compatibility with COARDS this attribute is optional. But it is highly recommended that either this or the <varname>standard_name</varname> attribute defined in the next section be provided to make the file self-describing. If a variable has no <varname>long_name</varname> attribute then an application may use, as a default, the <varname>standard_name</varname> if it exists, or the variable name itself. |
---|
197 |
</para> |
---|
198 |
</section> |
---|
199 |
|
---|
200 |
<section id="standard-name"> |
---|
201 |
<title>Standard Name</title> |
---|
202 |
<para> |
---|
203 |
A fundamental requirement for exchange of scientific data is the ability to describe precisely the physical quantities being represented. To some extent this is the role of the <varname>long_name</varname> attribute as defined in the NUG. However, usage of <varname>long_name</varname> is completely ad-hoc. For some applications it would be desirable to have a more definitive description of the quantity, which would allow users of data from different sources to determine whether quantities were in fact comparable. For this reason an optional mechanism for uniquely associating each variable with a standard name is provided. |
---|
204 |
</para> |
---|
205 |
|
---|
206 |
<para> |
---|
207 |
A standard name is associated with a variable via the attribute <varname>standard_name</varname> which takes a string value comprised of a standard name optionally followed by one or more blanks and a standard name modifier (a string value from <xref linkend="standard-name-modifiers"/>). |
---|
208 |
</para> |
---|
209 |
|
---|
210 |
<para> |
---|
211 |
The set of permissible standard names is contained in the standard name table. The table entry for each standard name contains the following: |
---|
212 |
</para> |
---|
213 |
|
---|
214 |
<variablelist> |
---|
215 |
<varlistentry> |
---|
216 |
<term>standard name</term> |
---|
217 |
<listitem> |
---|
218 |
<para> |
---|
219 |
The name used to identify the physical quantity. A standard name contains no whitespace and is case sensitive. |
---|
220 |
</para> |
---|
221 |
</listitem> |
---|
222 |
</varlistentry> |
---|
223 |
<varlistentry> |
---|
224 |
<term>canonical units</term> |
---|
225 |
<listitem> |
---|
226 |
<para> |
---|
227 |
Representative units of the physical quantity. Unless it is dimensionless, a variable with a <varname>standard_name</varname> attribute must have units which are physically equivalent (not necessarily identical) to the canonical units, possibly modified by an operation specified by either the standard name modifier (see below and <xref linkend="standard-name-modifiers"/>) or by the <varname>cell_methods</varname> attribute (see <xref linkend="cell-methods"/> and <xref linkend="appendix-cell-methods"/>). |
---|
228 |
</para> |
---|
229 |
</listitem> |
---|
230 |
</varlistentry> |
---|
231 |
<varlistentry> |
---|
232 |
<term>description</term> |
---|
233 |
<listitem> |
---|
234 |
<para> |
---|
235 |
The description is meant to clarify the qualifiers of the fundamental quantities such as which surface a quantity is defined on or what the flux sign conventions are. We don"t attempt to provide precise definitions of fundumental physical quantities (e.g., temperature) which may be found in the literature. |
---|
236 |
</para> |
---|
237 |
</listitem> |
---|
238 |
</varlistentry> |
---|
239 |
</variablelist> |
---|
240 |
|
---|
241 |
<para> |
---|
242 |
When appropriate, the table entry also contains the corresponding GRIB parameter code(s) (from ECMWF and NCEP) and AMIP identifiers. |
---|
243 |
</para> |
---|
244 |
|
---|
245 |
<para> |
---|
246 |
The standard name table is located at <ulink url="http://cf-pcmdi.llnl.gov/documents/cf-standard-names/3/cf-standard-name-table.xml">http://cf-pcmdi.llnl.gov/documents/cf-standard-names/3/cf-standard-name-table.xml</ulink>, written in compliance with the XML format, as described in <xref linkend="standard-name-table-format"/>. Knowledge of the XML format is only necessary for application writers who plan to directly access the table. A formatted text version of the table is provided at <ulink url="http://cf-pcmdi.llnl.gov/documents/cf-standard-names/3/cf-standard-name-table.html">http://cf-pcmdi.llnl.gov/documents/cf-standard-names/3/cf-standard-name-table.html</ulink>, and this table may be consulted in order to find the standard name that should be assigned to a variable. |
---|
247 |
</para> |
---|
248 |
|
---|
249 |
<para> |
---|
250 |
Standard names by themselves are not always sufficient to describe a quantity. For example, a variable may contain data to which spatial or temporal operations have been applied. Or the data may represent an uncertainty in the measurement of a quantity. These quantity attributes are expressed as modifiers of the standard name. Modifications due to common statistical operations are expressed via the <varname>cell_methods</varname> attribute (see <xref linkend="cell-methods"/> and <xref linkend="appendix-cell-methods"/>). Other types of quantity modifiers are expressed using the optional modifier part of the <varname>standard_name</varname> attribute. The permissible values of these modifiers are given in <xref linkend="standard-name-modifiers"/>. |
---|
251 |
</para> |
---|
252 |
|
---|
253 |
<example> |
---|
254 |
<title>Use of <varname>standard_name</varname></title> |
---|
255 |
<programlisting> |
---|
256 |
float psl(lat,lon) ; |
---|
257 |
psl:long_name = "mean sea level pressure" ; |
---|
258 |
psl:units = "hPa" ; |
---|
259 |
psl:standard_name = "air_pressure_at_sea_level" ; |
---|
260 |
</programlisting> |
---|
261 |
<para> |
---|
262 |
The description in the standard name table entry for <varname>air_pressure_at_sea_level</varname> clarifies that "sea level" refers to the mean sea level, which is close to the geoid in sea areas. |
---|
263 |
</para> |
---|
264 |
</example> |
---|
265 |
|
---|
266 |
<para> |
---|
267 |
Here are lists of equivalences between the CF standard names and the standard names from the |
---|
268 |
<ulink url="http://www.cgd.ucar.edu/cms/eaton/cf-metadata/ECMWF.html">ECMWF GRIB tables</ulink>, the |
---|
269 |
<ulink url="http://www.cgd.ucar.edu/cms/eaton/cf-metadata/NCEP.html">NCEP GRIB tables</ulink>, and the |
---|
270 |
<ulink url="http://www.cgd.ucar.edu/cms/eaton/cf-metadata/PCMDI.html">PCMDI tables</ulink>. |
---|
271 |
</para> |
---|
272 |
</section> |
---|
273 |
|
---|
274 |
<section id="ancillary-data"> |
---|
275 |
<title>Ancillary Data</title> |
---|
276 |
<para> |
---|
277 |
When one data variable provides metadata about the individual values of another data variable it may be desirable to express this association by providing a link between the variables. For example, instrument data may have associated measures of uncertainty. The attribute <varname>ancillary_variables</varname> is used to express these types of relationships. It is a string attribute whose value is a blank separated list of variable names. The nature of the relationship between variables associated via <varname>ancillary_variables</varname> must be determined by other attributes. The variables listed by the <varname>ancillary_variables</varname> attribute will often have the standard name of the variable which points to them including a modifier (<xref linkend="standard-name-modifiers"/>) to indicate the relationship. |
---|
278 |
</para> |
---|
279 |
|
---|
280 |
<example><title>Instrument data</title> |
---|
281 |
<programlisting> |
---|
282 |
float q(time) ; |
---|
283 |
q:standard_name = "specific_humidity" ; |
---|
284 |
q:units = "g/g" ; |
---|
285 |
q:ancillary_variables = "q_error_limit q_detection_limit" ; |
---|
286 |
float q_error_limit(time) |
---|
287 |
q_error_limit:standard_name = "specific_humidity standard_error" ; |
---|
288 |
q_error_limit:units = "g/g" ; |
---|
289 |
float q_detection_limit(time) |
---|
290 |
q_detection_limit:standard_name = "specific_humidity detection_minimum" ; |
---|
291 |
q_detection_limit:units = "g/g" ; |
---|
292 |
</programlisting> |
---|
293 |
</example> |
---|
294 |
</section> |
---|
295 |
|
---|
296 |
<section id="flags"> |
---|
297 |
<title>Flags</title> |
---|
298 |
<para> |
---|
299 |
The attributes <varname>flag_values</varname> and <varname>flag_meanings</varname> are intended to make variables that contain flag values self describing. The <varname>flag_values</varname> attribute is the same type as the variable to which it is attached, and contains a list of the possible flag values. The <varname>flag_meanings</varname> attribute is a string whose value is a blank separated list of descriptive words or phrases, one for each flag value. If multi-word phrases are used to describe the flag values, then the words within a phrase should be connected with underscores. |
---|
300 |
</para> |
---|
301 |
<example><title>A flag variable</title> |
---|
302 |
<programlisting> |
---|
303 |
byte current_speed_qc(time, depth, lat, lon) ; |
---|
304 |
current_speed_qc:long_name = "Current Speed Quality" ; |
---|
305 |
current_speed_qc:_FillValue = -128b ; |
---|
306 |
current_speed_qc:valid_range = -127b, 127b ; |
---|
307 |
current_speed_qc:flag_values = 0b, 1b, 2b ; |
---|
308 |
current_speed_qc:flag_meanings = "quality_good sensor_nonfunctional |
---|
309 |
outside_valid_range" ; |
---|
310 |
</programlisting> |
---|
311 |
</example> |
---|
312 |
</section> |
---|
313 |
</chapter> |
---|
314 |
|
---|
315 |
|
---|
316 |
|
---|