/[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.5 by dfer, Wed Oct 29 22:28:51 2008 UTC revision 1.7 by dfer, Fri Nov 14 03:04:09 2008 UTC
# Line 56  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 89  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 136  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 187  C-    potential density (reference level Line 186  C-    potential density (reference level
186          STOP 'S/R CALC_OCE_MXLAYER: invalid method'          STOP 'S/R CALC_OCE_MXLAYER: invalid method'
187         ENDIF         ENDIF
188    
189           IF ( hMixSmooth .GT. 0. _d 0 ) THEN
190            tmpFac = (1. _d 0 - hMixSmooth ) / 4. _d 0
191            DO j=1-Oly+1,sNy+Oly-1
192             DO i=1-Olx+1,sNx+Olx-1
193                rhoLoc(i,j)=(hMixSmooth *   hMixLayer(i,j,bi,bj)   +
194         &                       tmpFac * ( hMixLayer(i-1,j,bi,bj) +
195         &                                  hMixLayer(i+1,j,bi,bj) +
196         &                                  hMixLayer(i,j-1,bi,bj) +
197         &                                  hMixLayer(i,j+1,bi,bj) )
198         &                  )
199         &                 /(hMixSmooth +
200         &                       tmpFac * ( maskC(i-1,j,1,bi,bj) +
201         &                                  maskC(i+1,j,1,bi,bj) +
202         &                                  maskC(i,j-1,1,bi,bj) +
203         &                                  maskC(i,j+1,1,bi,bj) )
204         &                  ) * maskC(i,j,1,bi,bj)
205             ENDDO
206            ENDDO
207            DO j=1-Oly+1,sNy+Oly-1
208             DO i=1-Olx+1,sNx+Olx-1
209                hMixLayer(i,j,bi,bj) = rhoLoc(i,j)
210             ENDDO
211            ENDDO
212           ENDIF
213    
214  #ifdef ALLOW_DIAGNOSTICS  #ifdef ALLOW_DIAGNOSTICS
215         IF ( useDiagnostics ) THEN         IF ( useDiagnostics ) THEN
216          CALL DIAGNOSTICS_FILL( hMixLayer, 'MXLDEPTH',          CALL DIAGNOSTICS_FILL( hMixLayer, 'MXLDEPTH',

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.22