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.

Calling Sequence

NCDF_CONTROL, Cdfid

Arguments

Cdfid

The netCDF ID, returned from a previous call to NCDF_OPEN or NCDF_CREATE.

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:

  • Default Fill Values for netCDF Files

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.

Example

See the examples under NCDF_ATTINQ and NCDF_VARPUT .

See Also

NCDF_CLOSE , NCDF_CREATE , NCDF_OPEN