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

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

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

revision 1.34 by jmc, Sun Jun 17 02:20:46 2012 UTC revision 1.35 by jmc, Sun Feb 17 02:18:16 2013 UTC
# Line 56  CEOP Line 56  CEOP
56    
57  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
58    
59  C     Load grid spacing (vector) from files  C--   Load grid spacing (vector) from files
60        CALL LOAD_GRID_SPACING( myThid )        CALL LOAD_GRID_SPACING( myThid )
61    
62  C     Set up vertical grid and coordinate system  C--   Set up vertical grid and coordinate system
63        CALL INI_VERTICAL_GRID( myThid )        CALL INI_VERTICAL_GRID( myThid )
64    
65    C--   Initialise (everywhere) all horizontal grid array to null value
66    C     Note: some arrays are not defined in some parts of the halo
67    C     region. We set them to zero here for safety. If they are ever
68    C     referred to, especially in the denominator then it is a mistake!
69          DO bj = myByLo(myThid), myByHi(myThid)
70           DO bi = myBxLo(myThid), myBxHi(myThid)
71            DO j=1-OLy,sNy+OLy
72             DO i=1-OLx,sNx+OLx
73              xC(i,j,bi,bj)  = 0.
74              yC(i,j,bi,bj)  = 0.
75              xG(i,j,bi,bj)  = 0.
76              yG(i,j,bi,bj)  = 0.
77              dxC(i,j,bi,bj) = 0.
78              dyC(i,j,bi,bj) = 0.
79              dxG(i,j,bi,bj) = 0.
80              dyG(i,j,bi,bj) = 0.
81              dxF(i,j,bi,bj) = 0.
82              dyF(i,j,bi,bj) = 0.
83              dxV(i,j,bi,bj) = 0.
84              dyU(i,j,bi,bj) = 0.
85              rA(i,j,bi,bj)  = 0.
86              rAz(i,j,bi,bj) = 0.
87              rAw(i,j,bi,bj) = 0.
88              rAs(i,j,bi,bj) = 0.
89              recip_dxG(i,j,bi,bj) = 0.
90              recip_dyG(i,j,bi,bj) = 0.
91              recip_dxC(i,j,bi,bj) = 0.
92              recip_dyC(i,j,bi,bj) = 0.
93              recip_dxF(i,j,bi,bj) = 0.
94              recip_dyF(i,j,bi,bj) = 0.
95              recip_dxV(i,j,bi,bj) = 0.
96              recip_dyU(i,j,bi,bj) = 0.
97              recip_rA (i,j,bi,bj) = 0.
98              recip_rAs(i,j,bi,bj) = 0.
99              recip_rAw(i,j,bi,bj) = 0.
100              recip_rAz(i,j,bi,bj) = 0.
101              tanPhiAtU(i,j,bi,bj) = 0.
102              tanPhiAtV(i,j,bi,bj) = 0.
103              angleCosC(i,j,bi,bj) = 1.
104              angleSinC(i,j,bi,bj) = 0.
105              u2zonDir(i,j,bi,bj)  = 1.
106              v2zonDir(i,j,bi,bj)  = 0.
107             ENDDO
108             cosFacU(j,bi,bj)   = 1.
109             cosFacV(j,bi,bj)   = 1.
110             sqCosFacU(j,bi,bj) = 1.
111             sqCosFacV(j,bi,bj) = 1.
112            ENDDO
113           ENDDO
114          ENDDO
115    
116  C     Two examples are shown in this code. One illustrates the  C     Two examples are shown in this code. One illustrates the
117  C     initialization of a cartesian grid. The other shows the  C     initialization of a cartesian grid. The other shows the
118  C     inialization of a spherical polar grid. Other orthonormal grids  C     inialization of a spherical polar grid. Other orthonormal grids
# Line 78  C        Both of the above also require Line 129  C        Both of the above also require
129  C        routines that map computational blocks to simulation  C        routines that map computational blocks to simulation
130  C        domain blocks.  C        domain blocks.
131    
132  C     Set up horizontal grid and coordinate system  C--   Set up horizontal grid and coordinate system
133        IF ( usingCartesianGrid ) THEN        IF ( usingCartesianGrid ) THEN
134          CALL INI_CARTESIAN_GRID( myThid )          CALL INI_CARTESIAN_GRID( myThid )
135        ELSEIF ( usingSphericalPolarGrid ) THEN        ELSEIF ( usingSphericalPolarGrid ) THEN
# Line 97  C     Set up horizontal grid and coordin Line 148  C     Set up horizontal grid and coordin
148          _END_MASTER(myThid)          _END_MASTER(myThid)
149        ENDIF        ENDIF
150    
151  C---  Calculate reciprocals grid lengths (formerly part of INI_MASKS_ETC)  C--   Calculate reciprocals grid lengths (formerly part of INI_MASKS_ETC)
152        DO bj = myByLo(myThid), myByHi(myThid)        DO bj = myByLo(myThid), myByHi(myThid)
153         DO bi = myBxLo(myThid), myBxHi(myThid)         DO bi = myBxLo(myThid), myBxHi(myThid)
154          DO j=1-OLy,sNy+OLy          DO j=1-OLy,sNy+OLy

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.35

  ViewVC Help
Powered by ViewVC 1.1.22