| 33 |
C !INTERFACE: ========================================================== |
C !INTERFACE: ========================================================== |
| 34 |
SUBROUTINE MOM_FLUXFORM( |
SUBROUTINE MOM_FLUXFORM( |
| 35 |
I bi,bj,iMin,iMax,jMin,jMax,k,kUp,kDown, |
I bi,bj,iMin,iMax,jMin,jMax,k,kUp,kDown, |
| 36 |
I dPhihydX,dPhiHydY,KappaRU,KappaRV, |
I KappaRU, KappaRV, |
| 37 |
U fVerU, fVerV, |
U fVerU, fVerV, |
| 38 |
I myTime,myIter,myThid) |
O guDiss, gvDiss, |
| 39 |
|
I myTime, myIter, myThid) |
| 40 |
|
|
| 41 |
C !DESCRIPTION: |
C !DESCRIPTION: |
| 42 |
C Calculates all the horizontal accelerations except for the implicit surface |
C Calculates all the horizontal accelerations except for the implicit surface |
| 59 |
C k :: vertical level |
C k :: vertical level |
| 60 |
C kUp :: =1 or 2 for consecutive k |
C kUp :: =1 or 2 for consecutive k |
| 61 |
C kDown :: =2 or 1 for consecutive k |
C kDown :: =2 or 1 for consecutive k |
|
C dPhiHydX,Y :: Gradient (X & Y dir.) of Hydrostatic Potential |
|
| 62 |
C KappaRU :: vertical viscosity |
C KappaRU :: vertical viscosity |
| 63 |
C KappaRV :: vertical viscosity |
C KappaRV :: vertical viscosity |
| 64 |
C fVerU :: vertical flux of U, 2 1/2 dim for pipe-lining |
C fVerU :: vertical flux of U, 2 1/2 dim for pipe-lining |
| 65 |
C fVerV :: vertical flux of V, 2 1/2 dim for pipe-lining |
C fVerV :: vertical flux of V, 2 1/2 dim for pipe-lining |
| 66 |
|
C guDiss :: dissipation tendency (all explicit terms), u component |
| 67 |
|
C gvDiss :: dissipation tendency (all explicit terms), v component |
| 68 |
C myTime :: current time |
C myTime :: current time |
| 69 |
C myIter :: current time-step number |
C myIter :: current time-step number |
| 70 |
C myThid :: thread number |
C myThid :: thread number |
| 71 |
INTEGER bi,bj,iMin,iMax,jMin,jMax |
INTEGER bi,bj,iMin,iMax,jMin,jMax |
| 72 |
INTEGER k,kUp,kDown |
INTEGER k,kUp,kDown |
|
_RL dPhiHydX(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
|
|
_RL dPhiHydY(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
|
| 73 |
_RL KappaRU(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
_RL KappaRU(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
| 74 |
_RL KappaRV(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
_RL KappaRV(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
| 75 |
_RL fVerU(1-OLx:sNx+OLx,1-OLy:sNy+OLy,2) |
_RL fVerU(1-OLx:sNx+OLx,1-OLy:sNy+OLy,2) |
| 76 |
_RL fVerV(1-OLx:sNx+OLx,1-OLy:sNy+OLy,2) |
_RL fVerV(1-OLx:sNx+OLx,1-OLy:sNy+OLy,2) |
| 77 |
|
_RL guDiss(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
| 78 |
|
_RL gvDiss(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
| 79 |
_RL myTime |
_RL myTime |
| 80 |
INTEGER myIter |
INTEGER myIter |
| 81 |
INTEGER myThid |
INTEGER myThid |
| 85 |
|
|
| 86 |
C !LOCAL VARIABLES: ==================================================== |
C !LOCAL VARIABLES: ==================================================== |
| 87 |
C i,j :: loop indices |
C i,j :: loop indices |
|
C aF :: advective flux |
|
| 88 |
C vF :: viscous flux |
C vF :: viscous flux |
| 89 |
C v4F :: bi-harmonic viscous flux |
C v4F :: bi-harmonic viscous flux |
|
C vrF :: vertical viscous flux |
|
| 90 |
C cF :: Coriolis acceleration |
C cF :: Coriolis acceleration |
| 91 |
C mT :: Metric terms |
C mT :: Metric terms |
|
C pF :: Pressure gradient |
|
| 92 |
C fZon :: zonal fluxes |
C fZon :: zonal fluxes |
| 93 |
C fMer :: meridional fluxes |
C fMer :: meridional fluxes |
| 94 |
|
C fVrUp,fVrDw :: vertical viscous fluxes at interface k-1 & k |
| 95 |
INTEGER i,j |
INTEGER i,j |
|
_RL aF(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
|
| 96 |
_RL vF(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RL vF(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
| 97 |
_RL v4F(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RL v4F(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
|
_RL vrF(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
|
| 98 |
_RL cF(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RL cF(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
| 99 |
_RL mT(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RL mT(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
|
_RL pF(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
|
| 100 |
_RL fZon(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RL fZon(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
| 101 |
_RL fMer(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RL fMer(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
| 102 |
C wMaskOverride - Land sea flag override for top layer. |
_RL fVrUp(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
| 103 |
|
_RL fVrDw(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
| 104 |
C afFacMom - Tracer parameters for turning terms |
C afFacMom - Tracer parameters for turning terms |
| 105 |
C vfFacMom on and off. |
C vfFacMom on and off. |
| 106 |
C pfFacMom afFacMom - Advective terms |
C pfFacMom afFacMom - Advective terms |
| 109 |
C cfFacMom - Coriolis terms |
C cfFacMom - Coriolis terms |
| 110 |
C foFacMom - Forcing |
C foFacMom - Forcing |
| 111 |
C mTFacMom - Metric term |
C mTFacMom - Metric term |
| 112 |
C uDudxFac, AhDudxFac, etc ... individual term tracer parameters |
C uDudxFac, AhDudxFac, etc ... individual term parameters for switching terms off |
| 113 |
_RS hFacZ(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RS hFacZ(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
| 114 |
_RS r_hFacZ(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RS r_hFacZ(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
| 115 |
_RS xA(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RS xA(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
| 129 |
c _RL hDiv(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
c _RL hDiv(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
| 130 |
_RL strain(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RL strain(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
| 131 |
_RL tension(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RL tension(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
|
C I,J,K - Loop counters |
|
|
C rVelMaskOverride - Factor for imposing special surface boundary conditions |
|
|
C ( set according to free-surface condition ). |
|
|
C hFacROpen - Lopped cell factos used tohold fraction of open |
|
|
C hFacRClosed and closed cell wall. |
|
|
_RL rVelMaskOverride |
|
|
C xxxFac - On-off tracer parameters used for switching terms off. |
|
| 132 |
_RL uDudxFac |
_RL uDudxFac |
| 133 |
_RL AhDudxFac |
_RL AhDudxFac |
|
_RL A4DuxxdxFac |
|
| 134 |
_RL vDudyFac |
_RL vDudyFac |
| 135 |
_RL AhDudyFac |
_RL AhDudyFac |
|
_RL A4DuyydyFac |
|
| 136 |
_RL rVelDudrFac |
_RL rVelDudrFac |
| 137 |
_RL ArDudrFac |
_RL ArDudrFac |
| 138 |
_RL fuFac |
_RL fuFac |
|
_RL phxFac |
|
| 139 |
_RL mtFacU |
_RL mtFacU |
| 140 |
_RL uDvdxFac |
_RL uDvdxFac |
| 141 |
_RL AhDvdxFac |
_RL AhDvdxFac |
|
_RL A4DvxxdxFac |
|
| 142 |
_RL vDvdyFac |
_RL vDvdyFac |
| 143 |
_RL AhDvdyFac |
_RL AhDvdyFac |
|
_RL A4DvyydyFac |
|
| 144 |
_RL rVelDvdrFac |
_RL rVelDvdrFac |
| 145 |
_RL ArDvdrFac |
_RL ArDvdrFac |
| 146 |
_RL fvFac |
_RL fvFac |
|
_RL phyFac |
|
|
_RL vForcFac |
|
| 147 |
_RL mtFacV |
_RL mtFacV |
|
INTEGER km1,kp1 |
|
|
_RL wVelBottomOverride |
|
| 148 |
LOGICAL bottomDragTerms |
LOGICAL bottomDragTerms |
| 149 |
CEOP |
CEOP |
| 150 |
|
|
|
km1=MAX(1,k-1) |
|
|
kp1=MIN(Nr,k+1) |
|
|
rVelMaskOverride=1. |
|
|
IF ( k .EQ. 1 ) rVelMaskOverride=freeSurfFac |
|
|
wVelBottomOverride=1. |
|
|
IF (k.EQ.Nr) wVelBottomOverride=0. |
|
|
|
|
| 151 |
C Initialise intermediate terms |
C Initialise intermediate terms |
| 152 |
DO J=1-OLy,sNy+OLy |
DO j=1-OLy,sNy+OLy |
| 153 |
DO I=1-OLx,sNx+OLx |
DO i=1-OLx,sNx+OLx |
|
aF(i,j) = 0. |
|
| 154 |
vF(i,j) = 0. |
vF(i,j) = 0. |
| 155 |
v4F(i,j) = 0. |
v4F(i,j) = 0. |
|
vrF(i,j) = 0. |
|
| 156 |
cF(i,j) = 0. |
cF(i,j) = 0. |
| 157 |
mT(i,j) = 0. |
mT(i,j) = 0. |
|
pF(i,j) = 0. |
|
| 158 |
fZon(i,j) = 0. |
fZon(i,j) = 0. |
| 159 |
fMer(i,j) = 0. |
fMer(i,j) = 0. |
| 160 |
rTransU(i,j) = 0. |
fVrUp(i,j)= 0. |
| 161 |
rTransV(i,j) = 0. |
fVrDw(i,j)= 0. |
| 162 |
|
rTransU(i,j)= 0. |
| 163 |
|
rTransV(i,j)= 0. |
| 164 |
strain(i,j) = 0. |
strain(i,j) = 0. |
| 165 |
tension(i,j) = 0. |
tension(i,j)= 0. |
| 166 |
|
guDiss(i,j) = 0. |
| 167 |
|
gvDiss(i,j) = 0. |
| 168 |
ENDDO |
ENDDO |
| 169 |
ENDDO |
ENDDO |
| 170 |
|
|
| 172 |
C o U momentum equation |
C o U momentum equation |
| 173 |
uDudxFac = afFacMom*1. |
uDudxFac = afFacMom*1. |
| 174 |
AhDudxFac = vfFacMom*1. |
AhDudxFac = vfFacMom*1. |
|
A4DuxxdxFac = vfFacMom*1. |
|
| 175 |
vDudyFac = afFacMom*1. |
vDudyFac = afFacMom*1. |
| 176 |
AhDudyFac = vfFacMom*1. |
AhDudyFac = vfFacMom*1. |
|
A4DuyydyFac = vfFacMom*1. |
|
| 177 |
rVelDudrFac = afFacMom*1. |
rVelDudrFac = afFacMom*1. |
| 178 |
ArDudrFac = vfFacMom*1. |
ArDudrFac = vfFacMom*1. |
| 179 |
mTFacU = mtFacMom*1. |
mTFacU = mtFacMom*1. |
| 180 |
fuFac = cfFacMom*1. |
fuFac = cfFacMom*1. |
|
phxFac = pfFacMom*1. |
|
| 181 |
C o V momentum equation |
C o V momentum equation |
| 182 |
uDvdxFac = afFacMom*1. |
uDvdxFac = afFacMom*1. |
| 183 |
AhDvdxFac = vfFacMom*1. |
AhDvdxFac = vfFacMom*1. |
|
A4DvxxdxFac = vfFacMom*1. |
|
| 184 |
vDvdyFac = afFacMom*1. |
vDvdyFac = afFacMom*1. |
| 185 |
AhDvdyFac = vfFacMom*1. |
AhDvdyFac = vfFacMom*1. |
|
A4DvyydyFac = vfFacMom*1. |
|
| 186 |
rVelDvdrFac = afFacMom*1. |
rVelDvdrFac = afFacMom*1. |
| 187 |
ArDvdrFac = vfFacMom*1. |
ArDvdrFac = vfFacMom*1. |
| 188 |
mTFacV = mtFacMom*1. |
mTFacV = mtFacMom*1. |
| 189 |
fvFac = cfFacMom*1. |
fvFac = cfFacMom*1. |
| 190 |
phyFac = pfFacMom*1. |
|
| 191 |
vForcFac = foFacMom*1. |
IF (implicitViscosity) THEN |
| 192 |
|
ArDudrFac = 0. |
| 193 |
|
ArDvdrFac = 0. |
| 194 |
|
ENDIF |
| 195 |
|
|
| 196 |
IF ( no_slip_bottom |
IF ( no_slip_bottom |
| 197 |
& .OR. bottomDragQuadratic.NE.0. |
& .OR. bottomDragQuadratic.NE.0. |
| 201 |
bottomDragTerms=.FALSE. |
bottomDragTerms=.FALSE. |
| 202 |
ENDIF |
ENDIF |
| 203 |
|
|
|
C-- with stagger time stepping, grad Phi_Hyp is directly incoporated in TIMESTEP |
|
|
IF (staggerTimeStep) THEN |
|
|
phxFac = 0. |
|
|
phyFac = 0. |
|
|
ENDIF |
|
|
|
|
| 204 |
C-- Calculate open water fraction at vorticity points |
C-- Calculate open water fraction at vorticity points |
| 205 |
CALL MOM_CALC_HFACZ(bi,bj,k,hFacZ,r_hFacZ,myThid) |
CALL MOM_CALC_HFACZ(bi,bj,k,hFacZ,r_hFacZ,myThid) |
| 206 |
|
|
| 231 |
ENDDO |
ENDDO |
| 232 |
ENDDO |
ENDDO |
| 233 |
|
|
| 234 |
CALL MOM_CALC_KE(bi,bj,k,3,uFld,vFld,KE,myThid) |
IF (bottomDragTerms) THEN |
| 235 |
|
CALL MOM_CALC_KE(bi,bj,k,3,uFld,vFld,KE,myThid) |
| 236 |
|
ENDIF |
| 237 |
|
|
| 238 |
IF (viscAstrain.NE.0. .OR. viscAtension.NE.0.) THEN |
IF (viscAstrain.NE.0. .OR. viscAtension.NE.0.) THEN |
| 239 |
CALL MOM_CALC_TENSION(bi,bj,k,uFld,vFld, |
CALL MOM_CALC_TENSION(bi,bj,k,uFld,vFld, |
| 248 |
IF (momAdvection.AND.k.EQ.1) THEN |
IF (momAdvection.AND.k.EQ.1) THEN |
| 249 |
|
|
| 250 |
C- Calculate vertical transports above U & V points (West & South face): |
C- Calculate vertical transports above U & V points (West & South face): |
| 251 |
CALL MOM_CALC_RTRANS( k, bi, bj, |
CALL MOM_CALC_RTRANS( k, bi, bj, |
| 252 |
O rTransU, rTransV, |
O rTransU, rTransV, |
| 253 |
I myTime, myIter, myThid) |
I myTime, myIter, myThid) |
| 254 |
|
|
| 255 |
C- Free surface correction term (flux at k=1) |
C- Free surface correction term (flux at k=1) |
| 256 |
CALL MOM_U_ADV_WU(bi,bj,k,uVel,wVel,rTransU,af,myThid) |
CALL MOM_U_ADV_WU( bi,bj,k,uVel,wVel,rTransU, |
| 257 |
DO j=jMin,jMax |
O fVerU(1-OLx,1-OLy,kUp), myThid ) |
|
DO i=iMin,iMax |
|
|
fVerU(i,j,kUp) = af(i,j) |
|
|
ENDDO |
|
|
ENDDO |
|
| 258 |
|
|
| 259 |
CALL MOM_V_ADV_WV(bi,bj,k,vVel,wVel,rTransV,af,myThid) |
CALL MOM_V_ADV_WV( bi,bj,k,vVel,wVel,rTransV, |
| 260 |
DO j=jMin,jMax |
O fVerV(1-OLx,1-OLy,kUp), myThid ) |
|
DO i=iMin,iMax |
|
|
fVerV(i,j,kUp) = af(i,j) |
|
|
ENDDO |
|
|
ENDDO |
|
| 261 |
|
|
| 262 |
C--- endif momAdvection & k=1 |
C--- endif momAdvection & k=1 |
| 263 |
ENDIF |
ENDIF |
| 265 |
|
|
| 266 |
C--- Calculate vertical transports (at k+1) below U & V points : |
C--- Calculate vertical transports (at k+1) below U & V points : |
| 267 |
IF (momAdvection) THEN |
IF (momAdvection) THEN |
| 268 |
CALL MOM_CALC_RTRANS( k+1, bi, bj, |
CALL MOM_CALC_RTRANS( k+1, bi, bj, |
| 269 |
O rTransU, rTransV, |
O rTransU, rTransV, |
| 270 |
I myTime, myIter, myThid) |
I myTime, myIter, myThid) |
| 271 |
ENDIF |
ENDIF |
| 272 |
|
|
| 273 |
c IF (momViscosity) THEN |
c IF (momViscosity) THEN |
| 275 |
c I uFld,vFld, |
c I uFld,vFld, |
| 276 |
c O viscAh_D,viscAh_Z,myThid) |
c O viscAh_D,viscAh_Z,myThid) |
| 277 |
|
|
| 278 |
C---- Zonal momentum equation starts here |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
| 279 |
|
|
| 280 |
C Bi-harmonic term del^2 U -> v4F |
C---- Zonal momentum equation starts here |
|
IF (momViscosity .AND. viscA4.NE.0. ) |
|
|
& CALL MOM_U_DEL2U(bi,bj,k,uFld,hFacZ,v4f,myThid) |
|
| 281 |
|
|
| 282 |
C--- Calculate mean and eddy fluxes between cells for zonal flow. |
IF (momAdvection) THEN |
| 283 |
|
C--- Calculate mean fluxes (advection) between cells for zonal flow. |
| 284 |
|
|
| 285 |
C-- Zonal flux (fZon is at east face of "u" cell) |
C-- Zonal flux (fZon is at east face of "u" cell) |
| 286 |
|
C Mean flow component of zonal flux -> fZon |
| 287 |
C Mean flow component of zonal flux -> aF |
CALL MOM_U_ADV_UU(bi,bj,k,uTrans,uFld,fZon,myThid) |
|
IF (momAdvection) |
|
|
& CALL MOM_U_ADV_UU(bi,bj,k,uTrans,uFld,aF,myThid) |
|
|
|
|
|
C Laplacian and bi-harmonic terms -> vF |
|
|
IF (momViscosity) |
|
|
& CALL MOM_U_XVISCFLUX(bi,bj,k,uFld,v4F,vF,myThid) |
|
|
|
|
|
C Combine fluxes -> fZon |
|
|
DO j=jMin,jMax |
|
|
DO i=iMin,iMax |
|
|
fZon(i,j) = uDudxFac*aF(i,j) + AhDudxFac*vF(i,j) |
|
|
ENDDO |
|
|
ENDDO |
|
| 288 |
|
|
| 289 |
C-- Meridional flux (fMer is at south face of "u" cell) |
C-- Meridional flux (fMer is at south face of "u" cell) |
| 290 |
|
C Mean flow component of meridional flux -> fMer |
| 291 |
C Mean flow component of meridional flux |
CALL MOM_U_ADV_VU(bi,bj,k,vTrans,uFld,fMer,myThid) |
|
IF (momAdvection) |
|
|
& CALL MOM_U_ADV_VU(bi,bj,k,vTrans,uFld,aF,myThid) |
|
|
|
|
|
C Laplacian and bi-harmonic term |
|
|
IF (momViscosity) |
|
|
& CALL MOM_U_YVISCFLUX(bi,bj,k,uFld,v4F,hFacZ,vF,myThid) |
|
|
|
|
|
C Combine fluxes -> fMer |
|
|
DO j=jMin,jMax+1 |
|
|
DO i=iMin,iMax |
|
|
fMer(i,j) = vDudyFac*aF(i,j) + AhDudyFac*vF(i,j) |
|
|
ENDDO |
|
|
ENDDO |
|
| 292 |
|
|
| 293 |
C-- Vertical flux (fVer is at upper face of "u" cell) |
C-- Vertical flux (fVer is at upper face of "u" cell) |
| 294 |
|
C Mean flow component of vertical flux (at k+1) -> fVer |
| 295 |
C Mean flow component of vertical flux (at k+1) -> aF |
CALL MOM_U_ADV_WU( |
| 296 |
IF (momAdvection) |
I bi,bj,k+1,uVel,wVel,rTransU, |
| 297 |
& CALL MOM_U_ADV_WU(bi,bj,k+1,uVel,wVel,rTransU,af,myThid) |
O fVerU(1-OLx,1-OLy,kDown), myThid ) |
|
|
|
|
C Eddy component of vertical flux (interior component only) -> vrF |
|
|
IF (momViscosity.AND..NOT.implicitViscosity) |
|
|
& CALL MOM_U_RVISCFLUX(bi,bj,k,uVel,KappaRU,vrF,myThid) |
|
|
|
|
|
C Combine fluxes |
|
|
DO j=jMin,jMax |
|
|
DO i=iMin,iMax |
|
|
fVerU(i,j,kDown) = rVelDudrFac*aF(i,j) + ArDudrFac*vrF(i,j) |
|
|
ENDDO |
|
|
ENDDO |
|
| 298 |
|
|
| 299 |
C-- Tendency is minus divergence of the fluxes + coriolis + pressure term |
C-- Tendency is minus divergence of the fluxes + coriolis + pressure term |
| 300 |
DO j=jMin,jMax |
DO j=jMin,jMax |
| 301 |
DO i=iMin,iMax |
DO i=iMin,iMax |
| 302 |
gU(i,j,k,bi,bj) = |
gU(i,j,k,bi,bj) = |
| 303 |
#ifdef OLD_UV_GEOM |
#ifdef OLD_UV_GEOM |
| 304 |
& -_recip_hFacW(i,j,k,bi,bj)*recip_drF(k)/ |
& -_recip_hFacW(i,j,k,bi,bj)*recip_drF(k)/ |
| 305 |
& ( 0.5 _d 0*(rA(i,j,bi,bj)+rA(i-1,j,bi,bj)) ) |
& ( 0.5 _d 0*(rA(i,j,bi,bj)+rA(i-1,j,bi,bj)) ) |
| 306 |
#else |
#else |
| 307 |
& -_recip_hFacW(i,j,k,bi,bj)*recip_drF(k) |
& -_recip_hFacW(i,j,k,bi,bj)*recip_drF(k) |
| 308 |
& *recip_rAw(i,j,bi,bj) |
& *recip_rAw(i,j,bi,bj) |
| 309 |
#endif |
#endif |
| 310 |
& *(fZon(i,j ) - fZon(i-1,j) |
& *( ( fZon(i,j ) - fZon(i-1,j) )*uDudxFac |
| 311 |
& +fMer(i,j+1) - fMer(i ,j) |
& +( fMer(i,j+1) - fMer(i, j) )*vDudyFac |
| 312 |
& -fVerU(i,j,kUp)*rkSign + fVerU(i,j,kDown)*rkSign |
& +(fVerU(i,j,kDown) - fVerU(i,j,kUp))*rkSign*rVelDudrFac |
| 313 |
& ) |
& ) |
| 314 |
& - phxFac*dPhiHydX(i,j) |
ENDDO |
| 315 |
ENDDO |
ENDDO |
|
ENDDO |
|
| 316 |
|
|
| 317 |
#ifdef NONLIN_FRSURF |
#ifdef NONLIN_FRSURF |
| 318 |
C-- account for 3.D divergence of the flow in rStar coordinate: |
C-- account for 3.D divergence of the flow in rStar coordinate: |
| 319 |
IF ( momAdvection .AND. select_rStar.GT.0 ) THEN |
IF ( select_rStar.GT.0 ) THEN |
| 320 |
DO j=jMin,jMax |
DO j=jMin,jMax |
| 321 |
DO i=iMin,iMax |
DO i=iMin,iMax |
| 322 |
gU(i,j,k,bi,bj) = gU(i,j,k,bi,bj) |
gU(i,j,k,bi,bj) = gU(i,j,k,bi,bj) |
| 323 |
& - (rStarExpW(i,j,bi,bj) - 1. _d 0)/deltaTfreesurf |
& - (rStarExpW(i,j,bi,bj) - 1. _d 0)/deltaTfreesurf |
| 324 |
& *uVel(i,j,k,bi,bj) |
& *uVel(i,j,k,bi,bj) |
| 325 |
ENDDO |
ENDDO |
| 326 |
ENDDO |
ENDDO |
| 327 |
ENDIF |
ENDIF |
| 328 |
IF ( momAdvection .AND. select_rStar.LT.0 ) THEN |
IF ( select_rStar.LT.0 ) THEN |
| 329 |
DO j=jMin,jMax |
DO j=jMin,jMax |
| 330 |
DO i=iMin,iMax |
DO i=iMin,iMax |
| 331 |
gU(i,j,k,bi,bj) = gU(i,j,k,bi,bj) |
gU(i,j,k,bi,bj) = gU(i,j,k,bi,bj) |
| 332 |
& - rStarDhWDt(i,j,bi,bj)*uVel(i,j,k,bi,bj) |
& - rStarDhWDt(i,j,bi,bj)*uVel(i,j,k,bi,bj) |
| 333 |
|
ENDDO |
| 334 |
|
ENDDO |
| 335 |
|
ENDIF |
| 336 |
|
#endif /* NONLIN_FRSURF */ |
| 337 |
|
|
| 338 |
|
ELSE |
| 339 |
|
C- if momAdvection / else |
| 340 |
|
DO j=1-OLy,sNy+OLy |
| 341 |
|
DO i=1-OLx,sNx+OLx |
| 342 |
|
gU(i,j,k,bi,bj) = 0. _d 0 |
| 343 |
|
ENDDO |
| 344 |
ENDDO |
ENDDO |
| 345 |
ENDDO |
|
| 346 |
|
C- endif momAdvection. |
| 347 |
ENDIF |
ENDIF |
| 348 |
#endif /* NONLIN_FRSURF */ |
|
| 349 |
|
IF (momViscosity) THEN |
| 350 |
|
C--- Calculate eddy fluxes (dissipation) between cells for zonal flow. |
| 351 |
|
|
| 352 |
|
C Bi-harmonic term del^2 U -> v4F |
| 353 |
|
IF ( viscA4.NE.0. ) |
| 354 |
|
& CALL MOM_U_DEL2U(bi,bj,k,uFld,hFacZ,v4f,myThid) |
| 355 |
|
|
| 356 |
|
C Laplacian and bi-harmonic terms, Zonal Fluxes -> fZon |
| 357 |
|
CALL MOM_U_XVISCFLUX(bi,bj,k,uFld,v4F,fZon,myThid) |
| 358 |
|
|
| 359 |
|
C Laplacian and bi-harmonic termis, Merid Fluxes -> fMer |
| 360 |
|
CALL MOM_U_YVISCFLUX(bi,bj,k,uFld,v4F,hFacZ,fMer,myThid) |
| 361 |
|
|
| 362 |
|
C Eddy component of vertical flux (interior component only) -> fVrUp & fVrDw |
| 363 |
|
IF (.NOT.implicitViscosity) THEN |
| 364 |
|
CALL MOM_U_RVISCFLUX(bi,bj, k, uVel,KappaRU,fVrUp,myThid) |
| 365 |
|
CALL MOM_U_RVISCFLUX(bi,bj,k+1,uVel,KappaRU,fVrDw,myThid) |
| 366 |
|
ENDIF |
| 367 |
|
|
| 368 |
|
C-- Tendency is minus divergence of the fluxes |
| 369 |
|
DO j=jMin,jMax |
| 370 |
|
DO i=iMin,iMax |
| 371 |
|
guDiss(i,j) = |
| 372 |
|
#ifdef OLD_UV_GEOM |
| 373 |
|
& -_recip_hFacW(i,j,k,bi,bj)*recip_drF(k)/ |
| 374 |
|
& ( 0.5 _d 0*(rA(i,j,bi,bj)+rA(i-1,j,bi,bj)) ) |
| 375 |
|
#else |
| 376 |
|
& -_recip_hFacW(i,j,k,bi,bj)*recip_drF(k) |
| 377 |
|
& *recip_rAw(i,j,bi,bj) |
| 378 |
|
#endif |
| 379 |
|
& *( ( fZon(i,j ) - fZon(i-1,j) )*AhDudxFac |
| 380 |
|
& +( fMer(i,j+1) - fMer(i, j) )*AhDudyFac |
| 381 |
|
& +( fVrDw(i,j) - fVrUp(i,j) )*rkSign*ArDudrFac |
| 382 |
|
& ) |
| 383 |
|
ENDDO |
| 384 |
|
ENDDO |
| 385 |
|
|
| 386 |
C-- No-slip and drag BCs appear as body forces in cell abutting topography |
C-- No-slip and drag BCs appear as body forces in cell abutting topography |
| 387 |
IF (momViscosity.AND.no_slip_sides) THEN |
IF (no_slip_sides) THEN |
| 388 |
C- No-slip BCs impose a drag at walls... |
C- No-slip BCs impose a drag at walls... |
| 389 |
CALL MOM_U_SIDEDRAG(bi,bj,k,uFld,v4F,hFacZ,vF,myThid) |
CALL MOM_U_SIDEDRAG(bi,bj,k,uFld,v4F,hFacZ,vF,myThid) |
| 390 |
DO j=jMin,jMax |
DO j=jMin,jMax |
| 391 |
DO i=iMin,iMax |
DO i=iMin,iMax |
| 392 |
gU(i,j,k,bi,bj) = gU(i,j,k,bi,bj)+vF(i,j) |
gUdiss(i,j) = gUdiss(i,j) + vF(i,j) |
| 393 |
ENDDO |
ENDDO |
| 394 |
ENDDO |
ENDDO |
| 395 |
ENDIF |
ENDIF |
| 396 |
C- No-slip BCs impose a drag at bottom |
C- No-slip BCs impose a drag at bottom |
| 397 |
IF (momViscosity.AND.bottomDragTerms) THEN |
IF (bottomDragTerms) THEN |
| 398 |
CALL MOM_U_BOTTOMDRAG(bi,bj,k,uFld,KE,KappaRU,vF,myThid) |
CALL MOM_U_BOTTOMDRAG(bi,bj,k,uFld,KE,KappaRU,vF,myThid) |
| 399 |
DO j=jMin,jMax |
DO j=jMin,jMax |
| 400 |
DO i=iMin,iMax |
DO i=iMin,iMax |
| 401 |
gU(i,j,k,bi,bj) = gU(i,j,k,bi,bj)+vF(i,j) |
gUdiss(i,j) = gUdiss(i,j) + vF(i,j) |
| 402 |
ENDDO |
ENDDO |
| 403 |
ENDDO |
ENDDO |
| 404 |
|
ENDIF |
| 405 |
|
|
| 406 |
|
C- endif momViscosity |
| 407 |
ENDIF |
ENDIF |
| 408 |
|
|
| 409 |
C-- Forcing term (moved to timestep.F) |
C-- Forcing term (moved to timestep.F) |
| 429 |
gU(i,j,k,bi,bj) = gU(i,j,k,bi,bj)+mTFacU*mT(i,j) |
gU(i,j,k,bi,bj) = gU(i,j,k,bi,bj)+mTFacU*mT(i,j) |
| 430 |
ENDDO |
ENDDO |
| 431 |
ENDDO |
ENDDO |
|
|
|
| 432 |
ENDIF |
ENDIF |
| 433 |
IF (usingCylindricalGrid) THEN |
IF (usingCylindricalGrid) THEN |
| 434 |
CALL MOM_U_METRIC_CYLINDER(bi,bj,k,uFld,vFld,mT,myThid) |
CALL MOM_U_METRIC_CYLINDER(bi,bj,k,uFld,vFld,mT,myThid) |
| 437 |
gU(i,j,k,bi,bj) = gU(i,j,k,bi,bj)+mTFacU*mT(i,j) |
gU(i,j,k,bi,bj) = gU(i,j,k,bi,bj)+mTFacU*mT(i,j) |
| 438 |
ENDDO |
ENDDO |
| 439 |
ENDDO |
ENDDO |
|
|
|
| 440 |
ENDIF |
ENDIF |
|
C-- Set du/dt on boundaries to zero |
|
|
DO j=jMin,jMax |
|
|
DO i=iMin,iMax |
|
|
gU(i,j,k,bi,bj) = gU(i,j,k,bi,bj)*_maskW(i,j,k,bi,bj) |
|
|
ENDDO |
|
|
ENDDO |
|
| 441 |
|
|
| 442 |
|
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
| 443 |
|
|
| 444 |
C---- Meridional momentum equation starts here |
C---- Meridional momentum equation starts here |
| 445 |
|
|
| 446 |
C Bi-harmonic term del^2 V -> v4F |
IF (momAdvection) THEN |
| 447 |
IF (momViscosity .AND. viscA4.NE.0. ) |
C--- Calculate mean fluxes (advection) between cells for meridional flow. |
| 448 |
& CALL MOM_V_DEL2V(bi,bj,k,vFld,hFacZ,v4f,myThid) |
C Mean flow component of zonal flux -> fZon |
| 449 |
|
CALL MOM_V_ADV_UV(bi,bj,k,uTrans,vFld,fZon,myThid) |
|
C--- Calculate mean and eddy fluxes between cells for meridional flow. |
|
|
|
|
|
C-- Zonal flux (fZon is at west face of "v" cell) |
|
|
|
|
|
C Mean flow component of zonal flux -> aF |
|
|
IF (momAdvection) |
|
|
& CALL MOM_V_ADV_UV(bi,bj,k,uTrans,vFld,af,myThid) |
|
|
|
|
|
C Laplacian and bi-harmonic terms -> vF |
|
|
IF (momViscosity) |
|
|
& CALL MOM_V_XVISCFLUX(bi,bj,k,vFld,v4f,hFacZ,vf,myThid) |
|
|
|
|
|
C Combine fluxes -> fZon |
|
|
DO j=jMin,jMax |
|
|
DO i=iMin,iMax+1 |
|
|
fZon(i,j) = uDvdxFac*aF(i,j) + AhDvdxFac*vF(i,j) |
|
|
ENDDO |
|
|
ENDDO |
|
| 450 |
|
|
| 451 |
C-- Meridional flux (fMer is at north face of "v" cell) |
C-- Meridional flux (fMer is at north face of "v" cell) |
| 452 |
|
C Mean flow component of meridional flux -> fMer |
| 453 |
C Mean flow component of meridional flux |
CALL MOM_V_ADV_VV(bi,bj,k,vTrans,vFld,fMer,myThid) |
|
IF (momAdvection) |
|
|
& CALL MOM_V_ADV_VV(bi,bj,k,vTrans,vFld,af,myThid) |
|
|
|
|
|
C Laplacian and bi-harmonic term |
|
|
IF (momViscosity) |
|
|
& CALL MOM_V_YVISCFLUX(bi,bj,k,vFld,v4f,vf,myThid) |
|
|
|
|
|
C Combine fluxes -> fMer |
|
|
DO j=jMin,jMax |
|
|
DO i=iMin,iMax |
|
|
fMer(i,j) = vDvdyFac*aF(i,j) + AhDvdyFac*vF(i,j) |
|
|
ENDDO |
|
|
ENDDO |
|
| 454 |
|
|
| 455 |
C-- Vertical flux (fVer is at upper face of "v" cell) |
C-- Vertical flux (fVer is at upper face of "v" cell) |
| 456 |
|
C Mean flow component of vertical flux (at k+1) -> fVerV |
| 457 |
C o Mean flow component of vertical flux |
CALL MOM_V_ADV_WV( |
| 458 |
IF (momAdvection) |
I bi,bj,k+1,vVel,wVel,rTransV, |
| 459 |
& CALL MOM_V_ADV_WV(bi,bj,k+1,vVel,wVel,rTransV,af,myThid) |
O fVerV(1-OLx,1-OLy,kDown), myThid ) |
|
|
|
|
C Eddy component of vertical flux (interior component only) -> vrF |
|
|
IF (momViscosity.AND..NOT.implicitViscosity) |
|
|
& CALL MOM_V_RVISCFLUX(bi,bj,k,vVel,KappaRV,vrf,myThid) |
|
|
|
|
|
C Combine fluxes -> fVerV |
|
|
DO j=jMin,jMax |
|
|
DO i=iMin,iMax |
|
|
fVerV(i,j,kDown) = rVelDvdrFac*aF(i,j) + ArDvdrFac*vrF(i,j) |
|
|
ENDDO |
|
|
ENDDO |
|
| 460 |
|
|
| 461 |
C-- Tendency is minus divergence of the fluxes + coriolis + pressure term |
C-- Tendency is minus divergence of the fluxes + coriolis + pressure term |
| 462 |
DO j=jMin,jMax |
DO j=jMin,jMax |
| 463 |
DO i=iMin,iMax |
DO i=iMin,iMax |
| 464 |
gV(i,j,k,bi,bj) = |
gV(i,j,k,bi,bj) = |
| 465 |
#ifdef OLD_UV_GEOM |
#ifdef OLD_UV_GEOM |
| 466 |
& -_recip_hFacS(i,j,k,bi,bj)*recip_drF(k)/ |
& -_recip_hFacS(i,j,k,bi,bj)*recip_drF(k)/ |
| 467 |
& ( 0.5 _d 0*(_rA(i,j,bi,bj)+_rA(i,j-1,bi,bj)) ) |
& ( 0.5 _d 0*(_rA(i,j,bi,bj)+_rA(i,j-1,bi,bj)) ) |
| 468 |
#else |
#else |
| 469 |
& -_recip_hFacS(i,j,k,bi,bj)*recip_drF(k) |
& -_recip_hFacS(i,j,k,bi,bj)*recip_drF(k) |
| 470 |
& *recip_rAs(i,j,bi,bj) |
& *recip_rAs(i,j,bi,bj) |
| 471 |
#endif |
#endif |
| 472 |
& *(fZon(i+1,j) - fZon(i,j ) |
& *( ( fZon(i+1,j) - fZon(i,j ) )*uDvdxFac |
| 473 |
& +fMer(i,j ) - fMer(i,j-1) |
& +( fMer(i, j) - fMer(i,j-1) )*vDvdyFac |
| 474 |
& -fVerV(i,j,kUp)*rkSign + fVerV(i,j,kDown)*rkSign |
& +(fVerV(i,j,kDown) - fVerV(i,j,kUp))*rkSign*rVelDvdrFac |
| 475 |
& ) |
& ) |
|
& - phyFac*dPhiHydY(i,j) |
|
| 476 |
ENDDO |
ENDDO |
| 477 |
ENDDO |
ENDDO |
| 478 |
|
|
| 479 |
#ifdef NONLIN_FRSURF |
#ifdef NONLIN_FRSURF |
| 480 |
C-- account for 3.D divergence of the flow in rStar coordinate: |
C-- account for 3.D divergence of the flow in rStar coordinate: |
| 481 |
IF ( momAdvection .AND. select_rStar.GT.0 ) THEN |
IF ( select_rStar.GT.0 ) THEN |
| 482 |
DO j=jMin,jMax |
DO j=jMin,jMax |
| 483 |
DO i=iMin,iMax |
DO i=iMin,iMax |
| 484 |
gV(i,j,k,bi,bj) = gV(i,j,k,bi,bj) |
gV(i,j,k,bi,bj) = gV(i,j,k,bi,bj) |
| 485 |
& - (rStarExpS(i,j,bi,bj) - 1. _d 0)/deltaTfreesurf |
& - (rStarExpS(i,j,bi,bj) - 1. _d 0)/deltaTfreesurf |
| 486 |
& *vVel(i,j,k,bi,bj) |
& *vVel(i,j,k,bi,bj) |
| 487 |
ENDDO |
ENDDO |
| 488 |
ENDDO |
ENDDO |
| 489 |
ENDIF |
ENDIF |
| 490 |
IF ( momAdvection .AND. select_rStar.LT.0 ) THEN |
IF ( select_rStar.LT.0 ) THEN |
| 491 |
DO j=jMin,jMax |
DO j=jMin,jMax |
| 492 |
DO i=iMin,iMax |
DO i=iMin,iMax |
| 493 |
gV(i,j,k,bi,bj) = gV(i,j,k,bi,bj) |
gV(i,j,k,bi,bj) = gV(i,j,k,bi,bj) |
| 494 |
& - rStarDhSDt(i,j,bi,bj)*vVel(i,j,k,bi,bj) |
& - rStarDhSDt(i,j,bi,bj)*vVel(i,j,k,bi,bj) |
| 495 |
|
ENDDO |
| 496 |
|
ENDDO |
| 497 |
|
ENDIF |
| 498 |
|
#endif /* NONLIN_FRSURF */ |
| 499 |
|
|
| 500 |
|
ELSE |
| 501 |
|
C- if momAdvection / else |
| 502 |
|
DO j=1-OLy,sNy+OLy |
| 503 |
|
DO i=1-OLx,sNx+OLx |
| 504 |
|
gV(i,j,k,bi,bj) = 0. _d 0 |
| 505 |
|
ENDDO |
| 506 |
ENDDO |
ENDDO |
| 507 |
ENDDO |
|
| 508 |
|
C- endif momAdvection. |
| 509 |
ENDIF |
ENDIF |
| 510 |
#endif /* NONLIN_FRSURF */ |
|
| 511 |
|
IF (momViscosity) THEN |
| 512 |
|
C--- Calculate eddy fluxes (dissipation) between cells for meridional flow. |
| 513 |
|
C Bi-harmonic term del^2 V -> v4F |
| 514 |
|
IF ( viscA4.NE.0. ) |
| 515 |
|
& CALL MOM_V_DEL2V(bi,bj,k,vFld,hFacZ,v4f,myThid) |
| 516 |
|
|
| 517 |
|
C Laplacian and bi-harmonic terms, Zonal Fluxes -> fZon |
| 518 |
|
CALL MOM_V_XVISCFLUX(bi,bj,k,vFld,v4f,hFacZ,fZon,myThid) |
| 519 |
|
|
| 520 |
|
C Laplacian and bi-harmonic termis, Merid Fluxes -> fMer |
| 521 |
|
CALL MOM_V_YVISCFLUX(bi,bj,k,vFld,v4f,fMer,myThid) |
| 522 |
|
|
| 523 |
|
C Eddy component of vertical flux (interior component only) -> fVrUp & fVrDw |
| 524 |
|
IF (.NOT.implicitViscosity) THEN |
| 525 |
|
CALL MOM_V_RVISCFLUX(bi,bj, k, vVel,KappaRV,fVrUp,myThid) |
| 526 |
|
CALL MOM_V_RVISCFLUX(bi,bj,k+1,vVel,KappaRV,fVrDw,myThid) |
| 527 |
|
ENDIF |
| 528 |
|
|
| 529 |
|
C-- Tendency is minus divergence of the fluxes + coriolis + pressure term |
| 530 |
|
DO j=jMin,jMax |
| 531 |
|
DO i=iMin,iMax |
| 532 |
|
gvDiss(i,j) = |
| 533 |
|
#ifdef OLD_UV_GEOM |
| 534 |
|
& -_recip_hFacS(i,j,k,bi,bj)*recip_drF(k)/ |
| 535 |
|
& ( 0.5 _d 0*(_rA(i,j,bi,bj)+_rA(i,j-1,bi,bj)) ) |
| 536 |
|
#else |
| 537 |
|
& -_recip_hFacS(i,j,k,bi,bj)*recip_drF(k) |
| 538 |
|
& *recip_rAs(i,j,bi,bj) |
| 539 |
|
#endif |
| 540 |
|
& *( ( fZon(i+1,j) - fZon(i,j ) )*AhDvdxFac |
| 541 |
|
& +( fMer(i, j) - fMer(i,j-1) )*AhDvdyFac |
| 542 |
|
& +( fVrDw(i,j) - fVrUp(i,j) )*rkSign*ArDvdrFac |
| 543 |
|
& ) |
| 544 |
|
ENDDO |
| 545 |
|
ENDDO |
| 546 |
|
|
| 547 |
C-- No-slip and drag BCs appear as body forces in cell abutting topography |
C-- No-slip and drag BCs appear as body forces in cell abutting topography |
| 548 |
IF (momViscosity.AND.no_slip_sides) THEN |
IF (no_slip_sides) THEN |
| 549 |
C- No-slip BCs impose a drag at walls... |
C- No-slip BCs impose a drag at walls... |
| 550 |
CALL MOM_V_SIDEDRAG(bi,bj,k,vFld,v4F,hFacZ,vF,myThid) |
CALL MOM_V_SIDEDRAG(bi,bj,k,vFld,v4F,hFacZ,vF,myThid) |
| 551 |
DO j=jMin,jMax |
DO j=jMin,jMax |
| 552 |
DO i=iMin,iMax |
DO i=iMin,iMax |
| 553 |
gV(i,j,k,bi,bj) = gV(i,j,k,bi,bj)+vF(i,j) |
gvDiss(i,j) = gvDiss(i,j) + vF(i,j) |
| 554 |
ENDDO |
ENDDO |
| 555 |
ENDDO |
ENDDO |
| 556 |
ENDIF |
ENDIF |
| 557 |
C- No-slip BCs impose a drag at bottom |
C- No-slip BCs impose a drag at bottom |
| 558 |
IF (momViscosity.AND.bottomDragTerms) THEN |
IF (bottomDragTerms) THEN |
| 559 |
CALL MOM_V_BOTTOMDRAG(bi,bj,k,vFld,KE,KappaRV,vF,myThid) |
CALL MOM_V_BOTTOMDRAG(bi,bj,k,vFld,KE,KappaRV,vF,myThid) |
| 560 |
DO j=jMin,jMax |
DO j=jMin,jMax |
| 561 |
DO i=iMin,iMax |
DO i=iMin,iMax |
| 562 |
gV(i,j,k,bi,bj) = gV(i,j,k,bi,bj)+vF(i,j) |
gvDiss(i,j) = gvDiss(i,j) + vF(i,j) |
| 563 |
ENDDO |
ENDDO |
| 564 |
ENDDO |
ENDDO |
| 565 |
|
ENDIF |
| 566 |
|
|
| 567 |
|
C- endif momViscosity |
| 568 |
ENDIF |
ENDIF |
| 569 |
|
|
| 570 |
C-- Forcing term (moved to timestep.F) |
C-- Forcing term (moved to timestep.F) |
| 600 |
ENDDO |
ENDDO |
| 601 |
ENDIF |
ENDIF |
| 602 |
|
|
| 603 |
C-- Set dv/dt on boundaries to zero |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
|
DO j=jMin,jMax |
|
|
DO i=iMin,iMax |
|
|
gV(i,j,k,bi,bj) = gV(i,j,k,bi,bj)*_maskS(i,j,k,bi,bj) |
|
|
ENDDO |
|
|
ENDDO |
|
| 604 |
|
|
| 605 |
C-- Coriolis term |
C-- Coriolis term |
| 606 |
C Note. As coded here, coriolis will not work with "thin walls" |
C Note. As coded here, coriolis will not work with "thin walls" |
| 631 |
ENDDO |
ENDDO |
| 632 |
ENDIF |
ENDIF |
| 633 |
|
|
| 634 |
|
C-- Set du/dt & dv/dt on boundaries to zero |
| 635 |
|
DO j=jMin,jMax |
| 636 |
|
DO i=iMin,iMax |
| 637 |
|
gU(i,j,k,bi,bj) = gU(i,j,k,bi,bj)*_maskW(i,j,k,bi,bj) |
| 638 |
|
guDiss(i,j) = guDiss(i,j) *_maskW(i,j,k,bi,bj) |
| 639 |
|
gV(i,j,k,bi,bj) = gV(i,j,k,bi,bj)*_maskS(i,j,k,bi,bj) |
| 640 |
|
gvDiss(i,j) = gvDiss(i,j) *_maskS(i,j,k,bi,bj) |
| 641 |
|
ENDDO |
| 642 |
|
ENDDO |
| 643 |
|
|
| 644 |
RETURN |
RETURN |
| 645 |
END |
END |