/[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.8 by jmc, Fri Nov 4 01:31:36 2005 UTC revision 1.10 by heimbach, Tue Jun 26 15:34:15 2007 UTC
# Line 17  C     |================================= Line 17  C     |=================================
17  C     | On entry:                                                |  C     | On entry:                                                |
18  C     |            dSigmaDrW,S  contains the d/dz Sigma          |  C     |            dSigmaDrW,S  contains the d/dz Sigma          |
19  C     |            SlopeX/Y     contains X/Y gradients of sigma  |  C     |            SlopeX/Y     contains X/Y gradients of sigma  |
20  C     |            depthZ       contains the height (m) of level |  C     |            depthZ       contains the depth (< 0 !) [m]   |
21  C     | On exit:                                                 |  C     | On exit:                                                 |
22  C     |            dSigmaDrW,S  contains the effective dSig/dz   |  C     |            dSigmaDrW,S  contains the effective dSig/dz   |
23  C     |            SlopeX/Y     contains X/Y slopes              |  C     |            SlopeX/Y     contains X/Y slopes              |
# 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)
50        _RL depthZ        _RS depthZ
51        INTEGER K,bi,bj,myThid        INTEGER K,bi,bj,myThid
52  CEndOfInterface  CEndOfInterface
53    
# Line 124  CADJ STORE dSigmaDrW(:,:)    = comlev1_b Line 124  CADJ STORE dSigmaDrW(:,:)    = comlev1_b
124          DO j=1-Oly,sNy+Oly          DO j=1-Oly,sNy+Oly
125           DO i=1-Olx+1,sNx+Olx           DO i=1-Olx+1,sNx+Olx
126            SlopeX(i,j) = -SlopeX(i,j)/dSigmaDrW(i,j)            SlopeX(i,j) = -SlopeX(i,j)/dSigmaDrW(i,j)
127            taperX(i,j)=1. _d 0            taperX(i,j) = 1. _d 0
128           ENDDO           ENDDO
129          ENDDO          ENDDO
130    
# Line 159  CADJ STORE dSigmaDrS(:,:)    = comlev1_b Line 159  CADJ STORE dSigmaDrS(:,:)    = comlev1_b
159          DO j=1-Oly+1,sNy+Oly          DO j=1-Oly+1,sNy+Oly
160           DO i=1-Olx,sNx+Olx           DO i=1-Olx,sNx+Olx
161            SlopeY(i,j) = -SlopeY(i,j)/dSigmaDrS(i,j)            SlopeY(i,j) = -SlopeY(i,j)/dSigmaDrS(i,j)
162            taperY(i,j)=1. _d 0            taperY(i,j) = 1. _d 0
163           ENDDO           ENDDO
164          ENDDO          ENDDO
165    
166  #endif /* GM_EXCLUDE_CLIPPING */  #endif /* GM_EXCLUDE_CLIPPING */
167    
168          ELSEIF (GM_taper_scheme.EQ.'fm07') THEN
169    
170            STOP 'GMREDI_SLOPE_PSI: AdvForm not yet implemented for fm07'
171    
172        ELSE        ELSE
173    
174  #ifdef GM_EXCLUDE_TAPERING  #ifdef GM_EXCLUDE_TAPERING
# Line 192  CADJ STORE dsigmadrW(:,:)    = comlev1_b Line 196  CADJ STORE dsigmadrW(:,:)    = comlev1_b
196          DO j=1-Oly,sNy+Oly          DO j=1-Oly,sNy+Oly
197           DO i=1-Olx+1,sNx+Olx           DO i=1-Olx+1,sNx+Olx
198            SlopeX(i,j) = -SlopeX(i,j)/dSigmaDrW(i,j)            SlopeX(i,j) = -SlopeX(i,j)/dSigmaDrW(i,j)
199            taperX(i,j)= 1. _d 0            taperX(i,j) = 1. _d 0
200           ENDDO           ENDDO
201          ENDDO          ENDDO
202  #ifdef ALLOW_AUTODIFF_TAMC  #ifdef ALLOW_AUTODIFF_TAMC
# Line 224  CADJ STORE dsigmadrS(:,:)    = comlev1_b Line 228  CADJ STORE dsigmadrS(:,:)    = comlev1_b
228          DO j=1-Oly+1,sNy+Oly          DO j=1-Oly+1,sNy+Oly
229           DO i=1-Olx,sNx+Olx           DO i=1-Olx,sNx+Olx
230            SlopeY(i,j) = -SlopeY(i,j)/dSigmaDrS(i,j)            SlopeY(i,j) = -SlopeY(i,j)/dSigmaDrS(i,j)
231            taperY(i,j)=1. _d 0            taperY(i,j) = 1. _d 0
232           ENDDO           ENDDO
233          ENDDO          ENDDO
234  #ifdef ALLOW_AUTODIFF_TAMC  #ifdef ALLOW_AUTODIFF_TAMC
# Line 311  C-      Large, Danabasoglu and Doney, JP Line 315  C-      Large, Danabasoglu and Doney, JP
315           DO i=1-Olx+1,sNx+Olx           DO i=1-Olx+1,sNx+Olx
316            Smod = ABS(SlopeX(i,j))            Smod = ABS(SlopeX(i,j))
317            IF ( Smod .LT. slopeCutoff ) THEN            IF ( Smod .LT. slopeCutoff ) THEN
318            f1=op5*( 1. _d 0 + TANH( (GM_Scrit-Smod)/GM_Sd ))              f1=op5*( 1. _d 0 + TANH( (GM_Scrit-Smod)/GM_Sd ))
319            IF (Smod.NE.0.) THEN              IF (Smod.NE.0.) THEN
320              Rnondim=depthZ/(LrhoW(i,j)*Smod)                Rnondim = -depthZ/(LrhoW(i,j)*Smod)
321            ELSE              ELSE
322              Rnondim=0.                Rnondim = 1.
323            ENDIF              ENDIF
324            f2=op5*( 1. _d 0 + SIN( fpi*(Rnondim-op5)))              IF ( Rnondim.GE.1. _d 0 ) THEN
325            taperX(i,j)=f1*f2                f2 = 1. _d 0
326                ELSE
327                  f2 = op5*( 1. _d 0 + SIN( fpi*(Rnondim-op5) ))
328                ENDIF
329                taperX(i,j)=f1*f2
330            ENDIF            ENDIF
331           ENDDO           ENDDO
332          ENDDO          ENDDO
# Line 327  C-      Large, Danabasoglu and Doney, JP Line 335  C-      Large, Danabasoglu and Doney, JP
335           DO i=1-Olx,sNx+Olx           DO i=1-Olx,sNx+Olx
336            Smod = ABS(SlopeY(i,j))            Smod = ABS(SlopeY(i,j))
337            IF ( Smod .LT. slopeCutoff ) THEN            IF ( Smod .LT. slopeCutoff ) THEN
338            f1=op5*( 1. _d 0 + TANH( (GM_Scrit-Smod)/GM_Sd ))              f1=op5*( 1. _d 0 + TANH( (GM_Scrit-Smod)/GM_Sd ))
339            IF (Smod.NE.0.) THEN              IF (Smod.NE.0.) THEN
340              Rnondim=depthZ/(LrhoS(i,j)*Smod)                Rnondim = -depthZ/(LrhoS(i,j)*Smod)
341            ELSE              ELSE
342              Rnondim=0.                Rnondim = 1.
343            ENDIF              ENDIF
344            f2=op5*( 1. _d 0 + SIN( fpi*(Rnondim-op5)))              IF ( Rnondim.GE.1. _d 0 ) THEN
345            taperY(i,j)=f1*f2                f2 = 1. _d 0
346                ELSE
347                  f2 = op5*( 1. _d 0 + SIN( fpi*(Rnondim-op5) ))
348                ENDIF
349                taperY(i,j)=f1*f2
350            ENDIF            ENDIF
351           ENDDO           ENDDO
352          ENDDO          ENDDO

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

  ViewVC Help
Powered by ViewVC 1.1.22