KFINDX()

Fortran version:

    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

C version:

not yet implemented

Summary:

Reads the event descriptions for the indicated 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,

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.

Preconditions:

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.

See Also:

Fortran Usage:

    ...
    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
    ...

C Usage:

Don't, unless you know what you're doing with multi-lingual programming.


Previous: XTRACT3

Next: KFOPEN

Up: I/O API: Public Routines

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