/[MITgcm]/MITgcm/pkg/gmredi/gmredi_slope_psi.F
ViewVC logotype

Diff of /MITgcm/pkg/gmredi/gmredi_slope_psi.F

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

revision 1.11 by gforget, Fri May 30 21:10:25 2008 UTC revision 1.12 by jmc, Tue Dec 8 21:42:22 2009 UTC
# Line 47  C Line 47  C
47        _RL dSigmaDrS(1-Olx:sNx+Olx,1-Oly:sNy+Oly)        _RL dSigmaDrS(1-Olx:sNx+Olx,1-Oly:sNy+Oly)
48        _RL LrhoW(1-Olx:sNx+Olx,1-Oly:sNy+Oly)        _RL LrhoW(1-Olx:sNx+Olx,1-Oly:sNy+Oly)
49        _RL LrhoS(1-Olx:sNx+Olx,1-Oly:sNy+Oly)        _RL LrhoS(1-Olx:sNx+Olx,1-Oly:sNy+Oly)
       _RL slopeTmpSpec,slopeMaxSpec  
50        _RS depthZ        _RS depthZ
51        INTEGER K,bi,bj,myThid        INTEGER K,bi,bj,myThid
52  CEndOfInterface  CEndOfInterface
# Line 63  C     == Local variables == Line 62  C     == Local variables ==
62        _RL fpi        _RL fpi
63        PARAMETER(fpi=3.141592653589793047592d0)        PARAMETER(fpi=3.141592653589793047592d0)
64        INTEGER i,j        INTEGER i,j
65    #ifdef GMREDI_WITH_STABLE_ADJOINT
66          _RL slopeTmpSpec,slopeMaxSpec
67    #endif
68    
69    C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
70    
71        slopeCutoff = SQRT( GM_slopeSqCutoff )        slopeCutoff = SQRT( GM_slopeSqCutoff )
72    
# Line 186  CADJ STORE slopeX(:,:)       = comlev1_b Line 190  CADJ STORE slopeX(:,:)       = comlev1_b
190  CADJ STORE dSigmaDrW(:,:)    = comlev1_bibj_k, key=kkey, byte=isbyte  CADJ STORE dSigmaDrW(:,:)    = comlev1_bibj_k, key=kkey, byte=isbyte
191  #endif  #endif
192    
193  C- Compute the slope, no clipping, but avoid reverse slope in negatively  C- Compute the slope, no clipping, but avoid reverse slope in negatively
194  C                                  stratified (Sigma_Z > 0) region :  C                                  stratified (Sigma_Z > 0) region :
195          DO j=1-Oly,sNy+Oly          DO j=1-Oly,sNy+Oly
196           DO i=1-Olx+1,sNx+Olx           DO i=1-Olx+1,sNx+Olx
# Line 269  C-      Simplest adiabatic tapering = Sm Line 273  C-      Simplest adiabatic tapering = Sm
273           DO i=1-Olx,sNx+Olx           DO i=1-Olx,sNx+Olx
274            Smod = ABS(SlopeY(i,j))            Smod = ABS(SlopeY(i,j))
275            IF ( Smod .GT. GM_maxSlope .AND.            IF ( Smod .GT. GM_maxSlope .AND.
276       &           Smod .LT. slopeCutoff )       &           Smod .LT. slopeCutoff )
277       &           taperY(i,j)=GM_maxSlope/(Smod+GM_Small_Number)       &           taperY(i,j)=GM_maxSlope/(Smod+GM_Small_Number)
278           ENDDO           ENDDO
279          ENDDO          ENDDO
# Line 281  C-      Gerdes, Koberle and Willebrand, Line 285  C-      Gerdes, Koberle and Willebrand,
285          DO j=1-Oly,sNy+Oly          DO j=1-Oly,sNy+Oly
286           DO i=1-Olx+1,sNx+Olx           DO i=1-Olx+1,sNx+Olx
287            IF ( ABS(SlopeX(i,j)) .GT. GM_maxSlope .AND.            IF ( ABS(SlopeX(i,j)) .GT. GM_maxSlope .AND.
288       &           ABS(SlopeX(i,j)) .LT. slopeCutoff )       &           ABS(SlopeX(i,j)) .LT. slopeCutoff )
289       &           taperX(i,j)=maxSlopeSqr/       &           taperX(i,j)=maxSlopeSqr/
290       &           ( SlopeX(i,j)*SlopeX(i,j) + GM_Small_Number )       &           ( SlopeX(i,j)*SlopeX(i,j) + GM_Small_Number )
291           ENDDO           ENDDO

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

  ViewVC Help
Powered by ViewVC 1.1.22