READSMET()

Fortran version:

    LOGICAL FUNCTION READSMET( FDEV, JDATE, JTIME, 
   &                         NBORD, SBORD, EBORD, WBORD, 
   &                         MAXMET, NMET, IMET, RMET )
    INTEGER FDEV                       !  unit number for input file
    INTEGER JDATE, JTIME               !  GMT date and time requested
    REAL    NBORD, SBORD, EBORD, WBORD !  acceptance window borders
    INTEGER MAXMET                     !  max number of stationsallowed
    INTEGER NMET                       !  number of stations found
    INTEGER IMET ( MAXMET )            !  array of station ID's
    REAL    RMET ( 16, MAXMET )        !  station data

C version: none

Summary:

This should be considered obsolete—no more than a piece of example-code of how to do proper encapsulation of sequential-file handling—since they've changed the ASCII-surface-met-file format so many times since it was written ;-(

READSMET() reads one hour's data for stations within the geographic window

 
        SBORD <= latitude <= NBORD 
	WBORD <= longitude <= EBORD
    
from a SURMET-format surface meteorology observations file opened on unit FDEV. It handles file indexing and header internally, requiring ONE READ PER HOUR. Returns .TRUE. iff the read was successful. If
        100 * JDATE + JTIME/10000 <= 0 , 
    
READSMET() sets JDATE:JTIME to file FDEV's starting date and time and rewinds FDEV. (This may be used to find the starting date and time for the file.) Station data as returned by READSMET() has the following structure:

Preconditions:

1: Set environment variable SURMET_INT_IDS to TRUE iff station IDs are (WBAN) integers in the ROM 2.2 style (instead of character-string IDs of earlier styles).

2: FDEV is in the range 1:100 (e.g., as returned by junit() or PROMPTFFILE())

3: FDEV is the unit number for SURMET-format file already opened by the caller.

4: DATE:JTIME represents Greenwich Mean Time expressed according to EDSS/Models-3 date and time conventions

Fortran Usage:

See example program SFCMET.


Previous: PROMPTMFILE

Next: SETENV

Up: Utility Routines

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