NCDF_CONTROL
The NCDF_CONTROL procedure performs miscellaneous NetCDF operations.
Different options are controlled by keywords. Only one keyword can be specified in any call to NCDF_CONTROL, unless the OLDFILL keyword is specified.
Examples
See the examples under NCDF_ATTINQ and NCDF_VARPUT.
Syntax
NCDF_CONTROL, Cdfid [, /ABORT] [, /ENDEF] [, /FILL | , /NOFILL] [, /NOVERBOSE | , /VERBOSE] [, OLDFILL=variable] [, /REDEF] [, /SYNC]
Arguments
Cdfid
The NetCDF ID, returned from a previous call to NCDF_OPEN, NCDF_CREATE, or NCDF_GROUPDEF.
Keywords
ABORT
Set this keyword to close a NetCDF file that is not in define mode. If the file is being created and is still in define mode, the file is deleted. If define mode was entered by a call to NCDF_CONTROL with the REDEF keyword, the NetCDF file is restored to its state before definition mode was entered, and the file is closed.
ENDEF
Set this keyword to take an open NetCDF file out of define mode (and into data mode).
FILL
Set this keyword so that data in the NetCDF file is pre-filled with default fill values. The default values (which cannot be changed) are:
Data Type |
Fill Value |
BYTE |
0 |
CHAR |
0 |
SHORT |
-32767 |
LONG |
-2147483647 |
FLOAT |
9.96921E+36 |
DOUBLE |
9.96921E+36 |
NOFILL
Set this keyword so that data in the NetCDF file is not pre-filled. This option saves time when it is certain that variable values will be written before a read is attempted.
NOVERBOSE
Set this keyword to suppress the printing of NetCDF error messages. Cdfid is required but not used.
OLDFILL
This keyword specifies a named variable in which the previous fill value is returned. This keyword can only be used in combination with the FILL or NOFILL keywords. For example:
NCDF_CONTROL, id, FILL=1, OLDFILL=previous_fill
REDEF
Set this keyword to put an open NetCDF file into define mode.
SYNC
Set this keyword to update the disk copy of a NetCDF file that is open for writing. The NetCDF file must be in data mode. A NetCDF file in define mode will be updated only when NCDF_CONTROL is called with the ENDEF keyword.
VERBOSE
Set this keyword to cause NetCDF error messages to be printed. Cdfid is required but not used. For example:
NCDF_CONTROL, 0, /VERBOSE
is a valid command even if 0 is not a valid NetCDF file ID.
Version History
Pre 4.0 |
Introduced |