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( * )
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
USE M3UTILIO
I/O API must already be initialized by a call to INIT3() .
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 ... 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 ... ...
To: Models-3/EDSS I/O API: The Help Pages