The CDF_INQUIRE function returns global information about the Common Data Format file. The tags of this structure are described below.
Examples
cdfid = CDF_CREATE('CDFinquire', /HP_ENCODING, /MAC_DECODING)
attr1_id = CDF_ATTCREATE(cdfid, 'GLOBAL_ATT', /GLOBAL_SCOPE)
attr2_id = CDF_ATTCREATE(cdfid,'VARIABLE_ATT', /VARIABLE_SCOPE)
CDF_CONTROL, cdfid, GET_NUMATTRS = num_attrs
PRINT, 'This CDF has ', num_attrs(0), $
'Global attribute(s) and ', num_attrs(1), $
'Variable attribute(s).', $
FORMAT='(A,I2,A,I2,A)'
inquire = CDF_INQUIRE(cdfid)
HELP, inquire, /STRUCT
CDF_DELETE, cdfid
IDL Output
This CDF has 1 Global attribute(s) and 1 Variable attribute(s).
** Structure <4003e0c0>, 9 tags, length=48, refs=1:
NDIMS LONG 0
DECODING STRING 'MAC_DECODING'
ENCODING STRING 'HP_ENCODING'
MAJORITY STRING 'ROW_MAJOR'
MAXREC LONG -1
NVARS LONG 0
NZVARS LONG 0
NATTS LONG 2
DIM LONG Array(1)
Syntax
Result = CDF_INQUIRE(Id)
Return Value
This information is returned in a structure of the form:
{ NDIMS:0L, DECODING:"", ENCODING:"", MAJORITY:"", MAXREC:0L, $
NVARS:0L, NZVARS:0L, NATTS:0L, DIM:LONARR(NDIMS) }
Explanation of the Structure Tags
The structure returned by this function consists of the following tags:
Tag |
Description |
NDIMS |
The longword integer specifying the number of dimensions in the rVariables in the current CDF.
|
DECODING |
A string describing the decoding type set in the CDF file, such as ‘MAC_DECODING’ or ‘ALPHAVMSD_ENCODING’.
|
ENCODING |
A string describing the type of encoding used in the CDF file, such as ‘NETWORK_ENCODING’ or ‘SUN_ENCODING’.
|
MAJORITY |
A string describing the majority used in the CDF file. The majority will be either row (‘ROW_MAJOR’) or column (‘COL_MAJOR’).
|
MAXREC |
A longword integer specifying the highest record number written in the rVariables in the current CDF. The MAXREC field will contain the value -1 if no rVariables have yet been written to the CDF.
|
NVARS |
A longword integer specifying the number of rVariables (regular variables) in the CDF.
|
NZVARS |
A longword integer specifying the number of zVariables in the CDF.
|
NATTS |
A longword integer specifying the number of attributes in the CDF. Note that the number returned in this field includes both global and variable attributes. You can use the GET_NUMATTR keyword to the CDF_CONTROL routine to determine the number of each.
|
DIM |
A vector where each element contains the corresponding dimension size for the rVariables in the current CDF. For 0-dimensional CDF’s, this argument contains a single element (a zero).
|
Arguments
Id
A CDF ID, returned from a previous call to CDF_OPEN or CDF_CREATE.
Keywords
None
Version History
See Also
CDF_CONTROL, CDF_DOC, CDF_LIB_INFO