6.11 Learn About Endian Parameters for a Variable: NF90_INQ_VAR_ENDIAN
The function NF90_INQ_VAR_ENDIAN returns the endianness settings for a
variable in a netCDF-4 file.
Usage
function nf90_inq_var_endian(ncid, varid, endian)
integer, intent(in) :: ncid
integer, intent(in) :: varid
integer, intent(out) :: endian
integer :: nf90_inq_var_endian
NCID- NetCDF ID, from a previous call to NF90_OPEN or NF90_CREATE.
VARID- Variable ID.
ENDIAN- NF90_INQ_VAR_ENDIAN will set this to NF90_ENDIAN_LITTLE if this variable
is stored in little-endian format, NF90_ENDIAN_BIG if it is stored in
big-endian format, and NF90_ENDIAN_NATIVE if the endianness is not set,
and the variable is not created yet.
Errors
NF90_INQ_VAR_ENDIAN returns the value NF90_NOERR if no errors
occurred. Otherwise, the returned status indicates an error.
Possible return codes include:
NF90_NOERR- No error.
NF90_BADID- Bad ncid.
NF90_ENOTNC4- Not a netCDF-4 file.
NF90_ENOTVAR- Can't find this variable.
Example