LOGICAL FUNCTION DSCGRID( & GNAME, CNAME, & CTYPE, P_ALP, P_BET, P_GAM, XCENT, YCENT, & XORIG, YORIG, XCELL, YCELL, NCOLS, NROWS, NTHIK ) CHARACTER*(*), INTENT(IN ) :: GNAME ! grid sys name CHARACTER*(*), INTENT( OUT) :: CNAME ! coord sys name INTEGER, INTENT( OUT) :: CTYPE ! coord sys type REAL*8 , INTENT( OUT) :: P_ALP ! first, second, third map REAL*8 , INTENT( OUT) :: P_BET ! projection descriptive REAL*8 , INTENT( OUT) :: P_GAM ! parameters REAL*8 , INTENT( OUT) :: XCENT ! lon for coord-system X=0 REAL*8 , INTENT( OUT) :: YCENT ! lat for coord-system Y=0 REAL*8 , INTENT( OUT) :: XORIG ! X-coordinate origin of grid (map units) REAL*8 , INTENT( OUT) :: YORIG ! Y-coordinate origin of grid REAL*8 , INTENT( OUT) :: XCELL ! X-coordinate cell dimension REAL*8 , INTENT( OUT) :: YCELL ! Y-coordinate cell dimension INTEGER, INTENT( OUT) :: NCOLS ! number of grid columns INTEGER, INTENT( OUT) :: NROWS ! number of grid rows INTEGER, INTENT( OUT) :: NTHIK ! BOUNDARY: perimeter thickness (cells) ENTRY DSCOORD( CNAME, CTYPE, P_ALP, P_BET, P_GAM, XCENT, YCENT ) CHARACTER*(*), INTENT(IN ) :: CNAME ! coord sys name INTEGER , INTENT( OUT) :: CTYPE ! coord sys type REAL*8 , INTENT( OUT) :: P_ALP ! first, second, third map REAL*8 , INTENT( OUT) :: P_BET ! projection descriptive REAL*8 , INTENT( OUT) :: P_GAM ! parameters REAL*8 , INTENT( OUT) :: XCENT ! lon for coord-system X=0 REAL*8 , INTENT( OUT) :: YCENT ! lat for coord-system Y=0
int dscgridc( const char * gname , char * cname , int * ctype , double * p_alp , double * p_bet , double * p_gam , double * xcent , double * ycent , double * xorig , double * yorig , double * xcell , double * ycell , int * ncols , int * nrows , int * nthik ) ; int dscoordc( const char * cname , int * ctype , double * p_alp , double * p_bet , double * p_gam , double * xcent , double * ycent ) ;
Main routine DSCGRID() returns TRUE iff it finds the specified grid description in the file with the logical name which is GRIDDESC and is able to put its defining parameters into the appropriate arguments.Entry DSCOORD() returns TRUE iff it finds the specified coordinate system description in the file with logical name GRIDDESC and is able to put its defining parameters into the appropriate arguments.
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.
#include "iodecl3.h"
if called from C.CNAME and GNAME have length at most 16.
File with logical name GRIDDESC exists and contains correctly formatted coordinate system descriptions and grid descriptions.
For Fortran-90 declarations and interface checking:USE M3UTILIO(See sample programs LATLON or PRESZ for additional usage examples.)
... CHARACTER*16 CNAME ! coord sys name INTEGER CTYPE ! coord sys type 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 NCOLS ! number of grid columns INTEGER NROWS ! number of grid rows INTEGER NTHIK ! BOUNDARY: perimeter thickness (cells) ... ... !!.... get coordinate system description for the coord system MM4_DOT: CALL DSCOORD( 'MM4_DOT', CTYPE, P_ALP, P_BET, P_GAM, XCENT, YCENT ) ... !!.... get grid description for the grid ALPHA_CROSS_1: CALL DSCGRID( 'ALPHA_CROSS_1', CNAME, & CTYPE, P_ALP, P_BET, P_GAM, XCENT, YCENT, & XORIG, YORIG, XCELL, YCELL, NCOLS, NROWS, NTHIK ) ...
What you'd expect...
Next: FIND1, FIND2, FIND3, FIND4
Up: Coordinate and Grid Related Routines
To: Models-3/EDSS I/O API: The Help Pages