INTEGER FUNCTION JSTEP3( JDATE, JTIME, SDATE, STIME, TSTEP ) INTEGER JDATE ! requested date YYYYDDD INTEGER JTIME ! requested time HHMMSS INTEGER SDATE ! starting date YYYYDDD INTEGER STIME ! starting time HHMMSS INTEGER TSTEP ! time step H*MMSS
int JSTEP3( int * jdate, int * jtime, int * sdate, int * stime, int * tstep ) ;
See also subroutines CURRSTEP() and NEXTIME().
#include "iodecl3.h"
if called from C.
... INTEGER JSTEP3 INTEGER JDATE, JTIME, SDATE, STIME, TSTEP ... !! set SDATE:STIME:OUTSTEP for output-file timestep sequence !! and JDATE:JTIME to the model simulation-clock ... DO STEP = 1, NSTEPS .... IF ( JSTEP3( JDATE, JTIME, SDATE, STIME, OUTSTEP ) .GT. 0 ) THEN !! this is a valid time step for the output sequence: ... END IF CALL NEXTIME( JDATE, JTIME, TSTEP ) END DO ...
#include "iodecl3.h" ... int jdate, jtime, sdate, stime, tstep ; int irec ; <type> foo[ MAXRECS ] ; ... irec = JSTEP3( &jdate, &jtime, &sdate, &stime, &tstep ) ; if ( irec > 0 ) { /* jdate:jtime IS a valid element of the sequence */ foo[ irec-1 ] = ... ... } else{ /* jdate:jtime IS NOT a valid element of the sequence */ ... } ; ...
Up: Date-Time Manipulation Routines
To: Models-3/EDSS I/O API: The Help Pages