GRIDDESC

GRIDDESC is the logical name for text files which store horizontal coordinate and grid descriptions, and which is read by the DSCGRID() and DSCOORD() utility routines. This file has two segments. The first segment has a 1-line header that is always ignored (and which by convention provides titles for the columns in the data records), a sequence of data records, and a terminal record with name field blank (i.e. ' ').

The first segment is the coordinate-system-description segment and consists of text records giving coordinate-system name and descriptive parameters P_ALP, P_BET, P_GAM, XCENT, and YCENT. Note that the standard names for UTM coordinate systems are given in the form UTM_<nn>, where nn is the number for the UTM zone. Most of the Eastern US would use coordinate system UTM_17, for example.

The second segment is the grid-description segment, and consists of text records giving grid name, related coordinate-system name and descriptive parameters XORIG, YORIG, XCELL, YCELL, NCOLS, NROWS, and NTHIK. In the usual EDSS modeling situation, there will be both "dot-point" and "cross-point" grids present (these grids are topological duals in the sense that the vertices (corners) of one correspond to the cell-centers of the other. The interpretation of parameters XORIG, YORIG, XCELL, and YCELL for a dot-point and cross-point pair of grids is indicated in the accompanying diagram, available in Postscript, X bit-map, JPEG, and GIF image formats. A similar diagram showing the relationship between a cross-point grid and a general (thickened) boundary structure is also available in Postscript, X bit-map, JPEG, and GIF image formats.

Each data record in these files consists of two or three Fortran-style list-formatted lines (i.e., items are separated by either blanks or commas). Name fields are quoted strings, and appear on the first of these lines. Numeric fields are given in double precision, and occur on either the second line or the second and third (this allows you to organize the text so that it is easily viewed in a text editor without running off-screen). The records have the following organization, depending upon whether they are in the first or second segments.

    
    COORD-NAME
    COORDTYPE, P_ALP, P_BET, P_GAM
    XCENT, YCENT
    
        or
    
    COORD-NAME
    COORDTYPE, P_ALP, P_BET, P_GAM, XCENT, YCENT
    
        and
    
    GRID-NAME
    COORD-NAME, XORIG, YORIG, XCELL, YCELL
    NCOLS, NROWS, NTHIK
    
        or
    
    GRID-NAME
    COORD-NAME, XORIG, YORIG, XCELL, YCELL, NCOLS, NROWS, NTHIK
    

Peculiarities of this file-organization are partly due to the characteristics of Fortran list-directed input formatting, so that the "guts" of the DSCGRID() routine does not have to be an elaborate parser but may have a simple structure looking somewhat like

...
READ( GDEV,'(A)' ) HEADER
...
READ(GDEV,*) NAME
IF ( NAME .NE. ' ' ) THEN
    READ(GDEV,*)COORDTYPE,P_ALP,P_BET,P_GAM,XCENT,YCENT
    ...

At most 32 coordinate systems and 256 grids may be listed in one of these files. These files are small enough to be archived easily with a study, and have a sufficiently simple format that new ones can easily be constructed "by hand."

A sample GRIDDESC file is available, describing the main computational grids for the SMRAQ regional seasonal modeling effort (part of the Southern Oxidant Study), the OTAG study, all of the standard ROM AQM computational grids, and all of the standard Urban Airshed Model computational grids.

Logical function DSCGRID() manages access to GRIDDESC (in fact, serves as an operational definition of the GRIDDESC file format), and gets grid and coordinate system descriptive parameters COORDNAME, P_ALP, P_BET, P_GAM, XCENT, YCENT, XORIG, YORIG, XCELL, YCELL, NCOLS, NROWS, and NTHIK for the specified grid name. Returns TRUE iff the requested grid is found in the GRIDDESC file. LOGICAL ENTRY DSCOORD() of DSCGRID() gets coordinate-system descriptive parameters P_ALP, P_BET, P_GAM, XCENT, and YCENT for the specified coordinate system name (also returning TRUE iff the coordinate system is found in the GRIDDESC file).

Next Section: Grids and Coordinate Systems

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