60 |
act3 = myThid - 1 |
act3 = myThid - 1 |
61 |
max3 = nTx*nTy |
max3 = nTx*nTy |
62 |
act4 = ikey_dynamics - 1 |
act4 = ikey_dynamics - 1 |
63 |
ikey = (act1 + 1) + act2*max1 |
igmkey = (act1 + 1) + act2*max1 |
64 |
& + act3*max1*max2 |
& + act3*max1*max2 |
65 |
& + act4*max1*max2*max3 |
& + act4*max1*max2*max3 |
66 |
#endif /* ALLOW_AUTODIFF_TAMC */ |
#endif /* ALLOW_AUTODIFF_TAMC */ |
67 |
|
|
68 |
#ifdef ALLOW_AUTODIFF_TAMC |
#ifdef ALLOW_AUTODIFF_TAMC |
69 |
# ifdef GM_VISBECK_VARIABLE_K |
# ifdef GM_VISBECK_VARIABLE_K |
70 |
CADJ STORE VisbeckK(:,:,bi,bj) = comlev1_bibj, key=ikey, byte=isbyte |
CADJ STORE VisbeckK(:,:,bi,bj) = comlev1_bibj, key=igmkey, byte=isbyte |
71 |
# endif |
# endif |
72 |
#endif |
#endif |
73 |
IF (GM_AdvForm) THEN |
IF (GM_AdvForm) THEN |
75 |
km1 = k-1 |
km1 = k-1 |
76 |
|
|
77 |
#ifdef ALLOW_AUTODIFF_TAMC |
#ifdef ALLOW_AUTODIFF_TAMC |
78 |
kkey = (ikey-1)*Nr + k |
kkey = (igmkey-1)*Nr + k |
79 |
DO j=1-Oly,sNy+Oly |
DO j=1-Oly,sNy+Oly |
80 |
DO i=1-Olx,sNx+Olx |
DO i=1-Olx,sNx+Olx |
81 |
SlopeX(i,j) = 0. _d 0 |
SlopeX(i,j) = 0. _d 0 |
90 |
DO i=1-Olx+1,sNx+Olx-1 |
DO i=1-Olx+1,sNx+Olx-1 |
91 |
|
|
92 |
C Gradient of Sigma below U and V points |
C Gradient of Sigma below U and V points |
93 |
SlopeX(i,j)=0.5*( sigmaX(i,j,km1)+sigmaX(i,j,k) ) |
SlopeX(i,j)=op5*( sigmaX(i,j,km1)+sigmaX(i,j,k) ) |
94 |
& *maskW(i,j,k,bi,bj) |
& *maskW(i,j,k,bi,bj) |
95 |
dSigmaDrW(i,j)=0.5*( sigmaR(i-1,j,k)+sigmaR(i,j,k) ) |
dSigmaDrW(i,j)=op5*( sigmaR(i-1,j,k)+sigmaR(i,j,k) ) |
96 |
& *maskW(i,j,k,bi,bj) |
& *maskW(i,j,k,bi,bj) |
97 |
SlopeY(i,j)=0.5*( sigmaY(i,j,km1)+sigmaY(i,j,k) ) |
SlopeY(i,j)=op5*( sigmaY(i,j,km1)+sigmaY(i,j,k) ) |
98 |
& *maskS(i,j,k,bi,bj) |
& *maskS(i,j,k,bi,bj) |
99 |
dSigmaDrS(i,j)=0.5*( sigmaR(i,j-1,k)+sigmaR(i,j,k) ) |
dSigmaDrS(i,j)=op5*( sigmaR(i,j-1,k)+sigmaR(i,j,k) ) |
100 |
& *maskS(i,j,k,bi,bj) |
& *maskS(i,j,k,bi,bj) |
101 |
|
|
102 |
ENDDO |
ENDDO |
124 |
GM_PsiX(i,j,k,bi,bj) = SlopeX(i,j)*taperX(i,j) |
GM_PsiX(i,j,k,bi,bj) = SlopeX(i,j)*taperX(i,j) |
125 |
& *( GM_background_K |
& *( GM_background_K |
126 |
#ifdef GM_VISBECK_VARIABLE_K |
#ifdef GM_VISBECK_VARIABLE_K |
127 |
& +0.5*(VisbeckK(i-1,j,bi,bj)+VisbeckK(i,j,bi,bj)) |
& +op5*(VisbeckK(i-1,j,bi,bj)+VisbeckK(i,j,bi,bj)) |
128 |
#endif |
#endif |
129 |
& )*maskW(i,j,k,bi,bj) |
& )*maskW(i,j,k,bi,bj) |
130 |
GM_PsiY(i,j,k,bi,bj) = SlopeY(i,j)*taperY(i,j) |
GM_PsiY(i,j,k,bi,bj) = SlopeY(i,j)*taperY(i,j) |
131 |
& *( GM_background_K |
& *( GM_background_K |
132 |
#ifdef GM_VISBECK_VARIABLE_K |
#ifdef GM_VISBECK_VARIABLE_K |
133 |
& +0.5*(VisbeckK(i,j-1,bi,bj)+VisbeckK(i,j,bi,bj)) |
& +op5*(VisbeckK(i,j-1,bi,bj)+VisbeckK(i,j,bi,bj)) |
134 |
#endif |
#endif |
135 |
& )*maskS(i,j,k,bi,bj) |
& )*maskS(i,j,k,bi,bj) |
136 |
|
|