3 |
|
|
4 |
subroutine GMREDI_YTRANSPORT( |
subroutine GMREDI_YTRANSPORT( |
5 |
I iMin,iMax,jMin,jMax,bi,bj,K, |
I iMin,iMax,jMin,jMax,bi,bj,K, |
6 |
I yA,Tracer, |
I yA,Tracer,tracerIdentity, |
7 |
U df, |
U df, |
8 |
I myThid) |
I myThid) |
9 |
C /==========================================================\ |
C /==========================================================\ |
35 |
INTEGER iMin,iMax,jMin,jMax,bi,bj,k |
INTEGER iMin,iMax,jMin,jMax,bi,bj,k |
36 |
_RS yA(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RS yA(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
37 |
_RL Tracer(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
_RL Tracer(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
38 |
|
integer tracerIdentity |
39 |
_RL df (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RL df (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
40 |
INTEGER myThid |
INTEGER myThid |
41 |
|
|
48 |
_RL vTrans, maskp1, dTdz |
_RL vTrans, maskp1, dTdz |
49 |
|
|
50 |
#ifdef ALLOW_AUTODIFF_TAMC |
#ifdef ALLOW_AUTODIFF_TAMC |
51 |
|
act0 = tracerIdentity - 1 |
52 |
|
max0 = maxpass |
53 |
act1 = bi - myBxLo(myThid) |
act1 = bi - myBxLo(myThid) |
54 |
max1 = myBxHi(myThid) - myBxLo(myThid) + 1 |
max1 = myBxHi(myThid) - myBxLo(myThid) + 1 |
55 |
act2 = bj - myByLo(myThid) |
act2 = bj - myByLo(myThid) |
57 |
act3 = myThid - 1 |
act3 = myThid - 1 |
58 |
max3 = nTx*nTy |
max3 = nTx*nTy |
59 |
act4 = ikey_dynamics - 1 |
act4 = ikey_dynamics - 1 |
60 |
ikey = (act1 + 1) + act2*max1 |
igadkey = (act0 + 1) |
61 |
& + act3*max1*max2 |
& + act1*max0 |
62 |
& + act4*max1*max2*max3 |
& + act2*max0*max1 |
63 |
kkey = (ikey-1)*Nr + k |
& + act3*max0*max1*max2 |
64 |
|
& + act4*max0*max1*max2*max3 |
65 |
|
kkey = (igadkey-1)*Nr + k |
66 |
|
if (tracerIdentity.GT.maxpass) |
67 |
|
& STOP 'maxpass seems smaller than tracerIdentity' |
68 |
#endif /* ALLOW_AUTODIFF_TAMC */ |
#endif /* ALLOW_AUTODIFF_TAMC */ |
69 |
|
|
70 |
IF (useGMRedi) THEN |
IF (useGMRedi) THEN |
71 |
|
|
|
#ifdef GM_NON_UNITY_DIAGONAL |
|
72 |
#ifdef ALLOW_AUTODIFF_TAMC |
#ifdef ALLOW_AUTODIFF_TAMC |
73 |
CADJ STORE Kvy(:,:,k,bi,bj) = comlev1_bibj_k, key=kkey, byte=isbyte |
# ifdef GM_NON_UNITY_DIAGONAL |
74 |
#endif |
CADJ STORE Kvy(:,:,k,bi,bj) = |
75 |
|
CADJ & comlev1_gmredi_k_gad, key=kkey, byte=isbyte |
76 |
|
# endif |
77 |
|
# ifdef GM_EXTRA_DIAGONAL |
78 |
|
CADJ STORE Kvz(:,:,k,bi,bj) = |
79 |
|
CADJ & comlev1_gmredi_k_gad, key=kkey, byte=isbyte |
80 |
|
# endif |
81 |
#endif |
#endif |
82 |
|
|
83 |
C-- Area integrated meridional flux |
C-- Area integrated meridional flux |
90 |
#else |
#else |
91 |
& *(GM_isopycK |
& *(GM_isopycK |
92 |
#ifdef GM_VISBECK_VARIABLE_K |
#ifdef GM_VISBECK_VARIABLE_K |
93 |
& +0.5*(VisbeckK(i,j,bi,bj)+VisbeckK(i,j-1,bi,bj)) |
cph & +0.5*(VisbeckK(i,j,bi,bj)+VisbeckK(i,j-1,bi,bj)) |
94 |
#endif |
#endif |
95 |
& ) |
& ) |
96 |
#endif /* GM_NON_UNITY_DIAGONAL */ |
#endif /* GM_NON_UNITY_DIAGONAL */ |