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

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

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

revision 1.7 by heimbach, Sun Mar 24 02:33:16 2002 UTC revision 1.9 by heimbach, Thu Nov 14 22:43:49 2002 UTC
# Line 3  Line 3 
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     /==========================================================\
# Line 35  C     df               - Diffusive flux Line 35  C     df               - Diffusive flux
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    
# Line 47  C     I, J - Loop counters Line 48  C     I, J - Loop counters
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)
# Line 54  C     I, J - Loop counters Line 57  C     I, J - Loop counters
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
# Line 78  C--   Area integrated meridional flux Line 90  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 */

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

  ViewVC Help
Powered by ViewVC 1.1.22