/[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.3 by jmc, Mon Aug 11 22:25:52 2008 UTC revision 1.10 by m_bates, Thu Jun 27 14:47:01 2013 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 .AND. .NOT.useKPP ) THEN
69           calcMixLayerDepth = GM_useSubMeso .OR. GM_taper_scheme.EQ.'fm07'
70         &       .OR. GM_useK3D
71          ENDIF
72  #endif  #endif
73  #ifdef ALLOW_DIAGNOSTICS  #ifdef ALLOW_DIAGNOSTICS
74        IF ( useDiagnostics.AND. .NOT.calcMixLayerDepth ) THEN        IF ( useDiagnostics.AND. .NOT.calcMixLayerDepth ) THEN
# Line 86  C--   First method : Line 88  C--   First method :
88  C     where the potential density (ref.lev=surface) is larger than  C     where the potential density (ref.lev=surface) is larger than
89  C       surface density plus Delta_Rho = hMixCriteria * Alpha(surf)  C       surface density plus Delta_Rho = hMixCriteria * Alpha(surf)
90  C     = density of water which is -hMixCriteria colder than surface water  C     = density of water which is -hMixCriteria colder than surface water
91    C     (see Kara, Rochford, and Hurlburt JGR 2000 for default criterion)
92    
93  c       hMixCriteria  = -0.8 _d 0  c       hMixCriteria  = -0.8 _d 0
94          dRhoSmall = 1. _d -6  c       dRhoSmall = 1. _d -6
95          rhoBigNb  = rhoConst*1. _d 10          rhoBigNb  = rhoConst*1. _d 10
96          CALL FIND_ALPHA(          CALL FIND_ALPHA(
97       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 135  C--   Second method : Line 138  C--   Second method :
138  C     where the local stratification exceed the mean stratification above  C     where the local stratification exceed the mean stratification above
139  C     (from surface down to here) by factor hMixCriteria  C     (from surface down to here) by factor hMixCriteria
140    
141  c       hMixCriteria  = 2. _d 0  c       hMixCriteria  = 1.5 _d 0
142  C-Note: dRhoSmall is hard coded for now but should become run-time parameter  c       dRhoSmall = 1. _d -2
         dRhoSmall = 1. _d -2  
143          DO j=1-Oly,sNy+Oly          DO j=1-Oly,sNy+Oly
144           DO i=1-Olx,sNx+Olx           DO i=1-Olx,sNx+Olx
145             IF ( klowC(i,j,bi,bj) .GT. 0 ) THEN             IF ( klowC(i,j,bi,bj) .GT. 0 ) THEN
# Line 186  C-    potential density (reference level Line 188  C-    potential density (reference level
188          STOP 'S/R CALC_OCE_MXLAYER: invalid method'          STOP 'S/R CALC_OCE_MXLAYER: invalid method'
189         ENDIF         ENDIF
190    
191           IF ( hMixSmooth .GT. 0. _d 0 ) THEN
192            tmpFac = (1. _d 0 - hMixSmooth ) / 4. _d 0
193            DO j=1-Oly+1,sNy+Oly-1
194             DO i=1-Olx+1,sNx+Olx-1
195                rhoLoc(i,j)=(hMixSmooth *   hMixLayer(i,j,bi,bj)   +
196         &                       tmpFac * ( hMixLayer(i-1,j,bi,bj) +
197         &                                  hMixLayer(i+1,j,bi,bj) +
198         &                                  hMixLayer(i,j-1,bi,bj) +
199         &                                  hMixLayer(i,j+1,bi,bj) )
200         &                  )
201         &                 /(hMixSmooth +
202         &                       tmpFac * ( maskC(i-1,j,1,bi,bj) +
203         &                                  maskC(i+1,j,1,bi,bj) +
204         &                                  maskC(i,j-1,1,bi,bj) +
205         &                                  maskC(i,j+1,1,bi,bj) )
206         &                  ) * maskC(i,j,1,bi,bj)
207             ENDDO
208            ENDDO
209            DO j=1-Oly+1,sNy+Oly-1
210             DO i=1-Olx+1,sNx+Olx-1
211                hMixLayer(i,j,bi,bj) = rhoLoc(i,j)
212             ENDDO
213            ENDDO
214           ENDIF
215    
216  #ifdef ALLOW_DIAGNOSTICS  #ifdef ALLOW_DIAGNOSTICS
217         IF ( useDiagnostics ) THEN         IF ( useDiagnostics ) THEN
218          CALL DIAGNOSTICS_FILL( hMixLayer, 'MXLDEPTH',          CALL DIAGNOSTICS_FILL( hMixLayer, 'MXLDEPTH',

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.10

  ViewVC Help
Powered by ViewVC 1.1.22