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

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

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

revision 1.21 by adcroft, Mon May 24 14:24:24 1999 UTC revision 1.22 by adcroft, Wed May 26 20:26:42 1999 UTC
# Line 96  C     I, J, K - Loop counters Line 96  C     I, J, K - Loop counters
96        _RL afFacT, dfFacT        _RL afFacT, dfFacT
97        _RL dTdx(1-OLx:sNx+OLx,1-OLy:sNy+OLy)        _RL dTdx(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
98        _RL dTdy(1-OLx:sNx+OLx,1-OLy:sNy+OLy)        _RL dTdy(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
99          _RL df4   (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
100  #ifdef ALLOW_KPP  #ifdef ALLOW_KPP
101        _RS hbl  (1-OLx:sNx+OLx,1-OLy:sNy+OLy)    ! used by KPP mixing scheme        _RS hbl  (1-OLx:sNx+OLx,1-OLy:sNy+OLy)    ! used by KPP mixing scheme
102        _RS frac (1-OLx:sNx+OLx,1-OLy:sNy+OLy)    ! used by KPP mixing scheme        _RS frac (1-OLx:sNx+OLx,1-OLy:sNy+OLy)    ! used by KPP mixing scheme
# Line 109  C     I, J, K - Loop counters Line 110  C     I, J, K - Loop counters
110    
111  C---  Calculate advective and diffusive fluxes between cells.  C---  Calculate advective and diffusive fluxes between cells.
112    
113    #ifdef INCLUDE_T_DIFFUSION_CODE
114    C     o Zonal tracer gradient
115          DO j=1-Oly,sNy+Oly
116           DO i=1-Olx+1,sNx+Olx
117            dTdx(i,j) = _recip_dxC(i,j,bi,bj)*
118         &  (theta(i,j,k,bi,bj)-theta(i-1,j,k,bi,bj))
119           ENDDO
120          ENDDO
121    C     o Meridional tracer gradient
122          DO j=1-Oly+1,sNy+Oly
123           DO i=1-Olx,sNx+Olx
124            dTdy(i,j) = _recip_dyC(i,j,bi,bj)*
125         &  (theta(i,j,k,bi,bj)-theta(i,j-1,k,bi,bj))
126           ENDDO
127          ENDDO
128    
129    C--   del^2 of T, needed for bi-harmonic (del^4) term
130          IF (diffK4T .NE. 0.) THEN
131           DO j=1-Oly+1,sNy+Oly-1
132            DO i=1-Olx+1,sNx+Olx-1
133             df4(i,j)= _recip_hFacC(i,j,k,bi,bj)
134         &             *recip_drF(k)/_rA(i,j,bi,bj)
135         &            *(
136         &             +( xA(i+1,j)*dTdx(i+1,j)-xA(i,j)*dTdx(i,j) )
137         &             +( yA(i,j+1)*dTdy(i,j+1)-yA(i,j)*dTdy(i,j) )
138         &             )
139            ENDDO
140           ENDDO
141          ENDIF
142    #endif
143    
144  C--   Zonal flux (fZon is at west face of "theta" cell)  C--   Zonal flux (fZon is at west face of "theta" cell)
145  #ifdef INCLUDE_T_ADVECTION_CODE  #ifdef INCLUDE_T_ADVECTION_CODE
146  C     o Advective component of zonal flux  C     o Advective component of zonal flux
# Line 120  C     o Advective component of zonal flu Line 152  C     o Advective component of zonal flu
152        ENDDO        ENDDO
153  #endif /* INCLUDE_T_ADVECTION_CODE */  #endif /* INCLUDE_T_ADVECTION_CODE */
154  #ifdef INCLUDE_T_DIFFUSION_CODE  #ifdef INCLUDE_T_DIFFUSION_CODE
 C     o Zonal tracer gradient  
       DO j=jMin,jMax  
        DO i=iMin,iMax  
         dTdx(i,j) = _recip_dxC(i,j,bi,bj)*  
      &  (theta(i,j,k,bi,bj)-theta(i-1,j,k,bi,bj))  
        ENDDO  
       ENDDO  
155  C     o Diffusive component of zonal flux  C     o Diffusive component of zonal flux
156        DO j=jMin,jMax        DO j=jMin,jMax
157         DO i=iMin,iMax         DO i=iMin,iMax
# Line 134  C     o Diffusive component of zonal flu Line 159  C     o Diffusive component of zonal flu
159       &            xA(i,j)*dTdx(i,j)       &            xA(i,j)*dTdx(i,j)
160         ENDDO         ENDDO
161        ENDDO        ENDDO
162    C     o Add the bi-harmonic contribution
163          IF (diffK4T .NE. 0.) THEN
164           DO j=jMin,jMax
165            DO i=iMin,iMax
166             df(i,j) = df(i,j) + xA(i,j)*
167         &    diffK4T*(df4(i,j)-df4(i-1,j))*_recip_dxC(i,j,bi,bj)
168            ENDDO
169           ENDDO
170          ENDIF
171  #endif /* INCLUDE_T_DIFFUSION_CODE */  #endif /* INCLUDE_T_DIFFUSION_CODE */
172  C     o Net zonal flux  C     o Net zonal flux
173        DO j=jMin,jMax        DO j=jMin,jMax
# Line 155  C     o Advective component of meridiona Line 189  C     o Advective component of meridiona
189        ENDDO        ENDDO
190  #endif /* INCLUDE_T_ADVECTION_CODE */  #endif /* INCLUDE_T_ADVECTION_CODE */
191  #ifdef INCLUDE_T_DIFFUSION_CODE  #ifdef INCLUDE_T_DIFFUSION_CODE
 C     o Meridional tracer gradient  
       DO j=jMin,jMax  
        DO i=iMin,iMax  
         dTdy(i,j) = _recip_dyC(i,j,bi,bj)*  
      &  (theta(i,j,k,bi,bj)-theta(i,j-1,k,bi,bj))  
        ENDDO  
       ENDDO  
192  C     o Diffusive component of meridional flux  C     o Diffusive component of meridional flux
193        DO j=jMin,jMax        DO j=jMin,jMax
194         DO i=iMin,iMax         DO i=iMin,iMax
# Line 169  C     o Diffusive component of meridiona Line 196  C     o Diffusive component of meridiona
196       &            yA(i,j)*dTdy(i,j)       &            yA(i,j)*dTdy(i,j)
197         ENDDO         ENDDO
198        ENDDO        ENDDO
199    C     o Add the bi-harmonic contribution
200          IF (diffK4T .NE. 0.) THEN
201           DO j=jMin,jMax
202            DO i=iMin,iMax
203             df(i,j) = df(i,j) + yA(i,j)*
204         &    diffK4T*(df4(i,j)-df4(i,j-1))*_recip_dyC(i,j,bi,bj)
205            ENDDO
206           ENDDO
207          ENDIF
208  #endif /* INCLUDE_T_DIFFUSION_CODE */  #endif /* INCLUDE_T_DIFFUSION_CODE */
209  C     o Net meridional flux  C     o Net meridional flux
210        DO j=jMin,jMax        DO j=jMin,jMax

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22

  ViewVC Help
Powered by ViewVC 1.1.22