/[MITgcm]/MITgcm/model/src/ini_spherical_polar_grid.F
ViewVC logotype

Diff of /MITgcm/model/src/ini_spherical_polar_grid.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.19 by cnh, Wed Sep 26 18:09:15 2001 UTC revision 1.25 by mlosch, Fri Feb 8 13:01:25 2008 UTC
# Line 70  C      NOTICE the extended range of indi Line 70  C      NOTICE the extended range of indi
70  C     The functions iGl, jGl return the "global" index with valid values beyond  C     The functions iGl, jGl return the "global" index with valid values beyond
71  C     halo regions  C     halo regions
72  C     cnh wrote:  C     cnh wrote:
73  C     >    I don't understand why we would ever have to multiply the  C     >    I dont understand why we would ever have to multiply the
74  C     >    overlap by the total domain size e.g  C     >    overlap by the total domain size e.g
75  C     >    OLx*Nx, OLy*Ny.  C     >    OLx*Nx, OLy*Ny.
76  C     >    Can anybody explain? Lines are in ini_spherical_polar_grid.F.  C     >    Can anybody explain? Lines are in ini_spherical_polar_grid.F.
# Line 300  C--     Calculate vertical face area (vo Line 300  C--     Calculate vertical face area (vo
300          DO J=1-Oly,sNy+Oly          DO J=1-Oly,sNy+Oly
301           DO I=1-Olx,sNx+Olx           DO I=1-Olx,sNx+Olx
302  C         by formula  C         by formula
303            lat=yC(I,J,bi,bj)            lat =0.5 _d 0*(yGloc(I,J)+yGloc(I,J+1))
304            dlon=delX( iGl(I,bi) )            dlon=0.5 _d 0*( delX( iGl(I,bi) ) + delX( iGl(I-1,bi) ) )
305            dlat=0.5*( delY( jGl(J,bj) ) + delY( jGl(J-1,bj) ) )            dlat=0.5 _d 0*( delY( jGl(J,bj) ) + delY( jGl(J-1,bj) ) )
306            rAz(I,J,bi,bj) = rSphere*rSphere*dlon*deg2rad            rAz(I,J,bi,bj) = rSphere*rSphere*dlon*deg2rad
307       &     *abs( sin(lat*deg2rad)-sin((lat-dlat)*deg2rad) )       &     *abs( sin(lat*deg2rad)-sin((lat-dlat)*deg2rad) )
308            IF (abs(lat).GT.90..OR.abs(lat-dlat).GT.90.) rAz(I,J,bi,bj)=0.            IF (abs(lat).GT.90..OR.abs(lat-dlat).GT.90.) rAz(I,J,bi,bj)=0.
309           ENDDO           ENDDO
310          ENDDO          ENDDO
311    
312  C--     Calculate trigonometric terms  C--     Calculate trigonometric terms & grid orientation:
313          DO J=1-Oly,sNy+Oly          DO J=1-Oly,sNy+Oly
314           DO I=1-Olx,sNx+Olx           DO I=1-Olx,sNx+Olx
315            lat=0.5*(yGloc(I,J)+yGloc(I,J+1))            lat=0.5*(yGloc(I,J)+yGloc(I,J+1))
316            tanPhiAtU(i,j,bi,bj)=tan(lat*deg2rad)            tanPhiAtU(I,J,bi,bj)=tan(lat*deg2rad)
317            lat=0.5*(yGloc(I,J)+yGloc(I+1,J))            lat=0.5*(yGloc(I,J)+yGloc(I+1,J))
318            tanPhiAtV(i,j,bi,bj)=tan(lat*deg2rad)            tanPhiAtV(I,J,bi,bj)=tan(lat*deg2rad)
319              angleCosC(I,J,bi,bj) = 1.
320              angleSinC(I,J,bi,bj) = 0.
321           ENDDO           ENDDO
322          ENDDO          ENDDO
323    
# Line 328  C--     Cosine(lat) scaling Line 330  C--     Cosine(lat) scaling
330       &                    **cosPower       &                    **cosPower
331            cosFacV(J,bi,bj)=COS((yC(1,J,bi,bj)-0.5*delY(jG))*deg2rad)            cosFacV(J,bi,bj)=COS((yC(1,J,bi,bj)-0.5*delY(jG))*deg2rad)
332       &                    **cosPower       &                    **cosPower
333              cosFacU(J,bi,bj)=ABS(cosFacU(J,bi,bj))
334              cosFacV(J,bi,bj)=ABS(cosFacV(J,bi,bj))
335            sqcosFacU(J,bi,bj)=sqrt(cosFacU(J,bi,bj))            sqcosFacU(J,bi,bj)=sqrt(cosFacU(J,bi,bj))
336            sqcosFacV(J,bi,bj)=sqrt(cosFacV(J,bi,bj))            sqcosFacV(J,bi,bj)=sqrt(cosFacV(J,bi,bj))
337           ELSE           ELSE
# Line 341  C--     Cosine(lat) scaling Line 345  C--     Cosine(lat) scaling
345         ENDDO ! bi         ENDDO ! bi
346        ENDDO ! bj        ENDDO ! bj
347    
348          IF ( rotateGrid ) THEN
349           CALL ROTATE_SPHERICAL_POLAR_GRID( xC, yC, myThid )
350           CALL ROTATE_SPHERICAL_POLAR_GRID( xG, yG, myThid )
351           CALL CALC_ANGLES( myThid )
352          ENDIF
353    
354        RETURN        RETURN
355        END        END

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.25

  ViewVC Help
Powered by ViewVC 1.1.22