NF_INQ_VAR_FLETCHER32
The function NF_INQ_VAR_FLETCHER32 returns the checksum settings for a variable in a netCDF-4 file.
NF_INQ_VAR_FLETCHER32(INTEGER NCID, INTEGER VARID, INTEGER CHECKSUM);
NCID
VARID
CHECKSUM
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
NF_BADID
NF_ENOTNC4
NF_ENOTVAR
In this example from nf_test/ftst_vars.F the checksum filter is checked for a file. Since it was turned on for this variable, the checksum variable is set to NF_FLETCHER32.
retval = nf_inq_var_fletcher32(ncid, varid, checksum) if (retval .ne. nf_noerr) call handle_err(retval) if (checksum .ne. NF_FLETCHER32) stop 2