GRDCHK3()

Fortran version:

    LOGICAL FUNCTION GRDCHK3( FNAME, 
     &                            P_ALP, P_BET, P_GAM, XCENT, YCENT,
     &                            XORIG, YORIG, XCELL, YCELL,
     &                            NLAYS, VGTYP, VGTOP, VGLEV )
        CHARACTER*(*), INTENT(IN   ) :: FNAME
        REAL*8       , INTENT(IN   ) :: P_ALP      ! first, second, third map
        REAL*8       , INTENT(IN   ) :: P_BET      ! projection descriptive
        REAL*8       , INTENT(IN   ) :: P_GAM      ! parameters.
        REAL*8       , INTENT(IN   ) :: XCENT      ! lon for coord-system X=0
        REAL*8       , INTENT(IN   ) :: YCENT      ! lat for coord-system Y=0
        REAL*8       , INTENT(IN   ) :: XORIG      ! X-coordinate origin of grid (map units)
        REAL*8       , INTENT(IN   ) :: YORIG      ! Y-coordinate origin of grid
        REAL*8       , INTENT(IN   ) :: XCELL      ! X-coordinate cell dimension
        REAL*8       , INTENT(IN   ) :: YCELL      ! Y-coordinate cell dimension
        INTEGER      , INTENT(IN   ) :: NLAYS      ! number of layers
        INTEGER      , INTENT(IN   ) :: VGTYP      ! grid type:  1=LAT-LON, 2=UTM, ...
        REAL         , INTENT(IN   ) :: VGTOP
        REAL         , INTENT(IN   ) :: VGLEV( * )

No C version yet

Summary:

Checks FDESC3 coordinate and grid description variables against description provided as arguments. (If NLAYS = 1, does not check vertical coordinate values.)

Returns .TRUE. (or 1) iff the file is already open, and has the user-supplied indicated file type and grid/array dimensions.

For Fortran-90 declarations and interface checking:

    USE M3UTILIO
    

Preconditions:

USE M3UTILIO

I/O API must already be initialized by a call to INIT3() .

FNAME must have length at most 16.

Call

OPEN3( FNAME... )
DESC3( FNAME )
prior to call. Don't tamper with FDESC3 variables between DESC3( FNAME ) and GRDCHK3( FNAME... )

See Also:

Fortran Usage:

See sample program VERTINTEGRAL for an additional usage example.

    ...
    USE M3UTILIO
    ...
    INTEGER NCOLS, NROWS, NLAYS, NTHIK
    ...
    IF ( .NOT.OPEN3( 'MYFILE', ... ) ) THEN
        !!      MYFILE could not be opened
        ...
    ELSE IF ( .NOT. DESC3( 'MYFILE' ) ) THEN
        !!    ...DESC3() failed for MYFILE
        ...
    ELSE IF ( .NOT. GRDCHK3( FNAME, 
     &                       P_ALP, P_BET, P_GAM, XCENT, YCENT,
     &                       XORIG, YORIG, XCELL, YCELL,
     &                       NLAYS, VGTYP, VGTOP, VGLEV ) THEN
        !!    Inconsistency between these map-projection and grid
        !!    definition parameters and the ones from the file
        !!    description.  GRDCHK3() will write log-messages
        !!    detailing what it found. 
        ...
    END IF
    ...
    ...


Previous: FILCHK3

Next: IOPARMS3

Up: I/O API: Public Routines

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