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: NF90_INQ_TYPEIDS, Up: User Defined Data Types



5.3 Learn About an User Defined Type: NF90_INQ_TYPE

Given an ncid and a typeid, get the information about a type. This function will work on any type, including atomic and any user defined type, whether compound, opaque, enumeration, or variable length array.

For even more information about a user defined type NF90_INQ_USER_TYPE.

Usage

       function nf90_inq_type(ncid, xtype, name, size, nfields)
         integer, intent(in) :: ncid
         integer, intent(in) :: xtype
         character (len = *), intent(out) :: name
         integer, intent(out) :: size
         integer, intent(out) :: nfields
         integer :: nf90_inq_type
NCID
The ncid for the group containing the type (ignored for atomic types).
XTYPE
The typeid for this type, as returned by NF90_DEF_COMPOUND, NF90_DEF_OPAQUE, NF90_DEF_ENUM, NF90_DEF_VLEN, or NF90_INQ_VAR, or as found in netcdf.inc in the list of atomic types (NF90_CHAR, NF90_INT, etc.).
NAME
The name of the user defined type will be copied here. It will be NF90_MAX_NAME bytes or less. For atomic types, the type name from CDL will be given.
SIZEP
The size of the type (in bytes) will be copied here. VLEN type size is the size of one element of the VLEN. String size is returned as zero, since it varies from string to string.

Return Codes

NF90_NOERR
No error.
NF90_EBADTYPEID
Bad typeid.
NF90_ENOTNC4
Seeking a user-defined type in a netCDF-3 file.
NF90_ESTRICTNC3
Seeking a user-defined type in a netCDF-4 file for which classic model has been turned on.
NF90_EBADGRPID
Bad group ID in ncid.
NF90_EBADID
Type ID not found.
NF90_EHDFERR
An error was reported by the HDF5 layer.

Example


       
 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Office of Programs University Corporation for Atmospheric Research (UCAR)   Unidata is a member of the UCAR Office of 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