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

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

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

revision 1.12 by adcroft, Wed Dec 9 16:11:52 1998 UTC revision 1.15 by cnh, Sun Feb 4 14:38:47 2001 UTC
# Line 1  Line 1 
1  C $Header$  C $Header$
2    C $Name$
3    
4  #include "CPP_OPTIONS.h"  #include "CPP_OPTIONS.h"
5    
# Line 48  CEndOfInterface Line 49  CEndOfInterface
49    
50  C     == Local variables ==  C     == Local variables ==
51  C     xG, yG - Global coordinate location.  C     xG, yG - Global coordinate location.
 C     zG  
52  C     xBase  - South-west corner location for process.  C     xBase  - South-west corner location for process.
53  C     yBase  C     yBase
54  C     zUpper - Work arrays for upper and lower  C     zUpper - Work arrays for upper and lower
# Line 62  C     bi,bj  - Loop counters Line 62  C     bi,bj  - Loop counters
62  C     zUpper - Temporary arrays holding z coordinates of  C     zUpper - Temporary arrays holding z coordinates of
63  C     zLower   upper and lower faces.  C     zLower   upper and lower faces.
64  C     I,J,K  C     I,J,K
65        _RL    xG, yG, zG        _RL    xGloc, yGloc
       _RL    phi  
       _RL    zUpper(Nr), zLower(Nr)  
66        _RL    xBase, yBase        _RL    xBase, yBase
67        INTEGER iG, jG        INTEGER iG, jG
68        INTEGER bi, bj        INTEGER bi, bj
69        INTEGER  I,  J, K        INTEGER  I,  J
70    
71  C--   Simple example of inialisation on cartesian grid  C--   Simple example of inialisation on cartesian grid
72  C--   First set coordinates of cell centers  C--   First set coordinates of cell centers
# Line 90  C     Set up my local grid first Line 88  C     Set up my local grid first
88          DO j=1,jG-1          DO j=1,jG-1
89           yBase = yBase + delY(j)           yBase = yBase + delY(j)
90          ENDDO          ENDDO
91          yG = yBase          yGloc = yBase
92          DO J=1,sNy          DO J=1,sNy
93           xG = xBase           xGloc = xBase
94           DO I=1,sNx           DO I=1,sNx
95            xc(I,J,bi,bj)  = xG + delX(iG+i-1)*0.5 _d 0            xG(I,J,bi,bj)  = xGloc
96            yc(I,J,bi,bj)  = yG + delY(jG+j-1)*0.5 _d 0            yG(I,J,bi,bj)  = yGloc
97            xG = xG + delX(iG+I-1)            xc(I,J,bi,bj)  = xGloc + delX(iG+i-1)*0.5 _d 0
98              yc(I,J,bi,bj)  = yGloc + delY(jG+j-1)*0.5 _d 0
99              xGloc = xGloc + delX(iG+I-1)
100            dxF(I,J,bi,bj) = delX(iG+i-1)            dxF(I,J,bi,bj) = delX(iG+i-1)
101            dyF(I,J,bi,bj) = delY(jG+j-1)            dyF(I,J,bi,bj) = delY(jG+j-1)
102           ENDDO           ENDDO
103           yG = yG + delY(jG+J-1)           yGloc = yGloc + delY(jG+J-1)
104          ENDDO          ENDDO
105         ENDDO         ENDDO
106        ENDDO        ENDDO
# Line 160  C     Calculate vertical face area Line 160  C     Calculate vertical face area
160            rA (I,J,bi,bj) = dxF(I,J,bi,bj)*dyF(I,J,bi,bj)            rA (I,J,bi,bj) = dxF(I,J,bi,bj)*dyF(I,J,bi,bj)
161            rAw(I,J,bi,bj) = dxC(I,J,bi,bj)*dyG(I,J,bi,bj)            rAw(I,J,bi,bj) = dxC(I,J,bi,bj)*dyG(I,J,bi,bj)
162            rAs(I,J,bi,bj) = dxG(I,J,bi,bj)*dyC(I,J,bi,bj)            rAs(I,J,bi,bj) = dxG(I,J,bi,bj)*dyC(I,J,bi,bj)
163              rAz(I,J,bi,bj) = dxV(I,J,bi,bj)*dyU(I,J,bi,bj)
164            tanPhiAtU(I,J,bi,bj) = 0. _d 0            tanPhiAtU(I,J,bi,bj) = 0. _d 0
165            tanPhiAtV(I,J,bi,bj) = 0. _d 0            tanPhiAtV(I,J,bi,bj) = 0. _d 0
166           ENDDO           ENDDO

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.15

  ViewVC Help
Powered by ViewVC 1.1.22