Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

Next: , Previous: nc_def_var_endian, Up: Variables


6.15 Learn About Endian Parameters for a Variable: nc_inq_var_endian

The function nc_inq_var_endian returns the endianness settings for a variable in a netCDF-4 file.

Usage

     nc_inq_var_endian(int ncid, int varid, int *endianp);
ncid
NetCDF ID, from a previous call to nc_open or nc_create.
varid
Variable ID.
*endianp
If not-NULL, the nc_inq_var_endian function will set the int pointed to this to NC_ENDIAN_LITTLE if this variable is stored in little-endian format, NC_ENDIAN_BIG if it is stored in big-endian format, and NC_ENDIAN_NATIVE if the endianness is not set, and the variable is not created yet.

Errors

nc_inq_var_endian returns the value NC_NOERR if no errors occurred. Otherwise, the returned status indicates an error.

Possible return codes include:

NC_NOERR
No error.
NC_BADID
Bad ncid.
NC_ENOTNC4
Not a netCDF-4 file.
NC_ENOTVAR
Can't find this variable.

Example


       
 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690