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

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

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

revision 1.2 by heimbach, Mon Jan 8 20:11:04 2001 UTC revision 1.7 by heimbach, Tue Aug 21 15:27:19 2001 UTC
# Line 1  Line 1 
1  C $Header$  C $Header$
2    C $Name$
3    
4  #include "GMREDI_OPTIONS.h"  #include "GMREDI_OPTIONS.h"
5    
# Line 43  CEndOfInterface Line 44  CEndOfInterface
44    
45  C     == Local variables ==  C     == Local variables ==
46        _RL Small_Number        _RL Small_Number
47        PARAMETER(Small_Number=1.E-12)        PARAMETER(Small_Number=1.D-12)
48        _RL gradSmod,stratLimit,f1,Smod,f2,Rnondim,Cspd,Lrho        _RL gradSmod,stratLimit,f1,Smod,f2,Rnondim,Cspd,Lrho
49        _RL dSigmaDrLtd        _RL dSigmaDrLtd
50        _RL fpi        _RL fpi
51        PARAMETER(fpi=3.141592653589793047592)        PARAMETER(fpi=3.141592653589793047592d0)
52        INTEGER i,j        INTEGER i,j
53        _RL     sx, sy        _RL     sx, sy
54    
# Line 162  C-      Large, Danabasoglu and Doney, JP Line 163  C-      Large, Danabasoglu and Doney, JP
163             dRdSigmaLtd(i,j)=0.             dRdSigmaLtd(i,j)=0.
164            endif            endif
165            sx   = -SlopeX(i,j)*dRdSigmaLtd(i,j)            sx   = -SlopeX(i,j)*dRdSigmaLtd(i,j)
166            sx   = -SlopeY(i,j)*dRdSigmaLtd(i,j)            sy   = -SlopeY(i,j)*dRdSigmaLtd(i,j)
167            Smod = sx*sx + sy*sy            Smod = sx*sx + sy*sy
168            if (Smod.NE.0.) Smod=sqrt(Smod)            if (Smod.NE.0.) Smod=sqrt(Smod)
169            f1=0.5*(1.+tanh( (GM_Scrit-Smod)/GM_Sd ))            f1=0.5*(1.+tanh( (GM_Scrit-Smod)/GM_Sd ))
# Line 177  C-      Large, Danabasoglu and Doney, JP Line 178  C-      Large, Danabasoglu and Doney, JP
178              Rnondim=0.              Rnondim=0.
179            endif            endif
180            f2=0.5*(1.+sin( fpi*(Rnondim-0.5)))            f2=0.5*(1.+sin( fpi*(Rnondim-0.5)))
181            SlopeX(i,j) = sx*f1            SlopeX(i,j) = sx*f1*f2
182            SlopeY(i,j) = sy*f1            SlopeY(i,j) = sy*f1*f2
183    
184           ENDDO           ENDDO
185          ENDDO          ENDDO

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

  ViewVC Help
Powered by ViewVC 1.1.22