/[MITgcm]/MITgcm/pkg/mom_fluxform/mom_fluxform.F
ViewVC logotype

Diff of /MITgcm/pkg/mom_fluxform/mom_fluxform.F

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

revision 1.34 by jmc, Thu Mar 30 19:49:41 2006 UTC revision 1.35 by heimbach, Wed May 3 23:35:11 2006 UTC
# Line 52  C     == Global variables == Line 52  C     == Global variables ==
52  #include "PARAMS.h"  #include "PARAMS.h"
53  #include "GRID.h"  #include "GRID.h"
54  #include "SURFACE.h"  #include "SURFACE.h"
55    #ifdef ALLOW_AUTODIFF_TAMC
56    # include "tamc.h"
57    # include "tamc_keys.h"
58    # include "MOM_FLUXFORM.h"
59    #endif
60    
61  C !INPUT PARAMETERS: ===================================================  C !INPUT PARAMETERS: ===================================================
62  C  bi,bj                :: tile indices  C  bi,bj                :: tile indices
# Line 93  C  fZon                 :: zonal fluxes Line 98  C  fZon                 :: zonal fluxes
98  C  fMer                 :: meridional fluxes  C  fMer                 :: meridional fluxes
99  C  fVrUp,fVrDw          :: vertical viscous fluxes at interface k-1 & k  C  fVrUp,fVrDw          :: vertical viscous fluxes at interface k-1 & k
100        INTEGER i,j        INTEGER i,j
101    #ifdef ALLOW_AUTODIFF_TAMC
102          INTEGER imomkey
103    #endif
104        _RL vF(1-OLx:sNx+OLx,1-OLy:sNy+OLy)        _RL vF(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
105        _RL v4F(1-OLx:sNx+OLx,1-OLy:sNy+OLy)        _RL v4F(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
106        _RL cF(1-OLx:sNx+OLx,1-OLy:sNy+OLy)        _RL cF(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
# Line 151  C     uDudxFac, AhDudxFac, etc ... indiv Line 159  C     uDudxFac, AhDudxFac, etc ... indiv
159        LOGICAL bottomDragTerms,harmonic,biharmonic,useVariableViscosity        LOGICAL bottomDragTerms,harmonic,biharmonic,useVariableViscosity
160  CEOP  CEOP
161    
162    #ifdef ALLOW_AUTODIFF_TAMC
163              act0 = k - 1
164              max0 = Nr
165              act1 = bi - myBxLo(myThid)
166              max1 = myBxHi(myThid) - myBxLo(myThid) + 1
167              act2 = bj - myByLo(myThid)
168              max2 = myByHi(myThid) - myByLo(myThid) + 1
169              act3 = myThid - 1
170              max3 = nTx*nTy
171              act4 = ikey_dynamics - 1
172              imomkey = (act0 + 1)
173         &                    + act1*max0
174         &                    + act2*max0*max1
175         &                    + act3*max0*max1*max2
176         &                    + act4*max0*max1*max2*max3
177    #endif /* ALLOW_AUTODIFF_TAMC */
178    
179  C     Initialise intermediate terms  C     Initialise intermediate terms
180        DO j=1-OLy,sNy+OLy        DO j=1-OLy,sNy+OLy
181         DO i=1-OLx,sNx+OLx         DO i=1-OLx,sNx+OLx
# Line 277  C---  First call (k=1): compute vertical Line 302  C---  First call (k=1): compute vertical
302        IF (momAdvection.AND.k.EQ.1) THEN        IF (momAdvection.AND.k.EQ.1) THEN
303    
304  C-    Calculate vertical transports above U & V points (West & South face):  C-    Calculate vertical transports above U & V points (West & South face):
305    
306    #ifdef ALLOW_AUTODIFF_TAMC
307    CADJ STORE dwtransc(:,:,bi,bj) =
308    CADJ &     comlev1_bibj_k, key = imomkey, byte = isbyte
309    CADJ STORE dwtransu(:,:,bi,bj) =
310    CADJ &     comlev1_bibj_k, key = imomkey, byte = isbyte
311    CADJ STORE dwtransv(:,:,bi,bj) =
312    CADJ &     comlev1_bibj_k, key = imomkey, byte = isbyte
313    #endif /* ALLOW_AUTODIFF_TAMC */
314          CALL MOM_CALC_RTRANS( k, bi, bj,          CALL MOM_CALC_RTRANS( k, bi, bj,
315       O                        rTransU, rTransV,       O                        rTransU, rTransV,
316       I                        myTime, myIter, myThid)       I                        myTime, myIter, myThid)

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.35

  ViewVC Help
Powered by ViewVC 1.1.22