INQATT3() and inqatt3c()

Fortran version:

    LOGICAL FUNCTION INQATT3( FNAME, VNAME, MXATTS, NATTS, ANAMES, ATYPES, ASIZES )
        CHARACTER*(*), INTENT(IN   ) :: FNAME             !  logical file name
        CHARACTER*(*), INTENT(IN   ) :: VNAME             !  vble name, or ALLVARS3
        INTEGER      , INTENT(IN   ) :: MXATTS            !  max number of attributes
        INTEGER      , INTENT(  OUT) :: NATTS             !  number of actual attributes
        CHARACTER*(*), INTENT(  OUT) :: ANAMES( MXATTS )  !  attribute names
        INTEGER      , INTENT(  OUT) :: ATYPES( MXATTS )  !  " types (M3CHAR, M3REAL, M3INT, M3INT8, M3DBLE)
        INTEGER      , INTENT(  OUT) :: ASIZES( MXATTS )  !  " size/length

C version:

inqatt3c() is a C wrapper calling the Fortran INQATT3()
int inqatt3c( const char          * fname ,
              const char          * vname ,
              int                   maxatt ,
              int                   attnamelen ,
              int                 * numatts ,
              char                * attname,
              int                   atype[],
              int                   asize[] )

Summary:

Returns the number of attributes, their names, types, and sizes for the file with logical name FNAME and variable VNAME. If VNAME is the "magic value" ALLVAR3 (= 'ALL', defined in PARMS3.EXT)return the "global" file attribute count, names, types, and sizes.

Returns .TRUE. (or 1) if the operation succeeds, .FALSE. (or 0) if it fails. For failure, writes a log message indicating the nature of the failure.

For Fortran-90 declarations and interface checking:

    USE M3UTILIO
    

Preconditions:

USE M3UTILIO or INCLUDE 'IODECL3.EXT' for Fortran, or #include "iodecl3.h" and #include "fdesc3.h" for C.

I/O API must already be initialized by a call to INIT3().

Names FNAME and VNAME must have length at most 16, exclusive of trailing blanks.

File FNAME must must be netCDF-based rather than "buffered" or "virtual"; it already have been opened by OPEN3() or open3c().

Actual on-file number of attributes must not exceed the maximum, MXATTS3.

See Also:

Fortran Usage:

    ...
    INCLUDE 'IODECL3.EXT'
    INCLUDE 'PARMS3.EXT'
    ...
    <under construction>
    ...

C Usage:

    ...
    #include "iodecl3.h"
    ...
    <under construction>
    ...


Previous: KFWRITE

Next: RDATT3() and RDATTC()

Up: I/O API: Public Routines

To: Models-3/EDSS I/O API: The Help Pages