NF_INQ_VAR_CHUNKING
The function NF_INQ_VAR_CHUNKING returns the chunking settings for a variable in a netCDF-4 file.
NF_INQ_VAR_CHUNKING(INTEGER NCID, INTEGER VARID, INTEGER STORAGE, INTEGER CHUNKSIZES);
NCID
VARID
STORAGE
CHUNKSIZES
NF_INQ_VAR_CHUNKING 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, a variable with chunked storage is checked to ensure that the chunksizes are set to expected values.
C Is everything set that is supposed to be? retval = nf_inq_var_chunking(ncid, varid, storage, chunks_in) if (retval .ne. nf_noerr) call handle_err(retval) if (storage .ne. NF_CHUNKED) stop 2 if (chunks(1) .ne. chunks_in(1)) stop 2 if (chunks(2) .ne. chunks_in(2)) stop 2