/[MITgcm]/MITgcm/pkg/mom_common/mom_calc_visc.F
ViewVC logotype

Diff of /MITgcm/pkg/mom_common/mom_calc_visc.F

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

revision 1.33 by heimbach, Fri Apr 18 18:11:43 2008 UTC revision 1.34 by heimbach, Mon Apr 21 15:17:33 2008 UTC
# Line 102  C     == Local variables == Line 102  C     == Local variables ==
102  #ifdef ALLOW_NONHYDROSTATIC  #ifdef ALLOW_NONHYDROSTATIC
103        INTEGER kp1        INTEGER kp1
104  #endif  #endif
105        INTEGER lockey        INTEGER lockey_1, lockey_2
106        _RL smag2fac, smag4fac        _RL smag2fac, smag4fac
107        _RL leith2fac, leith4fac        _RL leith2fac, leith4fac
108        _RL leithD2fac, leithD4fac        _RL leithD2fac, leithD4fac
# Line 136  C     == Local variables == Line 136  C     == Local variables ==
136        _RL viscA4_DSmg(1-OLx:sNx+OLx,1-OLy:sNy+OLy)        _RL viscA4_DSmg(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
137        LOGICAL calcLeith, calcSmag        LOGICAL calcLeith, calcSmag
138    
139    cph(
140          print *, 'ph-test a ', mythid, k
141          print *, 'ph-test b ', myBxLo(myThid)
142    cph)
143  #ifdef ALLOW_AUTODIFF_TAMC  #ifdef ALLOW_AUTODIFF_TAMC
144            act1 = bi - myBxLo(myThid)            act1 = bi - myBxLo(myThid)
145            max1 = myBxHi(myThid) - myBxLo(myThid) + 1            max1 = myBxHi(myThid) - myBxLo(myThid) + 1
# Line 147  C     == Local variables == Line 151  C     == Local variables ==
151            ikey = (act1 + 1) + act2*max1            ikey = (act1 + 1) + act2*max1
152       &                      + act3*max1*max2       &                      + act3*max1*max2
153       &                      + act4*max1*max2*max3       &                      + act4*max1*max2*max3
154            lockey = (ikey-1)*Nr + k            lockey_1 = (ikey-1)*Nr + k
155  #endif /* ALLOW_AUTODIFF_TAMC */  #endif /* ALLOW_AUTODIFF_TAMC */
156    
157  C--   Set flags which are used in this S/R and elsewhere :  C--   Set flags which are used in this S/R and elsewhere :
# Line 328  C-       gradient in y direction: Line 332  C-       gradient in y direction:
332    
333         ENDIF         ENDIF
334    
 #ifdef    ALLOW_AUTODIFF_TAMC  
 cphCADJ STORE viscA4_ZSmg(:,:)  
 cphCADJ &     = comlev1_bibj_k , key=lockey, byte=isbyte  
 cphCADJ STORE viscAh_ZSmg(:,:)  
 cphCADJ &     = comlev1_bibj_k , key=lockey, byte=isbyte  
 #endif    /* ALLOW_AUTODIFF_TAMC */  
   
335         DO j=2-Oly,sNy+Oly-1         DO j=2-Oly,sNy+Oly-1
336          DO i=2-Olx,sNx+Olx-1          DO i=2-Olx,sNx+Olx-1
337  CCCCCCCCCCCCCCC Divergence Point CalculationsCCCCCCCCCCCCCCCCCCCC  CCCCCCCCCCCCCCC Divergence Point CalculationsCCCCCCCCCCCCCCCCCCCC
338    
339    #ifdef    ALLOW_AUTODIFF_TAMC
340    # ifndef AUTODIFF_DISABLE_LEITH
341               lockey_2 = i + sNx*(j-1) + sNx*sNy*(lockey_1-1)
342    CADJ STORE viscA4_ZSmg(i,j)
343    CADJ &     = comlev1_mom_ijk_loop , key=lockey_2, byte=isbyte
344    CADJ STORE viscAh_ZSmg(i,j)
345    CADJ &     = comlev1_mom_ijk_loop , key=lockey_2, byte=isbyte
346    # endif
347    #endif    /* ALLOW_AUTODIFF_TAMC */
348    
349  C These are (powers of) length scales  C These are (powers of) length scales
350           IF (useAreaViscLength) THEN           IF (useAreaViscLength) THEN
351            L2=rA(i,j,bi,bj)            L2=rA(i,j,bi,bj)

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

  ViewVC Help
Powered by ViewVC 1.1.22