[Proj] proj4 definition for transverse mercator projection from RegCM3 model for North America

haileye haileyeckstrand at gmail.com
Tue Aug 10 16:02:06 PDT 2010


The projection type was not originally named transverse mercator. The reason
that was entered was due to the netcdf metadata requirements not having
rotated mercator projection as an option. The projection is rotated
mercator. The RegCM3 source code Melita referred to when finding the earth
radius is included below.  I am not very experienced with this level of
detail. Is anyone able to read this fortran code & properly define what the
projection type should be (ex. swiss oblique mercator, oblique mercator) and
what parameters I may be missing for the proj string (ex. +alpha ?, what
does S**-1 mean?)

Again, the parameters provided were: 
"transverse_mercator" ;
               Transverse_Mercator:longitude_of_central_meridian = -97. ;
               Transverse_Mercator:latitude_of_projection_origin = 47.5 ;
               Transverse_Mercator:scale_factor_at_central_meridian = 1. ;
               Transverse_Mercator:false_easting = 3925000. ;
               Transverse_Mercator:false_northing = 3175000. ;

Here is the fortran code:
This code was obtained from:
http://www.ictp.trieste.it/~pubregcm/RegCM3/regcm.tar.gz
This is a subroutine located within:
RegCM/PreProc/Terrain/terrain.f

CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
      SUBROUTINE ROTMER( XLON, XLAT, XMAP, CORIOL, IY, JX
     A                 , CLON,CLAT, POLLON, POLLAT, DS, IDOT)
      implicit none
C---------------------------------------------------------------------
C  COMPUTE LATS, LONS, MAP-SCALE FACTORS, AND CORIOLIS PARAMETER FOR
C  ROTATED POLE MAP CENTERED AT CLON,CLAT. ORIGIN OF ROTATED GRID IS
C  GIVEN BY POLLON AND POLLAT.
C  IMX,JMX,KSV,KSH AND LSIG2 MUST CORRESPOND TO IY,JMAX,KSTRPV,KSTRPH
C  AND NVERT2 IN THE MASTER INPUT FILE; OTHERWISE THE PROGRAM WILL
C  ABORT:LMX MUST BE THE MAXIMUM NUMBER OF LEVELS (PRESSURE--OR--SIGMA)
C  IMAXN AND IMXC ARE NESTED AND NON-EXPANDED GRID DIMENSIONS. IMXC IS
C  EQUAL TO IMX IF YOU ARE NOT USING THE EXPANDED GRID. SAME FOR J.

      INTEGER IY,JX,IDOT
      REAL*4  XLAT(IY,JX),XLON(IY,JX), CORIOL(IY,JX),XMAP(IY,JX)
      REAL*4  CLON,CLAT,POLLON,POLLAT,DS
C
      REAL*4  XOMEGA,d2r,r2d,A,CNTRJ,CNTRI,DDEG,XOFF,YOFF
      REAL*4  XR,YR,X,Y,FAI,XOMEGA2
      INTEGER I,J
C
      XOMEGA = 7.2722E-5                       ! ANG. ROT OF EARTH IN S**-1
      d2r = ATAN(1.)/45.                     ! CONVERT DEGREES TO RADIANS
      r2d = 1./d2r                         ! CONVERT RADIANS TO DEGREES
      A = 6371229.                             ! RADIUS OF EARTH IN METERS
C-----CENTER OF GRID
      CNTRJ = (JX+IDOT)/2.
      CNTRI = (IY+IDOT)/2.

      DDEG=DS*r2d/A                          ! GRID SPACING IN DEGREES
      XOFF=CLON-POLLON
      YOFF=clat-pollat
C-----CALCULATE X AND Y POSITIONS OF GRID
      DO 41 I=1,IY
      DO 41 J=1,JX
        XR = XOFF + (J-CNTRJ)*DDEG
        YR = YOFF + (I-CNTRI)*DDEG
C-----NOW CALCULATE LAT AND LON OF THIS POINT
C-----  ROTATE COORDINATES BACK TO NONRATED POLE
        CALL ROT2NROT(XR,YR,POLLON,pollat,X,Y)
        XLON(I,J) = X
        XLAT(I,J) = Y
        FAI = d2r*YR
        XMAP(I,J) = 1.0/COS(FAI)
   41 CONTINUE

      IF(IDOT.EQ.1) THEN
         XOMEGA2=2.*XOMEGA
         DO 45 I=1,IY
         DO 45 J=1,JX
            CORIOL(I,J)=XOMEGA2*SIN(XLAT(I,J)*d2r)
   45    CONTINUE
      END IF

      RETURN
      END



-- 
View this message in context: http://osgeo-org.1803224.n2.nabble.com/proj4-definition-for-transverse-mercator-projection-from-RegCM3-model-for-North-America-tp5322756p5410338.html
Sent from the PROJ.4 mailing list archive at Nabble.com.



More information about the Proj mailing list