1 |
C $Header$ |
C $Header$ |
2 |
C $Name$ |
C $Name$ |
3 |
|
|
4 |
|
#include "PACKAGES_CONFIG.h" |
5 |
#include "CPP_OPTIONS.h" |
#include "CPP_OPTIONS.h" |
6 |
|
|
7 |
SUBROUTINE MOM_VECINV( |
SUBROUTINE MOM_VECINV( |
57 |
INTEGER myThid |
INTEGER myThid |
58 |
INTEGER bi,bj,iMin,iMax,jMin,jMax |
INTEGER bi,bj,iMin,iMax,jMin,jMax |
59 |
|
|
60 |
#ifndef DISABLE_MOM_VECINV |
#ifdef ALLOW_MOM_VECINV |
61 |
|
|
62 |
C == Functions == |
C == Functions == |
63 |
LOGICAL DIFFERENT_MULTIPLE |
LOGICAL DIFFERENT_MULTIPLE |
79 |
_RS r_hFacZ(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RS r_hFacZ(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
80 |
_RS xA(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RS xA(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
81 |
_RS yA(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RS yA(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
|
_RL uTrans(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
|
|
_RL vTrans(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
|
82 |
_RL uFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RL uFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
83 |
_RL vFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RL vFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
84 |
_RL dStar(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RL dStar(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
116 |
_RL phyFac |
_RL phyFac |
117 |
_RL vForcFac |
_RL vForcFac |
118 |
_RL mtFacV |
_RL mtFacV |
|
INTEGER km1,kp1 |
|
119 |
_RL wVelBottomOverride |
_RL wVelBottomOverride |
120 |
LOGICAL bottomDragTerms |
LOGICAL bottomDragTerms |
121 |
_RL KE(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RL KE(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
123 |
_RL vort3(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RL vort3(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
124 |
_RL hDiv(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RL hDiv(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
125 |
|
|
126 |
km1=MAX(1,k-1) |
#ifdef ALLOW_AUTODIFF_TAMC |
127 |
kp1=MIN(Nr,k+1) |
C-- only the kDown part of fverU/V is set in this subroutine |
128 |
|
C-- the kUp is still required |
129 |
|
C-- In the case of mom_fluxform Kup is set as well |
130 |
|
C-- (at least in part) |
131 |
|
fVerU(1,1,kUp) = fVerU(1,1,kUp) |
132 |
|
fVerV(1,1,kUp) = fVerV(1,1,kUp) |
133 |
|
#endif |
134 |
|
|
135 |
rVelMaskOverride=1. |
rVelMaskOverride=1. |
136 |
IF ( k .EQ. 1 ) rVelMaskOverride=freeSurfFac |
IF ( k .EQ. 1 ) rVelMaskOverride=freeSurfFac |
137 |
wVelBottomOverride=1. |
wVelBottomOverride=1. |
156 |
vort3(i,j) = 0. |
vort3(i,j) = 0. |
157 |
omega3(i,j) = 0. |
omega3(i,j) = 0. |
158 |
ke(i,j) = 0. |
ke(i,j) = 0. |
159 |
|
#ifdef ALLOW_AUTODIFF_TAMC |
160 |
|
strain(i,j) = 0. _d 0 |
161 |
|
tension(i,j) = 0. _d 0 |
162 |
|
#endif |
163 |
ENDDO |
ENDDO |
164 |
ENDDO |
ENDDO |
165 |
|
|
226 |
ENDDO |
ENDDO |
227 |
ENDDO |
ENDDO |
228 |
|
|
|
C Calculate velocity field "volume transports" through tracer cell faces. |
|
|
DO j=1-OLy,sNy+OLy |
|
|
DO i=1-OLx,sNx+OLx |
|
|
uTrans(i,j) = uFld(i,j)*xA(i,j) |
|
|
vTrans(i,j) = vFld(i,j)*yA(i,j) |
|
|
ENDDO |
|
|
ENDDO |
|
|
|
|
229 |
C note (jmc) : Dissipation and Vort3 advection do not necesary |
C note (jmc) : Dissipation and Vort3 advection do not necesary |
230 |
C use the same maskZ (and hFacZ) => needs 2 call(s) |
C use the same maskZ (and hFacZ) => needs 2 call(s) |
231 |
c CALL MOM_VI_HFACZ_DISS(bi,bj,k,hFacZ,r_hFacZ,myThid) |
c CALL MOM_VI_HFACZ_DISS(bi,bj,k,hFacZ,r_hFacZ,myThid) |
311 |
ENDDO |
ENDDO |
312 |
ENDDO |
ENDDO |
313 |
ENDIF |
ENDIF |
314 |
|
|
315 |
C- No-slip BCs impose a drag at bottom |
C- No-slip BCs impose a drag at bottom |
316 |
IF (momViscosity.AND.bottomDragTerms) THEN |
IF (momViscosity.AND.bottomDragTerms) THEN |
317 |
CALL MOM_U_BOTTOMDRAG(bi,bj,k,uFld,KE,KappaRU,vF,myThid) |
CALL MOM_U_BOTTOMDRAG(bi,bj,k,uFld,KE,KappaRU,vF,myThid) |
489 |
CALL WRITE_LOCAL_RL('D','I10',1,hdiv,bi,bj,k,myIter,myThid) |
CALL WRITE_LOCAL_RL('D','I10',1,hdiv,bi,bj,k,myIter,myThid) |
490 |
ENDIF |
ENDIF |
491 |
|
|
492 |
#endif /* DISABLE_MOM_VECINV */ |
#endif /* ALLOW_MOM_VECINV */ |
493 |
|
|
494 |
RETURN |
RETURN |
495 |
END |
END |