/[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.4 by adcroft, Thu Apr 30 14:03:28 1998 UTC revision 1.5 by adcroft, Mon May 4 16:32:10 1998 UTC
# Line 94  C     point numbers. This prevents spuri Line 94  C     point numbers. This prevents spuri
94  C     uninitialised but inert locations.  C     uninitialised but inert locations.
95        DO j=1-OLy,sNy+OLy        DO j=1-OLy,sNy+OLy
96         DO i=1-OLx,sNx+OLx         DO i=1-OLx,sNx+OLx
97          xA(i,j)      = 0.*1. _d 37          xA(i,j)      = 0. _d 0
98          yA(i,j)      = 0.*1. _d 37          yA(i,j)      = 0. _d 0
99          uTrans(i,j)  = 0.*1. _d 37          uTrans(i,j)  = 0. _d 0
100          vTrans(i,j)  = 0.*1. _d 37          vTrans(i,j)  = 0. _d 0
101          aTerm(i,j)   = 0.*1. _d 37          aTerm(i,j)   = 0. _d 0
102          xTerm(i,j)   = 0.*1. _d 37          xTerm(i,j)   = 0. _d 0
103          cTerm(i,j)   = 0.*1. _d 37          cTerm(i,j)   = 0. _d 0
104          mTerm(i,j)   = 0.*1. _d 37          mTerm(i,j)   = 0. _d 0
105          pTerm(i,j)   = 0.*1. _d 37          pTerm(i,j)   = 0. _d 0
106          fZon(i,j)    = 0.*1. _d 37          fZon(i,j)    = 0. _d 0
107          fMer(i,j)    = 0.*1. _d 37          fMer(i,j)    = 0. _d 0
108          DO K=1,nZ          DO K=1,nZ
109           pH (i,j,k)  = 0.*1. _d 37           pH (i,j,k)  = 0. _d 0
110          ENDDO          ENDDO
111          rhokm1(i,j)    = 0. _d 0          rhokm1(i,j)  = 0. _d 0
112          rhokp1(i,j)    = 0. _d 0          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 152  C--     Update fields in top level accor Line 152  C--     Update fields in top level accor
152          CALL TIMESTEP(          CALL TIMESTEP(
153       I       bi,bj,iMin,iMax,jMin,jMax,1,pSurfX,pSurfY,myThid)       I       bi,bj,iMin,iMax,jMin,jMax,1,pSurfX,pSurfY,myThid)
154    
155    C Density of 1st level (below W(1)) reference to level 1
156             CALL FIND_RHO(
157         I      bi, bj, iMin, iMax, jMin, jMax, 1, 1, 'LINEAR',
158         O      rhoKm1,
159         I      myThid )
160    C--     Integrate hydrostatic balance for pH with BC of pH(z=0)=0
161             CALL CALC_PH(
162         I       bi,bj,iMin,iMax,jMin,jMax,1,rhoKm1,rhoKm1,
163         U       pH,
164         I       myThid )
165    
166          DO K=2,Nz          DO K=2,Nz
167  C--     Update fields in Kth level according to tendency terms  C--     Update fields in Kth level according to tendency terms
168          CALL TIMESTEP(          CALL TIMESTEP(
# Line 174  C Density of K-1 level (above W(K)) refe Line 185  C Density of K-1 level (above W(K)) refe
185       I      bi, bj, iMin, iMax, jMin, jMax,  K-1, K-1, 'LINEAR',       I      bi, bj, iMin, iMax, jMin, jMax,  K-1, K-1, 'LINEAR',
186       O      rhoKm1,       O      rhoKm1,
187       I      myThid )       I      myThid )
188  C--     Integrate hydrostatic balance for pH with BC of pH(z=0)=0  C Density of K level (below W(K)) referenced to K level
          CALL CALC_PH(  
      I       bi,bj,iMin,iMax,jMin,jMax,K,rhoKm1,  
      U       pH,  
      I       myThid )  
         ENDDO ! K  
   
 C Density of Nz level (bottom level) reference to Nz level  
189           CALL FIND_RHO(           CALL FIND_RHO(
190       I      bi, bj, iMin, iMax, jMin, jMax,  Nz, Nz, 'LINEAR',       I      bi, bj, iMin, iMax, jMin, jMax,  K, K, 'LINEAR',
191       O      rhoKm1,       O      rhoKp1,
192       I      myThid )       I      myThid )
193  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
194           CALL CALC_PH(           CALL CALC_PH(
195       I       bi,bj,iMin,iMax,jMin,jMax,Nz+1,rhoKm1,       I       bi,bj,iMin,iMax,jMin,jMax,K,rhoKm1,rhoKp1,
196       U       pH,       U       pH,
197       I       myThid )       I       myThid )
198    
199            ENDDO ! K
200    
201          DO K = Nz, 1, -1          DO K = Nz, 1, -1
202           kM1  =max(1,k-1)   ! Points to level above k (=k-1)           kM1  =max(1,k-1)   ! Points to level above k (=k-1)
203           kUp  =1+MOD(k+1,2) ! Cycles through 1,2 to point to layer above           kUp  =1+MOD(k+1,2) ! Cycles through 1,2 to point to layer above
# Line 228  Cdbg I        xA,yA,uTrans,vTrans,wTrans Line 234  Cdbg I        xA,yA,uTrans,vTrans,wTrans
234  Cdbg U        aTerm,xTerm,fZon,fMer,fVerS,  Cdbg U        aTerm,xTerm,fZon,fMer,fVerS,
235  Cdbg I        myThid)  Cdbg I        myThid)
236    
237          ENDDO          ENDDO ! K
238    
239         ENDDO         ENDDO
240        ENDDO        ENDDO

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

  ViewVC Help
Powered by ViewVC 1.1.22