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

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

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

revision 1.2 by jmc, Wed Jun 20 23:06:51 2007 UTC revision 1.6 by dfer, Thu Nov 6 01:22:59 2008 UTC
# Line 24  C     == Global variables == Line 24  C     == Global variables ==
24  #include "EEPARAMS.h"  #include "EEPARAMS.h"
25  #include "PARAMS.h"  #include "PARAMS.h"
26  #include "GRID.h"  #include "GRID.h"
 #include "SURFACE.h"  
27  #include "DYNVARS.h"  #include "DYNVARS.h"
28  #ifdef ALLOW_GMREDI  #ifdef ALLOW_GMREDI
29  # include "GMREDI.h"  # include "GMREDI.h"
# Line 57  C     i,j :: Loop counters Line 56  C     i,j :: Loop counters
56        INTEGER i,j,k        INTEGER i,j,k
57        LOGICAL calcMixLayerDepth        LOGICAL calcMixLayerDepth
58        INTEGER method        INTEGER method
59        _RL     dRhoSmall, rhoBigNb        _RL     rhoBigNb
60        _RL     rhoMxL(1-OLx:sNx+OLx,1-OLy:sNy+OLy)        _RL     rhoMxL(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
61        _RL     rhoKm1(1-OLx:sNx+OLx,1-OLy:sNy+OLy)        _RL     rhoKm1(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
62        _RL     rhoLoc(1-OLx:sNx+OLx,1-OLy:sNy+OLy)        _RL     rhoLoc(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
# Line 66  CEOP Line 65  CEOP
65    
66        calcMixLayerDepth = .FALSE.        calcMixLayerDepth = .FALSE.
67  #ifdef ALLOW_GMREDI  #ifdef ALLOW_GMREDI
68        IF ( useGMRedi ) calcMixLayerDepth = GM_taper_scheme.EQ.'fm07'        IF ( useGMRedi ) THEN
69           IF ( .NOT.useKPP ) calcMixLayerDepth = GM_taper_scheme.EQ.'fm07'
70          ENDIF
71  #endif  #endif
72  #ifdef ALLOW_DIAGNOSTICS  #ifdef ALLOW_DIAGNOSTICS
73        IF ( useDiagnostics.AND. .NOT.calcMixLayerDepth ) THEN        IF ( useDiagnostics.AND. .NOT.calcMixLayerDepth ) THEN
# Line 88  C       surface density plus Delta_Rho = Line 89  C       surface density plus Delta_Rho =
89  C     = density of water which is -hMixCriteria colder than surface water  C     = density of water which is -hMixCriteria colder than surface water
90    
91  c       hMixCriteria  = -0.8 _d 0  c       hMixCriteria  = -0.8 _d 0
92          dRhoSmall = 1. _d -6  c       dRhoSmall = 1. _d -6
93          rhoBigNb  = rhoConst*1. _d 10          rhoBigNb  = rhoConst*1. _d 10
94          CALL FIND_ALPHA(          CALL FIND_ALPHA(
95       I            bi, bj, 1-OLx, sNx+OLx, 1-OLy, sNy+OLy, 1, 1,       I            bi, bj, 1-OLx, sNx+OLx, 1-OLy, sNy+OLy, 1, 1,
# Line 99  c       hMixCriteria  = -0.8 _d 0 Line 100  c       hMixCriteria  = -0.8 _d 0
100             rhoKm1(i,j) = rhoSurf(i,j)             rhoKm1(i,j) = rhoSurf(i,j)
101             rhoMxL(i,j) = rhoSurf(i,j)             rhoMxL(i,j) = rhoSurf(i,j)
102       &                 + MAX( rhoMxL(i,j)*hMixCriteria, dRhoSmall )       &                 + MAX( rhoMxL(i,j)*hMixCriteria, dRhoSmall )
103             hMixLayer(i,j,bi,bj) = rF(1)-R_low(I,J,bi,bj)             hMixLayer(i,j,bi,bj) = rF(1)-R_low(i,j,bi,bj)
104           ENDDO           ENDDO
105          ENDDO          ENDDO
106          DO k = 2,Nr          DO k = 2,Nr
107  C-    potential density (reference level = surface level)  C-    potential density (reference level = surface level)
108           CALL FIND_RHO(           CALL FIND_RHO_2D(
109       I             bi, bj, 1-OLx, sNx+OLx, 1-OLy, sNy+OLy, K, 1,       I        1-OLx, sNx+OLx, 1-OLy, sNy+OLy, 1,
110       I             theta, salt,       I        theta(1-OLx,1-OLy,k,bi,bj), salt(1-OLx,1-OLy,k,bi,bj),
111       O             rhoLoc, myThid )       O        rhoLoc,
112         I        k, bi, bj, myThid )
113    
114           DO j=1-Oly,sNy+Oly           DO j=1-Oly,sNy+Oly
115            DO i=1-Olx,sNx+Olx            DO i=1-Olx,sNx+Olx
# Line 134  C--   Second method : Line 136  C--   Second method :
136  C     where the local stratification exceed the mean stratification above  C     where the local stratification exceed the mean stratification above
137  C     (from surface down to here) by factor hMixCriteria  C     (from surface down to here) by factor hMixCriteria
138    
139  c       hMixCriteria  = 2. _d 0  c       hMixCriteria  = 1.5 _d 0
140  C-Note: dRhoSmall is hard coded for now but should become run-time parameter  c       dRhoSmall = 1. _d -2
         dRhoSmall = 1. _d -2  
141          DO j=1-Oly,sNy+Oly          DO j=1-Oly,sNy+Oly
142           DO i=1-Olx,sNx+Olx           DO i=1-Olx,sNx+Olx
143             IF ( klowC(i,j,bi,bj) .GT. 0 ) THEN             IF ( klowC(i,j,bi,bj) .GT. 0 ) THEN
# Line 150  C-Note: dRhoSmall is hard coded for now Line 151  C-Note: dRhoSmall is hard coded for now
151          ENDDO          ENDDO
152          DO k = 2,Nr-1          DO k = 2,Nr-1
153  C-    potential density (reference level = surface level)  C-    potential density (reference level = surface level)
154           CALL FIND_RHO(           CALL FIND_RHO_2D(
155       I             bi, bj, 1-OLx, sNx+OLx, 1-OLy, sNy+OLy, K, 1,       I        1-OLx, sNx+OLx, 1-OLy, sNy+OLy, 1,
156       I             theta, salt,       I        theta(1-OLx,1-OLy,k,bi,bj), salt(1-OLx,1-OLy,k,bi,bj),
157       O             rhoLoc, myThid )       O        rhoLoc,
158         I        k, bi, bj, myThid )
159    
160           DO j=1-Oly,sNy+Oly           DO j=1-Oly,sNy+Oly
161            DO i=1-Olx,sNx+Olx            DO i=1-Olx,sNx+Olx

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

  ViewVC Help
Powered by ViewVC 1.1.22