Next: , Previous: NF_DEF_VAR_FLETCHER32, Up: Variables



6.9 Learn About Fletcher32 Parameters for a Variable: NF_INQ_VAR_FLETCHER32

The function NF_INQ_VAR_FLETCHER32 returns the fletcher32 settings for a variable in a netCDF-4 file.

Usage

     NF_INQ_VAR_FLETCHER32(INTEGER NCID, INTEGER VARID, INTEGER FLETCHER32);
NCID
NetCDF ID, from a previous call to NF_OPEN or NF_CREATE.
VARID
Variable ID.
FLETCHER32
NF_INQ_VAR_FLETCHER32 will set this to 1 if the fletcher32 filter is turned on for this variable, and 0 if it is not.

Errors

NF_INQ_VAR_FLETCHER32 returns the value NF_NOERR if no errors occurred. Otherwise, the returned status indicates an error.

Possible return codes include:

NF_NOERR
No error.
NF_BADID
Bad ncid.
NF_ENOTNC4
Not a netCDF-4 file.
NF_ENOTVAR
Can't find this variable.

Example

In this example from nf_test/ftst_vars.F the fletcher32 filter is checked for a file. Since it was turned on for this variable, the fletcher32 variable is set to 1.

           retval = nf_inq_var_fletcher32(ncid, varid, fletcher32)
           if (retval .ne. nf_noerr) call handle_err(retval)
           if (fletcher32 .ne. 1) stop 2