CDF_VARINQ
The
CDF_VARINQ function returns a structure containing information about the specified
variable in a Common Data Format file. This structure has the form:
{ IS_ZVAR:0, NAME:"", DATATYPE:"", NUMELEM:0L, $
RECVAR:"", DIMVAR:BYTARR(...) [, DIM:LONARR(...)]}
Note: the DIM field is included in the structure only if IS_ZVAR is one. This structure's tags are explained below.
Calling Sequence
Result = CDF_VARINQ(
Id, Variable
)
Arguments
Id
The CDF ID, returned from a previous call to CDF_OPEN or CDF_CREATE.
Variable
A string containing the name of the variable
or
the variable number being inquired.
Keywords
ZVARIABLE
If
Variable
is a variable ID (as opposed to a variable name) and the variable is a zVariable, set this flag to indicate that the variable ID is a zVariable ID. The default is to assume that
Variable
is an rVariable ID.
Explanation of the Structure Tags
IS_ZVAR
This field will contain a 1 if the variable is a zVariable or a 0 if it is an rVariable.
NAME
The name of the variable.
DATATYPE
A string describing the data type of the variable. The string has the form
'CDF_XXX'
where
XXX
is FLOAT, DOUBLE, EPOCH, UCHAR, etc.
NUMELEM
The number of elements of the data type at each variable value. This is always 1 except in the case of string type variables (CDF_CHAR, CDF_UCHAR).
RECVAR
A string describing the record variance of the variable. This is either the string
'VARY'
or
'NOVARY'
.
DIMVAR
An array of bytes. The value of each element is zero if there is no variance with that dimension and one if there is variance. For zero-dimensional CDFs, DIMVAR will have one element whose value is zero.
DIM
An array of longs. The value of each element corresponds to the dimension of the variable. This field is only included in the structure if the variable is a zVariable.