NOTE: The cf-satellite
mailing list is no longer active. The list archives are made available for historical reasons.
Tom Whittaker wrote: > On Tue, Jun 22, 2010 at 1:42 PM, Tom Rink <rink@xxxxxxxxxxxxx> wrote: > > > > For single band files, will it be necessary to dimension the data array > > like Data(band, y, x) =A0where band is length=3D1, or is there some other > > metadata construct which would allow a band=3D1 dimension in the > > file, but allow Data(y,x), with other band indexed variables like > > wavelength(band)? > > My option: since the application will have to recognize the other > metadata in order to ascertain that this file has "image data", then > it probably could be smart enough to realize that if the "band" > dimension is not part of the shape of the data, that it can (and > should) default to "1". The CF Conventions provide for this, with the concept of s "scalar coordinate variable", defined as: A scalar variable that contains coordinate data. Functionally equivalent to either a size one coordinate variable or a size one auxiliary coordinate variable. In section 2.4, this is further explained: Dimensions may be of any size, including unity. When a single value of some coordinate applies to all the values in a variable, the recommended means of attaching this information to the variable is by use of a dimension of size unity with a one-element coordinate variable. It is also acceptable to use a scalar coordinate variable which eliminates the need for an associated size one dimension in the data variable. The advantage of using a coordinate variable is that all its attributes can be used to describe the single-valued quantity, including boundaries. For example, a variable containing data for temperature at 1.5 m above the ground has a single-valued coordinate supplying a height of 1.5 m, and a time-mean quantity has a single-valued time coordinate with an associated boundary variable to record the start and end of the averaging period. So you could have Data(y,x), a scalar "band" variable, and connnect it with the Data variable through the CF "coordinates" attribute, declare the bounds of the band, etc. float Data (y, x); Data:coordinates = "band y x"; double band; band:bounds = "band_bounds"; double band_bounds(2); band_bounds:units = ...; --Russ
cf-satellite
archives: