/[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.19 by cnh, Fri Nov 6 22:44:44 1998 UTC revision 1.20 by adcroft, Tue May 18 18:01:12 1999 UTC
# Line 43  C     == GLobal variables == Line 43  C     == GLobal variables ==
43  #include "PARAMS.h"  #include "PARAMS.h"
44  #include "GRID.h"  #include "GRID.h"
45  #include "FFIELDS.h"  #include "FFIELDS.h"
46    #ifdef ALLOW_KPP
47    #include "KPPMIX.h"
48    #endif
49    
50    
51  C     == Routine arguments ==  C     == Routine arguments ==
52  C     fZon    - Work array for flux of temperature in the east-west  C     fZon    - Work array for flux of temperature in the east-west
# Line 92  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    #ifdef ALLOW_KPP
100          _RL hbl  (1-OLx:sNx+OLx,1-OLy:sNy+OLy)    ! used by KPP mixing scheme
101          _RL frac (1-OLx:sNx+OLx,1-OLy:sNy+OLy)    ! used by KPP mixing scheme
102          integer jwtype                            ! index for Jerlov water type
103    #endif
104    
105        afFacT = 1. _d 0        afFacT = 1. _d 0
106        dfFacT = 1. _d 0        dfFacT = 1. _d 0
# Line 244  C           boundary condition. Line 253  C           boundary condition.
253         ENDDO         ENDDO
254        ENDIF        ENDIF
255  #endif /* INCLUDE_T_DIFFUSION_CODE */  #endif /* INCLUDE_T_DIFFUSION_CODE */
256    
257    #ifdef ALLOW_KPP
258          IF (usingKPPmixing) THEN
259    C--   Compute fraction of solar short-wave flux penetrating to
260    C     the bottom of the mixing layer
261           DO j=jMin,jMax
262            DO i=iMin,iMax
263             hbl(i,j) = KPPhbl(i,j,bi,bj)
264            ENDDO
265           ENDDO
266           j=(sNx+2*OLx)*(sNy+2*OLy)
267           jwtype = 3
268           CALL SWFRAC(
269         I     j, -1., hbl, jwtype,
270         O     frac )
271    
272    C     Add non local transport coefficient (ghat term) to right-hand-side
273    C     The nonlocal transport term is noNrero only for scalars in unstable
274    C     (convective) forcing conditions.
275    C     Note: -[Qnet * delZ(1) + Qsw * (1-frac) / KPPhbl] * 4000 * rho
276    C     is the total heat flux
277    C     penetrating the mixed layer from the surface in (deg C / s)
278           IF ( TOP_LAYER ) THEN
279            DO j=jMin,jMax
280             DO i=iMin,iMax
281              df(i,j) = df(i,j) + _rA(i,j,bi,bj) *
282         &           ( Qnet(i,j,bi,bj) * delZ(1) +
283         &           Qsw(i,j,bi,bj) * (1.-frac(i,j))
284         &           / KPPhbl(i,j,bi,bj) ) *
285         &           ( KappaRT(i,j,k) * KPPghat(i,j,k,  bi,bj) )
286             ENDDO
287            ENDDO
288           ELSE
289            DO j=jMin,jMax
290             DO i=iMin,iMax
291              df(i,j) = df(i,j) + _rA(i,j,bi,bj) *
292         &           ( Qnet(i,j,bi,bj) * delZ(1) +
293         &           Qsw(i,j,bi,bj)  * (1.-frac(i,j))
294         &           / KPPhbl(i,j,bi,bj) ) *
295         &           ( KappaRT(i,j,k)   * KPPghat(i,j,k,  bi,bj)
296         &           - KappaRT(i,j,k-1) * KPPghat(i,j,k-1,bi,bj) )
297             ENDDO
298            ENDDO
299           ENDIF
300          ENDIF
301    #endif /* ALLOW_KPP */
302    
303  C     o Net vertical flux  C     o Net vertical flux
304        DO j=jMin,jMax        DO j=jMin,jMax
305         DO i=iMin,iMax         DO i=iMin,iMax

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20

  ViewVC Help
Powered by ViewVC 1.1.22