|
C $Header$ |
|
|
C $Name$ |
|
1 |
|
|
2 |
#include "GMREDI_OPTIONS.h" |
#include "GMREDI_OPTIONS.h" |
3 |
|
|
21 |
#include "GRID.h" |
#include "GRID.h" |
22 |
#include "GMREDI.h" |
#include "GMREDI.h" |
23 |
|
|
24 |
|
#ifdef ALLOW_AUTODIFF_TAMC |
25 |
|
#include "tamc.h" |
26 |
|
#include "tamc_keys.h" |
27 |
|
#endif /* ALLOW_AUTODIFF_TAMC */ |
28 |
|
|
29 |
C == Routine arguments == |
C == Routine arguments == |
30 |
C iMin,iMax,jMin, - Range of points for which calculation |
C iMin,iMax,jMin, - Range of points for which calculation |
31 |
C jMax,bi,bj,k results will be set. |
C jMax,bi,bj,k results will be set. |
46 |
INTEGER km1,kp1 |
INTEGER km1,kp1 |
47 |
_RL uTrans, maskp1, dTdz |
_RL uTrans, maskp1, dTdz |
48 |
|
|
49 |
|
#ifdef ALLOW_AUTODIFF_TAMC |
50 |
|
act1 = bi - myBxLo(myThid) |
51 |
|
max1 = myBxHi(myThid) - myBxLo(myThid) + 1 |
52 |
|
act2 = bj - myByLo(myThid) |
53 |
|
max2 = myByHi(myThid) - myByLo(myThid) + 1 |
54 |
|
act3 = myThid - 1 |
55 |
|
max3 = nTx*nTy |
56 |
|
act4 = ikey_dynamics - 1 |
57 |
|
ikey = (act1 + 1) + act2*max1 |
58 |
|
& + act3*max1*max2 |
59 |
|
& + act4*max1*max2*max3 |
60 |
|
kkey = (ikey-1)*Nr + k |
61 |
|
#endif /* ALLOW_AUTODIFF_TAMC */ |
62 |
|
|
63 |
IF (useGMRedi) THEN |
IF (useGMRedi) THEN |
64 |
|
|
65 |
|
#ifdef GM_NON_UNITY_DIAGONAL |
66 |
|
#ifdef ALLOW_AUTODIFF_TAMC |
67 |
|
CADJ STORE Kux(:,:,k,bi,bj) = comlev1_bibj_k, key=kkey, byte=isbyte |
68 |
|
#endif |
69 |
|
#endif |
70 |
|
|
71 |
C-- Area integrated zonal flux |
C-- Area integrated zonal flux |
72 |
DO j=jMin,jMax |
DO j=jMin,jMax |