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

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

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

revision 1.2 by cnh, Fri Apr 24 02:05:40 1998 UTC revision 1.4 by adcroft, Thu Apr 30 14:03:28 1998 UTC
# Line 25  C     == Global variables === Line 25  C     == Global variables ===
25  #include "SIZE.h"  #include "SIZE.h"
26  #include "EEPARAMS.h"  #include "EEPARAMS.h"
27  #include "CG2D.h"  #include "CG2D.h"
28    #include "DYNVARS.h"
29    
30  C     == Routine arguments ==  C     == Routine arguments ==
31  C     myThid - Thread number for this instance of the routine.  C     myThid - Thread number for this instance of the routine.
# Line 76  C                          into fVerTerm Line 77  C                          into fVerTerm
77        _RL fVerU (1-OLx:sNx+OLx,1-OLy:sNy+OLy,2)        _RL fVerU (1-OLx:sNx+OLx,1-OLy:sNy+OLy,2)
78        _RL fVerV (1-OLx:sNx+OLx,1-OLy:sNy+OLy,2)        _RL fVerV (1-OLx:sNx+OLx,1-OLy:sNy+OLy,2)
79        _RL pH    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nz)        _RL pH    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nz)
80          _RL rhokm1(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
81          _RL rhokp1(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
82          _RL pSurfX(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
83          _RL pSurfY(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
84        INTEGER iMin, iMax        INTEGER iMin, iMax
85        INTEGER jMin, jMax        INTEGER jMin, jMax
86        INTEGER bi, bj        INTEGER bi, bj
# Line 103  C     uninitialised but inert locations. Line 108  C     uninitialised but inert locations.
108          DO K=1,nZ          DO K=1,nZ
109           pH (i,j,k)  = 0.*1. _d 37           pH (i,j,k)  = 0.*1. _d 37
110          ENDDO          ENDDO
111            rhokm1(i,j)    = 0. _d 0
112            rhokp1(i,j)    = 0. _d 0
113         ENDDO         ENDDO
114        ENDDO        ENDDO
115  C--   Set up work arrays that need valid initial values  C--   Set up work arrays that need valid initial values
# Line 123  C--   Set up work arrays that need valid Line 130  C--   Set up work arrays that need valid
130        DO bj=myByLo(myThid),myByHi(myThid)        DO bj=myByLo(myThid),myByHi(myThid)
131         DO bi=myBxLo(myThid),myBxHi(myThid)         DO bi=myBxLo(myThid),myBxHi(myThid)
132    
133    C--   Boundary condition on hydrostatic pressure is pH(z=0)=0
134            DO j=1-OLy,sNy+OLy
135             DO i=1-OLx,sNx+OLx
136              pH(i,j,1) = 0. _d 0
137             ENDDO
138            ENDDO
139    
140          iMin = 1-OLx+1          iMin = 1-OLx+1
141          iMax = sNx+OLx          iMax = sNx+OLx
142          jMin = 1-OLy+1          jMin = 1-OLy+1
143          jMax = sNy+OLy          jMax = sNy+OLy
144    
145  C--     Update fields according to tendency terms  C--     Calculate gradient of surface pressure
146          CALL TIMESTEP(          CALL GRAD_PSURF(
147       I       bi,bj,iMin,iMax,jMin,jMax,myThid)       I       bi,bj,iMin,iMax,jMin,jMax,
148         O       pSurfX,pSurfY,
149         I       myThid)
150    
151  C--     Calculate rho with the appropriate equation of state  C--     Update fields in top level according to tendency terms
152          CALL FIND_RHO(          CALL TIMESTEP(
153       I       bi,bj,iMin,iMax,jMin,jMax,myThid)       I       bi,bj,iMin,iMax,jMin,jMax,1,pSurfX,pSurfY,myThid)
154    
155            DO K=2,Nz
156    C--     Update fields in Kth level according to tendency terms
157            CALL TIMESTEP(
158         I       bi,bj,iMin,iMax,jMin,jMax,K,pSurfX,pSurfY,myThid)
159    C Density of K-1 level (above W(K)) reference to K level
160             CALL FIND_RHO(
161         I      bi, bj, iMin, iMax, jMin, jMax,  K-1, K, 'LINEAR',
162         O      rhoKm1,
163         I      myThid )
164    C Density of K level (below W(K)) reference to K level
165             CALL FIND_RHO(
166         I      bi, bj, iMin, iMax, jMin, jMax,  K, K, 'LINEAR',
167         O      rhoKp1,
168         I      myThid )
169  C--     Calculate static stability and mix where convectively unstable  C--     Calculate static stability and mix where convectively unstable
170          CALL CONVECT(           CALL CONVECT(
171       I       bi,bj,iMin,iMax,jMin,jMax,myThid)       I       bi,bj,iMin,iMax,jMin,jMax,K,rhoKm1,rhoKp1,myThid)
172    C Density of K-1 level (above W(K)) reference to K-1 level
173             CALL FIND_RHO(
174         I      bi, bj, iMin, iMax, jMin, jMax,  K-1, K-1, 'LINEAR',
175         O      rhoKm1,
176         I      myThid )
177    C--     Integrate hydrostatic balance for pH with BC of pH(z=0)=0
178             CALL CALC_PH(
179         I       bi,bj,iMin,iMax,jMin,jMax,K,rhoKm1,
180         U       pH,
181         I       myThid )
182            ENDDO ! K
183    
184    C Density of Nz level (bottom level) reference to Nz level
185             CALL FIND_RHO(
186         I      bi, bj, iMin, iMax, jMin, jMax,  Nz, Nz, 'LINEAR',
187         O      rhoKm1,
188         I      myThid )
189  C--     Integrate hydrostatic balance for pH with BC of pH(z=0)=0  C--     Integrate hydrostatic balance for pH with BC of pH(z=0)=0
190          CALL CALC_PH(           CALL CALC_PH(
191       I       bi,bj,iMin,iMax,jMin,jMax,       I       bi,bj,iMin,iMax,jMin,jMax,Nz+1,rhoKm1,
192       O       pH,       U       pH,
193       I       myThid )       I       myThid )
194    
195          DO K = Nz, 1, -1          DO K = Nz, 1, -1

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.22