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 |
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) |
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 |
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 |
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 |