/[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.7 by adcroft, Thu Jul 2 14:16:24 1998 UTC revision 1.13 by adcroft, Mon Mar 27 22:25:44 2000 UTC
# Line 1  Line 1 
1  C $Header$  C $Header$
2    
3  #include "CPP_EEOPTIONS.h"  #include "CPP_OPTIONS.h"
4    
5  CStartOfInterface  CStartOfInterface
6        SUBROUTINE INI_CARTESIAN_GRID( myThid )        SUBROUTINE INI_CARTESIAN_GRID( myThid )
# Line 33  C     | Under the cartesian grid mode pr Line 33  C     | Under the cartesian grid mode pr
33  C     | and Y are in metres. Disktance in Z are in m or Pa       |  C     | and Y are in metres. Disktance in Z are in m or Pa       |
34  C     | depending on the vertical gridding mode.                 |  C     | depending on the vertical gridding mode.                 |
35  C     \==========================================================/  C     \==========================================================/
36          IMPLICIT NONE
37    
38  C     === Global variables ===  C     === Global variables ===
39  #include "SIZE.h"  #include "SIZE.h"
# Line 47  CEndOfInterface Line 48  CEndOfInterface
48    
49  C     == Local variables ==  C     == Local variables ==
50  C     xG, yG - Global coordinate location.  C     xG, yG - Global coordinate location.
 C     zG  
51  C     xBase  - South-west corner location for process.  C     xBase  - South-west corner location for process.
52  C     yBase  C     yBase
 C     zUpper - Work arrays for upper and lower  
 C     zLower   cell-face heights.  
 C     phi    - Temporary scalar  
53  C     xBase  - Temporaries for lower corner coordinate  C     xBase  - Temporaries for lower corner coordinate
54  C     yBase  C     yBase
55  C     iG, jG - Global coordinate index. Usually used to hold  C     iG, jG - Global coordinate index. Usually used to hold
# Line 61  C     bi,bj  - Loop counters Line 58  C     bi,bj  - Loop counters
58  C     zUpper - Temporary arrays holding z coordinates of  C     zUpper - Temporary arrays holding z coordinates of
59  C     zLower   upper and lower faces.  C     zLower   upper and lower faces.
60  C     I,J,K  C     I,J,K
61        _RL    xG, yG, zG        _RL    xG, yG
       _RL    phi  
       _RL    zUpper(Nz), zLower(Nz)  
62        _RL    xBase, yBase        _RL    xBase, yBase
63        INTEGER iG, jG        INTEGER iG, jG
64        INTEGER bi, bj        INTEGER bi, bj
65        INTEGER  I,  J, K        INTEGER  I,  J
66    
67  C--   Simple example of inialisation on cartesian grid  C--   Simple example of inialisation on cartesian grid
68  C--   First set coordinates of cell centers  C--   First set coordinates of cell centers
# Line 143  C     dxC, dyC is separation between cel Line 138  C     dxC, dyC is separation between cel
138         DO bi = myBxLo(myThid), myBxHi(myThid)         DO bi = myBxLo(myThid), myBxHi(myThid)
139          DO J=1,sNy          DO J=1,sNy
140           DO I=1,sNx           DO I=1,sNx
141            dxC(I,J,bi,bj)    = (dxF(I,J,bi,bj)+dxF(I-1,J,bi,bj))*0.5 D0            dxC(I,J,bi,bj)    = (dxF(I,J,bi,bj)+dxF(I-1,J,bi,bj))*0.5 _d 0
142            dyC(I,J,bi,bj)    = (dyF(I,J,bi,bj)+dyF(I,J-1,bi,bj))*0.5 D0            dyC(I,J,bi,bj)    = (dyF(I,J,bi,bj)+dyF(I,J-1,bi,bj))*0.5 _d 0
143           ENDDO           ENDDO
144          ENDDO          ENDDO
145         ENDDO         ENDDO
# Line 156  C     Calculate vertical face area Line 151  C     Calculate vertical face area
151         DO bi = myBxLo(myThid), myBxHi(myThid)         DO bi = myBxLo(myThid), myBxHi(myThid)
152          DO J=1,sNy          DO J=1,sNy
153           DO I=1,sNx           DO I=1,sNx
154            zA(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)
155              rAw(I,J,bi,bj) = dxC(I,J,bi,bj)*dyG(I,J,bi,bj)
156              rAs(I,J,bi,bj) = dxG(I,J,bi,bj)*dyC(I,J,bi,bj)
157            tanPhiAtU(I,J,bi,bj) = 0. _d 0            tanPhiAtU(I,J,bi,bj) = 0. _d 0
158            tanPhiAtV(I,J,bi,bj) = 0. _d 0            tanPhiAtV(I,J,bi,bj) = 0. _d 0
159           ENDDO           ENDDO
160          ENDDO          ENDDO
161         ENDDO         ENDDO
162        ENDDO        ENDDO
163        _EXCH_XY_R4 (zA       , myThid )        _EXCH_XY_R4 (rA       , myThid )
164          _EXCH_XY_R4 (rAw      , myThid )
165          _EXCH_XY_R4 (rAs      , myThid )
166        _EXCH_XY_R4 (tanPhiAtU , myThid )        _EXCH_XY_R4 (tanPhiAtU , myThid )
167        _EXCH_XY_R4 (tanPhiAtV , myThid )        _EXCH_XY_R4 (tanPhiAtV , myThid )
168    

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.13

  ViewVC Help
Powered by ViewVC 1.1.22