CHECK3() and check3c()

Fortran version:

    LOGICAL FUNCTION  CHECK3( FNAME, VNAME, JDATE, JTIME )
        CHARACTER*(*), INTENT(IN   ) :: FNAME   !  file name for query
        CHARACTER*(*), INTENT(IN   ) :: VNAME   !  vble name for query
        INTEGER      , INTENT(IN   ) :: JDATE   !  date (YYYYDDD) for query
        INTEGER      , INTENT(IN   ) :: JTIME   !  time (HHMMSS) for query

C version:

        int check3c( const char * fname ,
                     const char * vname ,
                     int          jdate ,
                     int          jtime ) ;
    
check3c() is a C wrapper calling the Fortran CHECK3()

Summary:

Returns .TRUE. or 1 if the time step for (JDATE,JTIME) is available in file with logical name FNAME, or .FALSE. or 0 otherwise. If FNAME is time-independent or is a dictionary file, JDATE and JTIME are ignored and only VNAME is significant. If VNAME is the "magic name" ALLVAR3 ( = 'ALL', defined in PARMS3.EXT ), or "ALL" for check3c() ), then TRUE indicates that all variables are available for the specified date and time (FALSE signifies that at least one variable is not available; quite possibly, some variables are available and some not).

If either FNAME or VNAME is invalid, writes an error message indicating the nature of the problem to the log and returns a FALSE (or 0).

Preconditions:

For Fortran-90 declarations and interface checking: USE M3UTILIO or else INCLUDE 'IODECL3.EXT' for Fortran, or #include "iodecl3.h" for C.

FNAME and VNAME must have length at most 16.

JDATE and JTIME must be expressed in terms of Models-3 date and time conventions.

FNAME must already have been opened by OPEN3() or open3c() and the I/O API must have been initialized with INIT3() or init3c() ).

Fortran Usage:

    ...
    USE M3UTILIO
    ...
    ...
    IF ( CHECK3( 'MYFILE', 'HNO3', 1988021, 123000 ) ) THEN
        !!      data-record for variable HNO3, date and time 
        !!      12:30:00 PM Jan. 21, 1988 is available in the file 
        !!      with logical name MYFILE.
        ...
    END IF
    ...
    IF ( CHECK3( 'AFILE', 'ALL', 1988021, 123000 ) ) THEN
        !!      data-record for every variable for date and time 
        !!      12:30:00 PM Jan. 21, 1988 is available in the file 
        !!      with logical name AFILE.
        ...
    END IF
    ...

C Usage:

    ...
    #include "iodecl3.h"
    ...
    if ( check3c( "MYFILE", "HNO3", 1988021, 123000 ) )
        {
            /*  data-record for variable HNO3 for date and time
                12:30:00 PM Jan. 21, 1988 is available in the file
                with logical name MYFILE   */
        ...
        }
    ...


Next: CLOSE3

Up: Public I/O Routines

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