LOGICAL FUNCTION CHECK3( FNAME, VNAME, JDATE, JTIME ) CHARACTER*(*) FNAME ! file name for query CHARACTER*(*) VNAME ! vble name for query INTEGER JDATE ! date (YYYYDDD) for query INTEGER JTIME ! time (HHMMSS) for query
int check3c( const char * fname , const char * vname , int jdate , int jtime ) ;
check3c()
is a C wrapper calling the FortranCHECK3()
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).
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() ).
... USE M3UTILIO ... ... IF ( CHECK3( 'MYFILE', 'HNO3', 1988021, 123000 ) ) THEN C data-record for variable HNO3, date and time C 12:30 PM Jan. 21, 1988 is available in the file C with logical name MYFILE. ... END IF ... IF ( CHECK3( 'AFILE', 'ALL', 1988021, 123000 ) ) THEN C data-record for every variable for date and time C 12:30 PM Jan. 21, 1988 is available in the file C with logical name AFILE. ... END IF ...
... #include "iodecl3.h" ... if ( check3c( "MYFILE", "HNO3", 1988021, 123000 ) ) { /* data-record for variable HNO3 for date and time 12:30 PM Jan. 21, 1988 is available in the file with logical name MYFILE */ ... } ...
To: Models-3/EDSS I/O API: The Help Pages