NF_INQ_VAR_ENDIAN
The function NF_INQ_VAR_ENDIAN returns the endianness settings for a variable in a netCDF-4 file.
NF_INQ_VAR_ENDIAN(INTEGER NCID, INTEGER VARID, INTEGER ENDIAN)
NCID
VARID
ENDIAN
NF_INQ_VAR_ENDIAN 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 endianness of a variable is checked to make sure it is NF_ENDIAN_BIG.
retval = nf_inq_var_endian(ncid, varid, endianness) if (retval .ne. nf_noerr) call handle_err(retval) if (endianness .ne. NF_ENDIAN_BIG) stop 2