LOGICAL FUNCTION KFINDX( FNAME, COL, ROW, & ECOUNT, SDATES, STIMES, KFLENS, EVENTS ) CHARACTER*(*), INTENT(IN ) :: FNAME ! file name for query INTEGER, INTENT(IN ) :: COL ! column number for this event INTEGER, INTENT(IN ) :: ROW ! row number for this event INTEGER, INTENT( OUT) :: ECOUNT ! # of events for this col-row INTEGER, INTENT( OUT) :: SDATES(*) ! starting date, formatted YYYYDDD INTEGER, INTENT( OUT) :: STIMES(*) ! starting time, formatted HHMMSS INTEGER, INTENT( OUT) :: KFLENS(*) ! event duration, formatted HHMMSS INTEGER, INTENT( OUT) :: EVENTS(*) ! event numbers
COL
and
ROW
from the EDSS/Models-3 I/O API
KF event file with
logical name FNAME
.
For the returned values for this COL
and ROW
,
ECOUNT
is the current number of events.
SDATES(1, ..., ECOUNT )
is an array of KF
event starting dates, formatted YYYYDDD
STIMES(1, ..., ECOUNT )
is an array of KF
event starting times, formatted HHMMSS
KFLENS(1, ..., ECOUNT )
is an array of KF
event event durations, formatted HHMMSS
EVENTS(1, ..., ECOUNT )
is an array of KF
event numbers (as used by
KFREAD() and
KFWRITE()).
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.
KFINDX() is OpenMP thread-safe.
INCLUDE 'IODECL3.EXT'
and
INCLUDE 'FDESC3.EXT'
.
I/O API must already be initialized by a call to INIT3() .
FNAME must have length at most 16.
FNAME must already have been opened by OPEN3() or KFOPEN().
Dimensionality of the SDATES, STIMES, KFLENS, EVENTS
arguments should be at least the NTHIK3D
for the
file FNAME
.
... INCLUDE 'IODECL3.EXT' INCLUDE 'PARMS3.EXT' ... INTEGER NCOLS, NROWS, NLAYS, NTHIK PARAMETER ( NCOLS = ??, NROWS = ??, NLAYS = ??, NTHIK = ?? ) ... INTEGER ECOUNT ! # of events for this col-row INTEGER SDATES(NTHIK) ! starting date, formatted YYYYDDD INTEGER STIMES(NTHIK) ! starting time, formatted HHMMSS INTEGER KFLENS(NTHIK) ! event duration, formatted HHMMSS INTEGER EVENTS(NTHIK) ! event numbers INTEGER C, R ... DO R = 1, NROWS DO C = 1, NCOLS IF ( KFINDX( 'MYFILE', C, R, & ECOUNT, SDATES, STIMES, KFLENS, EVENTS ) THEN C For I=1 to ECOUNT, there are KF-events at (C,R), with C time periods starting at SDATES(I),STIMES(I), durations KFLENS(I) C and event numbers EVENTS(I) (for use with KFREAD()) ... ELSE C Error: see program log for further info. ... END IF ... END DO END DO ...
To: Models-3/EDSS I/O API: The Help Pages