LOGICAL FUNCTION GRDCHK3( FNAME, & P_ALP, P_BET, P_GAM, XCENT, YCENT, & XORIG, YORIG, XCELL, YCELL, & NLAYS, VGTYP, VGTOP, VGLEV ) CHARACTER*(*) FNAME REAL*8 P_ALP ! first, second, third map REAL*8 P_BET ! projection descriptive REAL*8 P_GAM ! parameters. REAL*8 XCENT ! lon for coord-system X=0 REAL*8 YCENT ! lat for coord-system Y=0 REAL*8 XORIG ! X-coordinate origin of grid (map units) REAL*8 YORIG ! Y-coordinate origin of grid REAL*8 XCELL ! X-coordinate cell dimension REAL*8 YCELL ! Y-coordinate cell dimension INTEGER NLAYS ! number of layers INTEGER VGTYP ! grid type: 1=LAT-LON, 2=UTM, ... REAL VGTOP REAL VGLEV( * )
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.
FNAME must have length at most 16.
Call
prior to call. Don't tamper withOPEN3( FNAME... )
DESC3( FNAME )
FDESC3
variables
between DESC3( FNAME )
and GRDCHK3( FNAME... )
USE M3UTILIO
... INCLUDE 'IODECL3.EXT' INCLUDE 'PARMS3.EXT' ... INTEGER NCOLS, NROWS, NLAYS, NTHIK ... IF ( .NOT.OPEN3( 'MYFILE', FSREAD3, 'Myprogram' ) ) THEN C MYFILE could not be opened for read-only ... ELSE IF ( .NOT. DESC3( 'MYFILE' ) ) THEN C ...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 C Inconsistency between these map-projection and grid C definition parameters and the ones from the file C description. GRDCHK3() will write log-messages C detailing what it found. ... END IF ... ...
To: Models-3/EDSS I/O API: The Help Pages