87 |
C where the potential density (ref.lev=surface) is larger than |
C where the potential density (ref.lev=surface) is larger than |
88 |
C surface density plus Delta_Rho = hMixCriteria * Alpha(surf) |
C surface density plus Delta_Rho = hMixCriteria * Alpha(surf) |
89 |
C = density of water which is -hMixCriteria colder than surface water |
C = density of water which is -hMixCriteria colder than surface water |
90 |
|
C (see Kara, Rochford, and Hurlburt JGR 2000 for default criterion) |
91 |
|
|
92 |
c hMixCriteria = -0.8 _d 0 |
c hMixCriteria = -0.8 _d 0 |
93 |
c dRhoSmall = 1. _d -6 |
c dRhoSmall = 1. _d -6 |
187 |
STOP 'S/R CALC_OCE_MXLAYER: invalid method' |
STOP 'S/R CALC_OCE_MXLAYER: invalid method' |
188 |
ENDIF |
ENDIF |
189 |
|
|
190 |
|
IF ( hMixSmooth .GT. 0. _d 0 ) THEN |
191 |
|
tmpFac = (1. _d 0 - hMixSmooth ) / 4. _d 0 |
192 |
|
DO j=1-Oly+1,sNy+Oly-1 |
193 |
|
DO i=1-Olx+1,sNx+Olx-1 |
194 |
|
rhoLoc(i,j)=(hMixSmooth * hMixLayer(i,j,bi,bj) + |
195 |
|
& tmpFac * ( hMixLayer(i-1,j,bi,bj) + |
196 |
|
& hMixLayer(i+1,j,bi,bj) + |
197 |
|
& hMixLayer(i,j-1,bi,bj) + |
198 |
|
& hMixLayer(i,j+1,bi,bj) ) |
199 |
|
& ) |
200 |
|
& /(hMixSmooth + |
201 |
|
& tmpFac * ( maskC(i-1,j,1,bi,bj) + |
202 |
|
& maskC(i+1,j,1,bi,bj) + |
203 |
|
& maskC(i,j-1,1,bi,bj) + |
204 |
|
& maskC(i,j+1,1,bi,bj) ) |
205 |
|
& ) * maskC(i,j,1,bi,bj) |
206 |
|
ENDDO |
207 |
|
ENDDO |
208 |
|
DO j=1-Oly+1,sNy+Oly-1 |
209 |
|
DO i=1-Olx+1,sNx+Olx-1 |
210 |
|
hMixLayer(i,j,bi,bj) = rhoLoc(i,j) |
211 |
|
ENDDO |
212 |
|
ENDDO |
213 |
|
ENDIF |
214 |
|
|
215 |
#ifdef ALLOW_DIAGNOSTICS |
#ifdef ALLOW_DIAGNOSTICS |
216 |
IF ( useDiagnostics ) THEN |
IF ( useDiagnostics ) THEN |
217 |
CALL DIAGNOSTICS_FILL( hMixLayer, 'MXLDEPTH', |
CALL DIAGNOSTICS_FILL( hMixLayer, 'MXLDEPTH', |