/[MITgcm]/MITgcm/model/src/calc_gs.F
ViewVC logotype

Diff of /MITgcm/model/src/calc_gs.F

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

revision 1.41 by jmc, Sun Nov 6 22:19:08 2005 UTC revision 1.44 by jmc, Wed Mar 1 03:08:50 2006 UTC
# Line 51  C     == GLobal variables == Line 51  C     == GLobal variables ==
51  #ifdef ALLOW_GENERIC_ADVDIFF  #ifdef ALLOW_GENERIC_ADVDIFF
52  #include "GAD.h"  #include "GAD.h"
53  #endif  #endif
54    #ifdef ALLOW_AUTODIFF_TAMC
55    # include "tamc.h"
56    # include "tamc_keys.h"
57    #endif
58    
59  C     !INPUT/OUTPUT PARAMETERS:  C     !INPUT/OUTPUT PARAMETERS:
60  C     == Routine arguments ==  C     == Routine arguments ==
# Line 92  C     === Local variables === Line 96  C     === Local variables ===
96  #endif  #endif
97    
98  #ifdef ALLOW_AUTODIFF_TAMC  #ifdef ALLOW_AUTODIFF_TAMC
99              act1 = bi - myBxLo(myThid)
100              max1 = myBxHi(myThid) - myBxLo(myThid) + 1
101              act2 = bj - myByLo(myThid)
102              max2 = myByHi(myThid) - myByLo(myThid) + 1
103              act3 = myThid - 1
104              max3 = nTx*nTy
105              act4 = ikey_dynamics - 1
106              itdkey = (act1 + 1) + act2*max1
107         &                      + act3*max1*max2
108         &                      + act4*max1*max2*max3
109              kkey = (itdkey-1)*Nr + k
110    #endif /* ALLOW_AUTODIFF_TAMC */
111    
112    #ifdef ALLOW_AUTODIFF_TAMC
113  C--   only the kUp part of fverS is set in this subroutine  C--   only the kUp part of fverS is set in this subroutine
114  C--   the kDown is still required  C--   the kDown is still required
115        fVerS(1,1,kDown) = fVerS(1,1,kDown)        fVerS(1,1,kDown) = fVerS(1,1,kDown)
116    # ifdef NONLIN_FRSURF
117    CADJ STORE fVerS(:,:,:) = comlev1_bibj_k, key=kkey, byte=isbyte
118    # endif
119  #endif  #endif
120    
121  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
# Line 104  C---+----1----+----2----+----3----+----4 Line 125  C---+----1----+----2----+----3----+----4
125        IF (staggerTimeStep) iterNb = myIter - 1        IF (staggerTimeStep) iterNb = myIter - 1
126    
127  #ifdef ALLOW_ADAMSBASHFORTH_3  #ifdef ALLOW_ADAMSBASHFORTH_3
       IF ( AdamsBashforth_S ) THEN  
128          m1 = 1 + MOD(iterNb+1,2)          m1 = 1 + MOD(iterNb+1,2)
129          m2 = 1 + MOD( iterNb ,2)          m2 = 1 + MOD( iterNb ,2)
130          CALL GAD_CALC_RHS(          CALL GAD_CALC_RHS(
# Line 114  C---+----1----+----2----+----3----+----4 Line 134  C---+----1----+----2----+----3----+----4
134       I           diffKhS, diffK4S, KappaRS,       I           diffKhS, diffK4S, KappaRS,
135       I           gsNm(1-Olx,1-Oly,1,1,1,m2), salt,       I           gsNm(1-Olx,1-Oly,1,1,1,m2), salt,
136       I           GAD_SALINITY, saltAdvScheme, saltVertAdvScheme,       I           GAD_SALINITY, saltAdvScheme, saltVertAdvScheme,
137       I           calcAdvection, saltImplVertAdv,       I           calcAdvection, saltImplVertAdv, AdamsBashforth_S,
138       U           fVerS, gS,       U           fVerS, gS,
139       I           myTime, myIter, myThid )       I           myTime, myIter, myThid )
140        ELSE  #else /* ALLOW_ADAMSBASHFORTH_3 */
 #endif /* ALLOW_ADAMSBASHFORTH_3 */  
141          CALL GAD_CALC_RHS(          CALL GAD_CALC_RHS(
142       I           bi,bj,iMin,iMax,jMin,jMax,k,kM1,kUp,kDown,       I           bi,bj,iMin,iMax,jMin,jMax,k,kM1,kUp,kDown,
143       I           xA,yA,uTrans,vTrans,rTrans,rTransKp1,maskUp,       I           xA,yA,uTrans,vTrans,rTrans,rTransKp1,maskUp,
144       I           uVel, vVel, wVel,       I           uVel, vVel, wVel,
145       I           diffKhS, diffK4S, KappaRS, salt, salt,       I           diffKhS, diffK4S, KappaRS, gsNm1, salt,
146       I           GAD_SALINITY, saltAdvScheme, saltVertAdvScheme,       I           GAD_SALINITY, saltAdvScheme, saltVertAdvScheme,
147       I           calcAdvection, saltImplVertAdv,       I           calcAdvection, saltImplVertAdv, AdamsBashforth_S,
148       U           fVerS, gS,       U           fVerS, gS,
149       I           myTime, myIter, myThid )       I           myTime, myIter, myThid )
150  #ifdef ALLOW_ADAMSBASHFORTH_3  #endif /* ALLOW_ADAMSBASHFORTH_3 */
       ENDIF  
 #endif  
151    
152  C--   External salinity forcing term(s) inside Adams-Bashforth:  C--   External salinity forcing term(s) inside Adams-Bashforth:
153        IF ( saltForcing .AND. forcing_In_AB )        IF ( saltForcing .AND. forcing_In_AB )

Legend:
Removed from v.1.41  
changed lines
  Added in v.1.44

  ViewVC Help
Powered by ViewVC 1.1.22