25 |
C stresses as well as internal viscous stresses. |
C stresses as well as internal viscous stresses. |
26 |
CEOI |
CEOI |
27 |
|
|
28 |
#include "CPP_OPTIONS.h" |
#include "MOM_FLUXFORM_OPTIONS.h" |
29 |
|
|
30 |
CBOP |
CBOP |
31 |
C !ROUTINE: MOM_FLUXFORM |
C !ROUTINE: MOM_FLUXFORM |
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 phi_hyd,KappaRU,KappaRV, |
I dPhihydX,dPhiHydY,KappaRU,KappaRV, |
37 |
U fVerU, fVerV, |
U fVerU, fVerV, |
38 |
I myCurrentTime,myIter,myThid) |
I myTime,myIter,myThid) |
39 |
|
|
40 |
C !DESCRIPTION: |
C !DESCRIPTION: |
41 |
C Calculates all the horizontal accelerations except for the implicit surface |
C Calculates all the horizontal accelerations except for the implicit surface |
58 |
C k :: vertical level |
C k :: vertical level |
59 |
C kUp :: =1 or 2 for consecutive k |
C kUp :: =1 or 2 for consecutive k |
60 |
C kDown :: =2 or 1 for consecutive k |
C kDown :: =2 or 1 for consecutive k |
61 |
C phi_hyd :: hydrostatic pressure (perturbation) |
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 myCurrentTime :: current time |
C myTime :: current time |
67 |
C myIter :: current time-step number |
C myIter :: current time-step number |
68 |
C myThid :: thread number |
C myThid :: thread number |
69 |
INTEGER bi,bj,iMin,iMax,jMin,jMax |
INTEGER bi,bj,iMin,iMax,jMin,jMax |
70 |
INTEGER k,kUp,kDown |
INTEGER k,kUp,kDown |
71 |
_RL phi_hyd(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
_RL dPhiHydX(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
72 |
|
_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 myCurrentTime |
_RL myTime |
78 |
INTEGER myIter |
INTEGER myIter |
79 |
INTEGER myThid |
INTEGER myThid |
80 |
|
|
120 |
_RL vTrans(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RL vTrans(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
121 |
_RL uFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RL uFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
122 |
_RL vFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RL vFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
123 |
|
_RL rTransU(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
124 |
|
_RL rTransV(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
125 |
|
_RL KE(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
126 |
|
_RL viscAhD(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
127 |
|
_RL viscAhZ(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
128 |
|
_RL viscA4D(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
129 |
|
_RL viscA4Z(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
130 |
|
_RL vort3(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
131 |
|
_RL hDiv(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
132 |
|
_RL strain(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
133 |
|
_RL tension(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
134 |
C I,J,K - Loop counters |
C I,J,K - Loop counters |
135 |
C rVelMaskOverride - Factor for imposing special surface boundary conditions |
C rVelMaskOverride - Factor for imposing special surface boundary conditions |
136 |
C ( set according to free-surface condition ). |
C ( set according to free-surface condition ). |
164 |
INTEGER km1,kp1 |
INTEGER km1,kp1 |
165 |
_RL wVelBottomOverride |
_RL wVelBottomOverride |
166 |
LOGICAL bottomDragTerms |
LOGICAL bottomDragTerms |
|
_RL KE(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
|
167 |
CEOP |
CEOP |
168 |
|
|
169 |
km1=MAX(1,k-1) |
km1=MAX(1,k-1) |
185 |
pF(i,j) = 0. |
pF(i,j) = 0. |
186 |
fZon(i,j) = 0. |
fZon(i,j) = 0. |
187 |
fMer(i,j) = 0. |
fMer(i,j) = 0. |
188 |
|
rTransU(i,j) = 0. |
189 |
|
rTransV(i,j) = 0. |
190 |
|
strain(i,j) = 0. |
191 |
|
tension(i,j) = 0. |
192 |
ENDDO |
ENDDO |
193 |
ENDDO |
ENDDO |
194 |
|
|
263 |
ENDDO |
ENDDO |
264 |
ENDDO |
ENDDO |
265 |
|
|
266 |
CALL MOM_CALC_KE(bi,bj,k,uFld,vFld,KE,myThid) |
CALL MOM_CALC_KE(bi,bj,k,3,uFld,vFld,KE,myThid) |
267 |
|
|
268 |
|
c IF (viscAstrain.NE.0. .OR. viscAtension.NE.0.) THEN |
269 |
|
CALL MOM_CALC_TENSION(bi,bj,k,uFld,vFld, |
270 |
|
O tension, |
271 |
|
I myThid) |
272 |
|
CALL MOM_CALC_STRAIN(bi,bj,k,uFld,vFld,hFacZ, |
273 |
|
O strain, |
274 |
|
I myThid) |
275 |
|
c ENDIF |
276 |
|
|
277 |
|
C--- First call (k=1): compute vertical adv. flux fVerU(kUp) & fVerV(kUp) |
278 |
|
IF (momAdvection.AND.k.EQ.1) THEN |
279 |
|
|
280 |
|
C- Calculate vertical transports above U & V points (West & South face): |
281 |
|
CALL MOM_CALC_RTRANS( k, bi, bj, |
282 |
|
O rTransU, rTransV, |
283 |
|
I myTime, myIter, myThid) |
284 |
|
|
285 |
|
C- Free surface correction term (flux at k=1) |
286 |
|
CALL MOM_U_ADV_WU(bi,bj,k,uVel,wVel,rTransU,af,myThid) |
287 |
|
DO j=jMin,jMax |
288 |
|
DO i=iMin,iMax |
289 |
|
fVerU(i,j,kUp) = af(i,j) |
290 |
|
ENDDO |
291 |
|
ENDDO |
292 |
|
|
293 |
|
CALL MOM_V_ADV_WV(bi,bj,k,vVel,wVel,rTransV,af,myThid) |
294 |
|
DO j=jMin,jMax |
295 |
|
DO i=iMin,iMax |
296 |
|
fVerV(i,j,kUp) = af(i,j) |
297 |
|
ENDDO |
298 |
|
ENDDO |
299 |
|
|
300 |
|
C--- endif momAdvection & k=1 |
301 |
|
ENDIF |
302 |
|
|
303 |
|
|
304 |
|
C--- Calculate vertical transports (at k+1) below U & V points : |
305 |
|
IF (momAdvection) THEN |
306 |
|
CALL MOM_CALC_RTRANS( k+1, bi, bj, |
307 |
|
O rTransU, rTransV, |
308 |
|
I myTime, myIter, myThid) |
309 |
|
ENDIF |
310 |
|
|
311 |
|
c IF (momViscosity) THEN |
312 |
|
c & CALL MOM_CALC_VISCOSITY(bi,bj,k, |
313 |
|
c I uFld,vFld, |
314 |
|
c O viscAhD,viscAhZ,myThid) |
315 |
|
|
316 |
C---- Zonal momentum equation starts here |
C---- Zonal momentum equation starts here |
317 |
|
|
318 |
C Bi-harmonic term del^2 U -> v4F |
C Bi-harmonic term del^2 U -> v4F |
319 |
IF (momViscosity) |
IF (momViscosity .AND. viscA4.NE.0. ) |
320 |
& CALL MOM_U_DEL2U(bi,bj,k,uFld,hFacZ,v4f,myThid) |
& CALL MOM_U_DEL2U(bi,bj,k,uFld,hFacZ,v4f,myThid) |
321 |
|
|
322 |
C--- Calculate mean and eddy fluxes between cells for zonal flow. |
C--- Calculate mean and eddy fluxes between cells for zonal flow. |
349 |
& CALL MOM_U_YVISCFLUX(bi,bj,k,uFld,v4F,hFacZ,vF,myThid) |
& CALL MOM_U_YVISCFLUX(bi,bj,k,uFld,v4F,hFacZ,vF,myThid) |
350 |
|
|
351 |
C Combine fluxes -> fMer |
C Combine fluxes -> fMer |
352 |
DO j=jMin,jMax |
DO j=jMin,jMax+1 |
353 |
DO i=iMin,iMax |
DO i=iMin,iMax |
354 |
fMer(i,j) = vDudyFac*aF(i,j) + AhDudyFac*vF(i,j) |
fMer(i,j) = vDudyFac*aF(i,j) + AhDudyFac*vF(i,j) |
355 |
ENDDO |
ENDDO |
357 |
|
|
358 |
C-- Vertical flux (fVer is at upper face of "u" cell) |
C-- Vertical flux (fVer is at upper face of "u" cell) |
359 |
|
|
|
C-- Free surface correction term (flux at k=1) |
|
|
IF (momAdvection.AND.k.EQ.1) THEN |
|
|
CALL MOM_U_ADV_WU(bi,bj,k,uVel,wVel,af,myThid) |
|
|
DO j=jMin,jMax |
|
|
DO i=iMin,iMax |
|
|
fVerU(i,j,kUp) = af(i,j) |
|
|
ENDDO |
|
|
ENDDO |
|
|
ENDIF |
|
360 |
C Mean flow component of vertical flux (at k+1) -> aF |
C Mean flow component of vertical flux (at k+1) -> aF |
361 |
IF (momAdvection) |
IF (momAdvection) |
362 |
& CALL MOM_U_ADV_WU(bi,bj,k+1,uVel,wVel,af,myThid) |
& CALL MOM_U_ADV_WU(bi,bj,k+1,uVel,wVel,rTransU,af,myThid) |
363 |
|
|
364 |
C Eddy component of vertical flux (interior component only) -> vrF |
C Eddy component of vertical flux (interior component only) -> vrF |
365 |
IF (momViscosity.AND..NOT.implicitViscosity) |
IF (momViscosity.AND..NOT.implicitViscosity) |
372 |
ENDDO |
ENDDO |
373 |
ENDDO |
ENDDO |
374 |
|
|
|
C--- Hydrostatic term ( -1/rhoConst . dphi/dx ) |
|
|
IF (momPressureForcing) THEN |
|
|
DO j=jMin,jMax |
|
|
DO i=iMin,iMax |
|
|
pf(i,j) = - _recip_dxC(i,j,bi,bj) |
|
|
& *(phi_hyd(i,j,k)-phi_hyd(i-1,j,k)) |
|
|
ENDDO |
|
|
ENDDO |
|
|
ENDIF |
|
|
|
|
375 |
C-- Tendency is minus divergence of the fluxes + coriolis + pressure term |
C-- Tendency is minus divergence of the fluxes + coriolis + pressure term |
376 |
DO j=jMin,jMax |
DO j=jMin,jMax |
377 |
DO i=iMin,iMax |
DO i=iMin,iMax |
387 |
& +fMer(i,j+1) - fMer(i ,j) |
& +fMer(i,j+1) - fMer(i ,j) |
388 |
& +fVerU(i,j,kUp)*rkFac - fVerU(i,j,kDown)*rkFac |
& +fVerU(i,j,kUp)*rkFac - fVerU(i,j,kDown)*rkFac |
389 |
& ) |
& ) |
390 |
& _PHM( +phxFac * pf(i,j) ) |
& - phxFac*dPhiHydX(i,j) |
391 |
ENDDO |
ENDDO |
392 |
ENDDO |
ENDDO |
393 |
|
|
394 |
|
#ifdef NONLIN_FRSURF |
395 |
|
C-- account for 3.D divergence of the flow in rStar coordinate: |
396 |
|
IF ( momAdvection .AND. select_rStar.GT.0 ) THEN |
397 |
|
DO j=jMin,jMax |
398 |
|
DO i=iMin,iMax |
399 |
|
gU(i,j,k,bi,bj) = gU(i,j,k,bi,bj) |
400 |
|
& - (rStarExpW(i,j,bi,bj) - 1. _d 0)/deltaTfreesurf |
401 |
|
& *uVel(i,j,k,bi,bj) |
402 |
|
ENDDO |
403 |
|
ENDDO |
404 |
|
ENDIF |
405 |
|
IF ( momAdvection .AND. select_rStar.LT.0 ) THEN |
406 |
|
DO j=jMin,jMax |
407 |
|
DO i=iMin,iMax |
408 |
|
gU(i,j,k,bi,bj) = gU(i,j,k,bi,bj) |
409 |
|
& - rStarDhWDt(i,j,bi,bj)*uVel(i,j,k,bi,bj) |
410 |
|
ENDDO |
411 |
|
ENDDO |
412 |
|
ENDIF |
413 |
|
#endif /* NONLIN_FRSURF */ |
414 |
|
|
415 |
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 |
416 |
IF (momViscosity.AND.no_slip_sides) THEN |
IF (momViscosity.AND.no_slip_sides) THEN |
417 |
C- No-slip BCs impose a drag at walls... |
C- No-slip BCs impose a drag at walls... |
432 |
ENDDO |
ENDDO |
433 |
ENDIF |
ENDIF |
434 |
|
|
435 |
C-- Forcing term |
C-- Forcing term (moved to timestep.F) |
436 |
IF (momForcing) |
c IF (momForcing) |
437 |
& CALL EXTERNAL_FORCING_U( |
c & CALL EXTERNAL_FORCING_U( |
438 |
I iMin,iMax,jMin,jMax,bi,bj,k, |
c I iMin,iMax,jMin,jMax,bi,bj,k, |
439 |
I myCurrentTime,myThid) |
c I myTime,myThid) |
440 |
|
|
441 |
C-- Metric terms for curvilinear grid systems |
C-- Metric terms for curvilinear grid systems |
442 |
IF (useNHMTerms) THEN |
IF (useNHMTerms) THEN |
455 |
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) |
456 |
ENDDO |
ENDDO |
457 |
ENDDO |
ENDDO |
458 |
|
|
459 |
|
ENDIF |
460 |
|
IF (usingCylindricalGrid) THEN |
461 |
|
CALL MOM_U_METRIC_CYLINDER(bi,bj,k,uFld,vFld,mT,myThid) |
462 |
|
DO j=jMin,jMax |
463 |
|
DO i=iMin,iMax |
464 |
|
gU(i,j,k,bi,bj) = gU(i,j,k,bi,bj)+mTFacU*mT(i,j) |
465 |
|
ENDDO |
466 |
|
ENDDO |
467 |
|
|
468 |
ENDIF |
ENDIF |
|
|
|
469 |
C-- Set du/dt on boundaries to zero |
C-- Set du/dt on boundaries to zero |
470 |
DO j=jMin,jMax |
DO j=jMin,jMax |
471 |
DO i=iMin,iMax |
DO i=iMin,iMax |
477 |
C---- Meridional momentum equation starts here |
C---- Meridional momentum equation starts here |
478 |
|
|
479 |
C Bi-harmonic term del^2 V -> v4F |
C Bi-harmonic term del^2 V -> v4F |
480 |
IF (momViscosity) |
IF (momViscosity .AND. viscA4.NE.0. ) |
481 |
& CALL MOM_V_DEL2V(bi,bj,k,vFld,hFacZ,v4f,myThid) |
& CALL MOM_V_DEL2V(bi,bj,k,vFld,hFacZ,v4f,myThid) |
482 |
|
|
483 |
C--- Calculate mean and eddy fluxes between cells for meridional flow. |
C--- Calculate mean and eddy fluxes between cells for meridional flow. |
494 |
|
|
495 |
C Combine fluxes -> fZon |
C Combine fluxes -> fZon |
496 |
DO j=jMin,jMax |
DO j=jMin,jMax |
497 |
DO i=iMin,iMax |
DO i=iMin,iMax+1 |
498 |
fZon(i,j) = uDvdxFac*aF(i,j) + AhDvdxFac*vF(i,j) |
fZon(i,j) = uDvdxFac*aF(i,j) + AhDvdxFac*vF(i,j) |
499 |
ENDDO |
ENDDO |
500 |
ENDDO |
ENDDO |
518 |
|
|
519 |
C-- Vertical flux (fVer is at upper face of "v" cell) |
C-- Vertical flux (fVer is at upper face of "v" cell) |
520 |
|
|
|
C-- Free surface correction term (flux at k=1) |
|
|
IF (momAdvection.AND.k.EQ.1) THEN |
|
|
CALL MOM_V_ADV_WV(bi,bj,k,vVel,wVel,af,myThid) |
|
|
DO j=jMin,jMax |
|
|
DO i=iMin,iMax |
|
|
fVerV(i,j,kUp) = af(i,j) |
|
|
ENDDO |
|
|
ENDDO |
|
|
ENDIF |
|
521 |
C o Mean flow component of vertical flux |
C o Mean flow component of vertical flux |
522 |
IF (momAdvection) |
IF (momAdvection) |
523 |
& CALL MOM_V_ADV_WV(bi,bj,k+1,vVel,wVel,af,myThid) |
& CALL MOM_V_ADV_WV(bi,bj,k+1,vVel,wVel,rTransV,af,myThid) |
524 |
|
|
525 |
C Eddy component of vertical flux (interior component only) -> vrF |
C Eddy component of vertical flux (interior component only) -> vrF |
526 |
IF (momViscosity.AND..NOT.implicitViscosity) |
IF (momViscosity.AND..NOT.implicitViscosity) |
533 |
ENDDO |
ENDDO |
534 |
ENDDO |
ENDDO |
535 |
|
|
|
C--- Hydorstatic term (-1/rhoConst . dphi/dy ) |
|
|
IF (momPressureForcing) THEN |
|
|
DO j=jMin,jMax |
|
|
DO i=iMin,iMax |
|
|
pF(i,j) = -_recip_dyC(i,j,bi,bj) |
|
|
& *(phi_hyd(i,j,k)-phi_hyd(i,j-1,k)) |
|
|
ENDDO |
|
|
ENDDO |
|
|
ENDIF |
|
|
|
|
536 |
C-- Tendency is minus divergence of the fluxes + coriolis + pressure term |
C-- Tendency is minus divergence of the fluxes + coriolis + pressure term |
537 |
DO j=jMin,jMax |
DO j=jMin,jMax |
538 |
DO i=iMin,iMax |
DO i=iMin,iMax |
548 |
& +fMer(i,j ) - fMer(i,j-1) |
& +fMer(i,j ) - fMer(i,j-1) |
549 |
& +fVerV(i,j,kUp)*rkFac - fVerV(i,j,kDown)*rkFac |
& +fVerV(i,j,kUp)*rkFac - fVerV(i,j,kDown)*rkFac |
550 |
& ) |
& ) |
551 |
& _PHM( +phyFac*pf(i,j) ) |
& - phyFac*dPhiHydY(i,j) |
552 |
ENDDO |
ENDDO |
553 |
ENDDO |
ENDDO |
554 |
|
|
555 |
|
#ifdef NONLIN_FRSURF |
556 |
|
C-- account for 3.D divergence of the flow in rStar coordinate: |
557 |
|
IF ( momAdvection .AND. select_rStar.GT.0 ) THEN |
558 |
|
DO j=jMin,jMax |
559 |
|
DO i=iMin,iMax |
560 |
|
gV(i,j,k,bi,bj) = gV(i,j,k,bi,bj) |
561 |
|
& - (rStarExpS(i,j,bi,bj) - 1. _d 0)/deltaTfreesurf |
562 |
|
& *vVel(i,j,k,bi,bj) |
563 |
|
ENDDO |
564 |
|
ENDDO |
565 |
|
ENDIF |
566 |
|
IF ( momAdvection .AND. select_rStar.LT.0 ) THEN |
567 |
|
DO j=jMin,jMax |
568 |
|
DO i=iMin,iMax |
569 |
|
gV(i,j,k,bi,bj) = gV(i,j,k,bi,bj) |
570 |
|
& - rStarDhSDt(i,j,bi,bj)*vVel(i,j,k,bi,bj) |
571 |
|
ENDDO |
572 |
|
ENDDO |
573 |
|
ENDIF |
574 |
|
#endif /* NONLIN_FRSURF */ |
575 |
|
|
576 |
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 |
577 |
IF (momViscosity.AND.no_slip_sides) THEN |
IF (momViscosity.AND.no_slip_sides) THEN |
578 |
C- No-slip BCs impose a drag at walls... |
C- No-slip BCs impose a drag at walls... |
593 |
ENDDO |
ENDDO |
594 |
ENDIF |
ENDIF |
595 |
|
|
596 |
C-- Forcing term |
C-- Forcing term (moved to timestep.F) |
597 |
IF (momForcing) |
c IF (momForcing) |
598 |
& CALL EXTERNAL_FORCING_V( |
c & CALL EXTERNAL_FORCING_V( |
599 |
I iMin,iMax,jMin,jMax,bi,bj,k, |
c I iMin,iMax,jMin,jMax,bi,bj,k, |
600 |
I myCurrentTime,myThid) |
c I myTime,myThid) |
601 |
|
|
602 |
C-- Metric terms for curvilinear grid systems |
C-- Metric terms for curvilinear grid systems |
603 |
IF (useNHMTerms) THEN |
IF (useNHMTerms) THEN |
617 |
ENDDO |
ENDDO |
618 |
ENDDO |
ENDDO |
619 |
ENDIF |
ENDIF |
620 |
|
IF (usingCylindricalGrid) THEN |
621 |
|
CALL MOM_V_METRIC_CYLINDER(bi,bj,k,uFld,vFld,mT,myThid) |
622 |
|
DO j=jMin,jMax |
623 |
|
DO i=iMin,iMax |
624 |
|
gV(i,j,k,bi,bj) = gV(i,j,k,bi,bj)+mTFacV*mT(i,j) |
625 |
|
ENDDO |
626 |
|
ENDDO |
627 |
|
ENDIF |
628 |
|
|
629 |
C-- Set dv/dt on boundaries to zero |
C-- Set dv/dt on boundaries to zero |
630 |
DO j=jMin,jMax |
DO j=jMin,jMax |
635 |
|
|
636 |
C-- Coriolis term |
C-- Coriolis term |
637 |
C Note. As coded here, coriolis will not work with "thin walls" |
C Note. As coded here, coriolis will not work with "thin walls" |
638 |
#ifdef INCLUDE_CD_CODE |
c IF (useCDscheme) THEN |
639 |
CALL MOM_CDSCHEME(bi,bj,k,phi_hyd,myThid) |
c CALL MOM_CDSCHEME(bi,bj,k,dPhiHydX,dPhiHydY,myThid) |
640 |
#else |
c ELSE |
641 |
CALL MOM_U_CORIOLIS(bi,bj,k,vFld,cf,myThid) |
IF (.NOT.useCDscheme) THEN |
642 |
DO j=jMin,jMax |
CALL MOM_U_CORIOLIS(bi,bj,k,vFld,cf,myThid) |
643 |
DO i=iMin,iMax |
DO j=jMin,jMax |
644 |
gU(i,j,k,bi,bj) = gU(i,j,k,bi,bj)+fuFac*cf(i,j) |
DO i=iMin,iMax |
645 |
ENDDO |
gU(i,j,k,bi,bj) = gU(i,j,k,bi,bj)+fuFac*cf(i,j) |
646 |
ENDDO |
ENDDO |
647 |
CALL MOM_V_CORIOLIS(bi,bj,k,uFld,cf,myThid) |
ENDDO |
648 |
DO j=jMin,jMax |
CALL MOM_V_CORIOLIS(bi,bj,k,uFld,cf,myThid) |
649 |
DO i=iMin,iMax |
DO j=jMin,jMax |
650 |
gV(i,j,k,bi,bj) = gV(i,j,k,bi,bj)+fvFac*cf(i,j) |
DO i=iMin,iMax |
651 |
|
gV(i,j,k,bi,bj) = gV(i,j,k,bi,bj)+fvFac*cf(i,j) |
652 |
|
ENDDO |
653 |
|
ENDDO |
654 |
|
ENDIF |
655 |
|
|
656 |
|
IF (nonHydrostatic.OR.quasiHydrostatic) THEN |
657 |
|
CALL MOM_U_CORIOLIS_NH(bi,bj,k,wVel,cf,myThid) |
658 |
|
DO j=jMin,jMax |
659 |
|
DO i=iMin,iMax |
660 |
|
gU(i,j,k,bi,bj) = gU(i,j,k,bi,bj)+fuFac*cf(i,j) |
661 |
|
ENDDO |
662 |
ENDDO |
ENDDO |
663 |
ENDDO |
ENDIF |
|
#endif /* INCLUDE_CD_CODE */ |
|
664 |
|
|
665 |
RETURN |
RETURN |
666 |
END |
END |