/[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.39 by dfer, Fri Aug 14 20:31:05 2009 UTC revision 1.40 by dfer, Thu Sep 17 16:57:13 2009 UTC
# Line 81  C     == Global variables == Line 81  C     == Global variables ==
81  #include "tamc.h"  #include "tamc.h"
82  #include "tamc_keys.h"  #include "tamc_keys.h"
83  #endif /* ALLOW_AUTODIFF_TAMC */  #endif /* ALLOW_AUTODIFF_TAMC */
84    #include "MOM_VISC.h"
85    
86  C     == Routine arguments ==  C     == Routine arguments ==
87        INTEGER bi,bj,k        INTEGER bi,bj,k
# Line 108  C     == Local variables == Line 109  C     == Local variables ==
109        _RL leithD2fac, leithD4fac        _RL leithD2fac, leithD4fac
110        _RL viscAhRe_max, viscA4Re_max        _RL viscAhRe_max, viscA4Re_max
111        _RL Alin,grdVrt,grdDiv, keZpt        _RL Alin,grdVrt,grdDiv, keZpt
112        _RL recip_dt,L2,L3,L5,L2rdt,L4rdt        _RL L2,L3,L5,L2rdt,L4rdt
113        _RL Uscl,U4scl        _RL Uscl,U4scl
114        _RL divDx(1-OLx:sNx+OLx,1-OLy:sNy+OLy)        _RL divDx(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
115        _RL divDy(1-OLx:sNx+OLx,1-OLy:sNy+OLy)        _RL divDy(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
# Line 204  C---- variable viscosity : Line 205  C---- variable viscosity :
205       &      (viscC2smag.NE.0.)       &      (viscC2smag.NE.0.)
206       &  .OR.(viscC4smag.NE.0.)       &  .OR.(viscC4smag.NE.0.)
207    
        IF (deltaTmom.NE.0.) THEN  
         recip_dt=1. _d 0/deltaTmom  
        ELSE  
         recip_dt=0. _d 0  
        ENDIF  
   
208         IF (calcSmag) THEN         IF (calcSmag) THEN
209          smag2fac=(viscC2smag/pi)**2          smag2fac=(viscC2smag/pi)**2
210          smag4fac=0.125 _d 0*(viscC4smag/pi)**2          smag4fac=0.125 _d 0*(viscC4smag/pi)**2
# Line 344  CADJ &     = comlev1_mom_ijk_loop , key= Line 339  CADJ &     = comlev1_mom_ijk_loop , key=
339  #endif    /* ALLOW_AUTODIFF_TAMC */  #endif    /* ALLOW_AUTODIFF_TAMC */
340    
341  C These are (powers of) length scales  C These are (powers of) length scales
342           IF (useAreaViscLength) THEN           L2 = L2_D(i,j,bi,bj)
343            L2=rA(i,j,bi,bj)           L2rdt = 0.25 _d 0*recip_dt*L2
344           ELSE           L3 = L3_D(i,j,bi,bj)
345            L2=2. _d 0/((recip_DXF(I,J,bi,bj)**2+recip_DYF(I,J,bi,bj)**2))           L4rdt = L4rdt_D(i,j,bi,bj)
346           ENDIF           L5 = (L2*L3)
          L4rdt=0.03125 _d 0*recip_dt*L2**2  
          L3=(L2**1.5)  
          L5=(L2*L3)  
   
          L2rdt=0.25 _d 0*recip_dt*L2  
347    
348  C Velocity Reynolds Scale  C Velocity Reynolds Scale
349           IF ( viscAhRe_max.GT.0. .AND. KE(i,j).GT.0. ) THEN           IF ( viscAhRe_max.GT.0. .AND. KE(i,j).GT.0. ) THEN
# Line 475  C     Note that previous call of this fu Line 465  C     Note that previous call of this fu
465    
466  CCCCCCCCCCCCC Vorticity Point CalculationsCCCCCCCCCCCCCCCCCC  CCCCCCCCCCCCC Vorticity Point CalculationsCCCCCCCCCCCCCCCCCC
467  C These are (powers of) length scales  C These are (powers of) length scales
468           IF (useAreaViscLength) THEN           L2 = L2_Z(i,j,bi,bj)
469            L2=rAz(i,j,bi,bj)           L2rdt = 0.25 _d 0*recip_dt*L2
470           ELSE           L3 = L3_Z(i,j,bi,bj)
471            L2=2. _d 0/((recip_DXV(I,J,bi,bj)**2+recip_DYU(I,J,bi,bj)**2))           L4rdt = L4rdt_Z(i,j,bi,bj)
472           ENDIF           L5 = (L2*L3)
          L4rdt=0.03125 _d 0*recip_dt*L2**2  
          L3=(L2**1.5)  
          L5=(L2*L3)  
   
          L2rdt=0.25 _d 0*recip_dt*L2  
473    
474  C Velocity Reynolds Scale (Pb here at CS-grid corners !)  C Velocity Reynolds Scale (Pb here at CS-grid corners !)
475           IF ( viscAhRe_max.GT.0. .OR. viscA4Re_max.GT.0. ) THEN           IF ( viscAhRe_max.GT.0. .OR. viscA4Re_max.GT.0. ) THEN

Legend:
Removed from v.1.39  
changed lines
  Added in v.1.40

  ViewVC Help
Powered by ViewVC 1.1.22