Consider that the pressure levels in the wind vector example
have measured uncertainties of
for all wind components, horizontal
locations, and times. If the indices start numbering from 0,
then we have the following auxiliary record
fields:
In IDL, then, code to define the auxiliary information for this data object would look like this (using the basic structure as already given in Section 3.2.2):
; set up the relevant elements in the OBJDESC record
RECTYPE = long(1)
NDIM0 = long(1)
NDIM1 = long(2)
NDIM2 = long(2)
NDIM3 = long(0)
NAUX = long(1)
.
.
.
writeu,log_file_unit, RECTYPE, vartype, reserved $
, NDIM0, NDIM1, NDIM2, NDIM3, reserved, isource $
, reserved, reserved, naudit, ninfo, ncomms, comcod $
, reserved, nbads, reserved, nprocs, reserved, npacks $
, reserved, NAUX, cmpnum, reserved, reserved, reserved
; set up the dimensional information, bad data values,
; packing information, and processing information
.
.
.
; set up the relevant elements for the AUXSPEC record
RECTYPE = long(80)
; only one record group
RECSORT = long(0)
; there is only one dimension with uncertainties:
; pressure
NUMREF = long(1)
; the uncertainties vary only with pressure, therefore,
; AUXVAL.AVALS has one dimension
NUMAPP = long(1)
; this covers the entire range of the data
START = long( [0, 0, 0, 0, 0] )
ENDIT = long( [-1, -1, -1, -1, -1] )
; the uncertainties are floating-point numbers
AUXFMT = long(67108864)
; the quantities are measured uncertainties
AUXTYPE = long(262144)
; the units are in millibars
UNITS = long(1081593921)
; there are no supplemental values
NUMSUP = long(0)
write,log_file_unit, RECTYPE, RECSORT, NUMREF, NUMAPP $
, START, ENDIT, AUXFMT, AUXTYPE, UNITS, NUMSUP $
, reserved, reserved
; set up the indices in the AUXRANGE record
RECTYPE = long(81)
; only one record group
RECSORT = long(0)
; the uncertainties refer to pressure (the third index
; in the Level 1 dimensions)
REFLEV = long(1)
REFNDEX = long(2)
; the uncertainties only vary over pressure (the
; third index in the Level 1 dimensions)
APPLEV = long(1)
APPNDEX = long(2)
write,log_file_unit, RECTYPE, RECSORT, REFLEV, REFNDEX $
, APPLEV, APPNDEX, reserved, reserved
; set up the auxiliary information in the AUXVAL record
RECTYPE = long(82)
; only one record group
RECSORT = long(0)
AVALS = (7., 5., 5., 2., 1., 1.)
write,log_file_unit, RECTYPE, RECSORT, AVALS