The CDF_CONTROL procedure allows you to obtain or set information for a Common Data Format file, its variables, and its attributes.
Makes the attribute specified the current attribute. Either an attribute name or an attribute number may be specified.
Set this keyword to a named variable which will contain information about the current attribute. Information is returned in the form of a structure with the following tags:
{ NUMGENTRIES:0L, NUMRENTRIES:0L, NUMZENTRIES:0L,
MAXGENTRY:0L, MAXRENTRY:0L, MAXZENTRY:0L }
The first three tags contain the number of globals, rVariables, and zVariables associated with the attribute. MAXGENTRY contains the highest index used, and the last two tags contain the highest variable ids used that were used when setting the attribute's value.
Note that an attribute must be set before GET_ATTR_INFO can be used. For example:
Set this keyword to a named variable which will be set equal to the number of 512-byte cache buffers being used for the current
.cdf
file. For discussion about using caches with CDF files, see section 2.1.4 ("Caching Scheme") of the version 2.6
CDF User's Guide
.
Set this keyword to a named variable which will contain the copyright notice of the CDF library now being used by IDL (as opposed to the library that was used to write the current CDF).
Set this keyword to a named variable which will contain the pathname of the current
.cdf
file.
Set this keyword to a named variable which will contain a string describing the CDF Format of the current CDF file. Possible formats are SINGLE_FILE and MULTI_FILE, and can only be set with the CDF_CREATE procedure. For example:
id = CD
F_CREATE('single', /SINGLE_FILE)
Set this keyword to a named variable which will be set equal to the CDF negative to positive floating point 0.0 (NEGtoPOSfp0) mode. In NEGtoPOSfp0 mode, values equal to -0.0 will be converted to 0.0 whenever encountered. By CDF convention, a returned value of -1 indicates that this feature is enabled, a returned value of zero indicates that this feature is disabled.
Set this keyword to a named variable which will contain a two-element array of longs. The first value will contain the number of attributes with global scope, the second value will contain the number of attributes with variable scope. NOTE: attributes with GLOBAL_SCOPE_ASSUMED scope will be included in the global scope count and attributes with VARIABLE_SCOPE_ASSUMED will be included in the count of attributes with variable scope.
Note that you can obtain the total number of attributes using the CDF_INQUIRE routine.
Set this keyword to a named variable which will be set equal to the number of 512-byte cache buffers being used for the current MULTI_FILE format CDF and the rVariable indicated by the VARIABLE keyword. This keyword should only be used for MULTI_FILE CDF files. For discussion about using caches with CDF files, see section 2.1.4 ("Caching Scheme") of the version 2.6 CDF User's Guide .
Set this keyword to a named variable which will be set equal to the CDF readonly mode. By CDF convention a returned value of -1 indicates that the file is in readonly mode, a returned value of zero indicates that the file is not in readonly mode.
Set this keyword to a named variable that will contain information about the current variable. For detailed information about the returned values, consult section 2.3.8 ("RECORDS") of the version 2.6 CDF User's Guide . Information is returned in the form of a structure with the following tags:
{ EXTENDRECS:0L, MAXALLOCREC:0L, MAXREC:0L,
MAXRECS:0L, NINDEXENTRIES:0L, NINDEXRECORDS:0L,
PADVALUE:<as appropriate> }
The EXTENDRECS field will contain the number of records by which the current variable will be extended whenever a new record needs to be added.
The MAXALLOCREC field will contain the maximum record number (zero-based) allocated for the current variable. Records can only be allocated for NOVARY zVariables in SINGLE_FILE format CDFs. When these conditions are not met, the value is set to -1.
The MAXREC field will contain the maximum record number for the current variable. For variables with a record variance of NOVARY this will be at most zero. A value of -1 indicates that no records have been written.
The MAXRECS field will contain the maximum record number (zero-based) of all variables of this type (rVariable or zVariable) in the current CDF. A value of -1 indicates that no records have been written.
The NINDEXENTRIES field will contain the number of index entries for the current variable in the current CDF. This value is -1 unless the current CDF is of SINGLE_FILE format, and the variable is a zVariable.
The NINDEXRECORDS field will contain the number of index records for the current variable in the current CDF. This value is -1 unless the current CDF is of SINGLE_FILE format, and the variable is a zVariable.
The PADVALUE field will contain the value being used to fill locations that are not explicitly filled by the user. If a PADVALUE is not specified, CDF_CONTROL returns an error.
varid = CDF_VARCREATE(fid, 'test')
CDF_CONTROL, fid, GET_VAR_INFO=info, VARIABLE='test'
Set this keyword to a named variable which will be set equal the zMode of the current CDF. In a non-zero zMode, CDF rVariables are temporarily replaced with zVariables. The possible returned values are:
For Information about zModes, consult Section 2.1.2 of the version 2.6 CDF User's Guide .
Set this keyword to a named variable which will be set equal to the number of 512-byte cache buffers being used in the current MULTI_FILE format CDF and the zVariable indicated by the VARIABLE keyword. This keyword should only be used with MULTI_FILE CDF files. For discussion about using caches with CDF files, see section 2.1.4 ("Caching Scheme") of the version 2.6 CDF User's Guide .
Set this keyword equal to the desired number of 512-byte cache buffers to used for the current
.cdf
file. For discussion about using caches with CDF files, see section 2.1.4 ("Caching Scheme") of the version 2.6
CDF User's Guide
.
Set this keyword equal to the number of additional physical records that should be added to the current variable whenever it needs to be extended.
Set this keyword equal to the number of records that should be initially written to the current variable. Note that this keyword should be set before writing any data to the variable.
Set this keyword to a non-zero value to put the current CDF file into negative to positive floating point 0.0 (NEGtoPOSfp0) mode. In this mode, values equal to -0.0 will be converted to 0.0 whenever encountered. Setting this keyword equal to 0 (zero) takes the current CDF file out of NEGtoPOSfp0 mode.
Set this keyword to a non-zero value to put the current CDF file into readonly mode. Set this keyword equal to 0 (zero) to take the current CDF file out of readonly mode.
Set this keyword equal to the desired number of 512-byte cache buffers to used for the rVariable file specified by the VARIABLE keyword. This keyword should only be used with MULTI_FILE CDF files. For discussion about using caches with CDF files, see section 2.1.4 ("Caching Scheme") of the version 2.6 CDF User's Guide.
Set this keyword equal to the desired number of 512-byte cache buffers to used for all rVariable files in the current CDF file or files. This keyword should only be used with MULTI_FILE CDF files. For discussion about using caches with CDF files, see section 2.1.4 ("Caching Scheme") of the version 2.6 CDF User's Guide .
Set this keyword to change the zMode of the current CDF. In a non-zero zMode, CDF rVariables are temporarily replaced with zVariables. Set this keyword to one (1) to change to zMode/1, in which the dimensionality and variances of the variables stay the same. Set this keyword to two (2) to change to zMode/2, in which those dimensions with false variances (NOVARY) are eliminated. For Information about zModes, consult Section 2.1.2 of the version 2.6 CDF User's Guide .
Set this keyword equal to the desired number of 512-byte cache buffers to used for the zVariable's file specified by the VARIABLE keyword. This keyword should only be used with MULTI_FILE CDF files. For discussion about using caches with CDF files, see section 2.1.4 ("Caching Scheme") of the version 2.6 CDF User's Guide .
Set this keyword equal to the desired number of 512-byte cache buffers to used for all zVariable files in the current CDF. This keyword should only be used with MULTI_FILE CDF files. For discussion about using caches with CDF files, see section 2.1.4 ("Caching Scheme" of the version 2.6 CDF User's Guide .
Set this keyword to a name or index to set the current variable. For example,
CDF_CONTROL, id, VAR='MyData', SET_INITIALRECS=20
specifies that the variable MyData should have 20 records written to it initially.
Note that if VARIABLE is set to the index of a zVariable, the ZVARIABLE keyword must also be set. If ZVARIABLE is not set, the variable is assumed to be an rVariable.