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 | |
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 |
|
|
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 |
|
|
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 |
|
|
192 |
DO j=1-Oly,sNy+Oly |
DO j=1-Oly,sNy+Oly |
193 |
DO i=1-Olx+1,sNx+Olx |
DO i=1-Olx+1,sNx+Olx |
194 |
SlopeX(i,j) = -SlopeX(i,j)/dSigmaDrW(i,j) |
SlopeX(i,j) = -SlopeX(i,j)/dSigmaDrW(i,j) |
195 |
taperX(i,j)= 1. _d 0 |
taperX(i,j) = 1. _d 0 |
196 |
ENDDO |
ENDDO |
197 |
ENDDO |
ENDDO |
198 |
#ifdef ALLOW_AUTODIFF_TAMC |
#ifdef ALLOW_AUTODIFF_TAMC |
224 |
DO j=1-Oly+1,sNy+Oly |
DO j=1-Oly+1,sNy+Oly |
225 |
DO i=1-Olx,sNx+Olx |
DO i=1-Olx,sNx+Olx |
226 |
SlopeY(i,j) = -SlopeY(i,j)/dSigmaDrS(i,j) |
SlopeY(i,j) = -SlopeY(i,j)/dSigmaDrS(i,j) |
227 |
taperY(i,j)=1. _d 0 |
taperY(i,j) = 1. _d 0 |
228 |
ENDDO |
ENDDO |
229 |
ENDDO |
ENDDO |
230 |
#ifdef ALLOW_AUTODIFF_TAMC |
#ifdef ALLOW_AUTODIFF_TAMC |
311 |
DO i=1-Olx+1,sNx+Olx |
DO i=1-Olx+1,sNx+Olx |
312 |
Smod = ABS(SlopeX(i,j)) |
Smod = ABS(SlopeX(i,j)) |
313 |
IF ( Smod .LT. slopeCutoff ) THEN |
IF ( Smod .LT. slopeCutoff ) THEN |
314 |
f1=op5*( 1. _d 0 + TANH( (GM_Scrit-Smod)/GM_Sd )) |
f1=op5*( 1. _d 0 + TANH( (GM_Scrit-Smod)/GM_Sd )) |
315 |
IF (Smod.NE.0.) THEN |
IF (Smod.NE.0.) THEN |
316 |
Rnondim=depthZ/(LrhoW(i,j)*Smod) |
Rnondim = -depthZ/(LrhoW(i,j)*Smod) |
317 |
ELSE |
ELSE |
318 |
Rnondim=0. |
Rnondim = 1. |
319 |
ENDIF |
ENDIF |
320 |
f2=op5*( 1. _d 0 + SIN( fpi*(Rnondim-op5))) |
IF ( Rnondim.GE.1. _d 0 ) THEN |
321 |
taperX(i,j)=f1*f2 |
f2 = 1. _d 0 |
322 |
|
ELSE |
323 |
|
f2 = op5*( 1. _d 0 + SIN( fpi*(Rnondim-op5) )) |
324 |
|
ENDIF |
325 |
|
taperX(i,j)=f1*f2 |
326 |
ENDIF |
ENDIF |
327 |
ENDDO |
ENDDO |
328 |
ENDDO |
ENDDO |
331 |
DO i=1-Olx,sNx+Olx |
DO i=1-Olx,sNx+Olx |
332 |
Smod = ABS(SlopeY(i,j)) |
Smod = ABS(SlopeY(i,j)) |
333 |
IF ( Smod .LT. slopeCutoff ) THEN |
IF ( Smod .LT. slopeCutoff ) THEN |
334 |
f1=op5*( 1. _d 0 + TANH( (GM_Scrit-Smod)/GM_Sd )) |
f1=op5*( 1. _d 0 + TANH( (GM_Scrit-Smod)/GM_Sd )) |
335 |
IF (Smod.NE.0.) THEN |
IF (Smod.NE.0.) THEN |
336 |
Rnondim=depthZ/(LrhoS(i,j)*Smod) |
Rnondim = -depthZ/(LrhoS(i,j)*Smod) |
337 |
ELSE |
ELSE |
338 |
Rnondim=0. |
Rnondim = 1. |
339 |
ENDIF |
ENDIF |
340 |
f2=op5*( 1. _d 0 + SIN( fpi*(Rnondim-op5))) |
IF ( Rnondim.GE.1. _d 0 ) THEN |
341 |
taperY(i,j)=f1*f2 |
f2 = 1. _d 0 |
342 |
|
ELSE |
343 |
|
f2 = op5*( 1. _d 0 + SIN( fpi*(Rnondim-op5) )) |
344 |
|
ENDIF |
345 |
|
taperY(i,j)=f1*f2 |
346 |
ENDIF |
ENDIF |
347 |
ENDDO |
ENDDO |
348 |
ENDDO |
ENDDO |