91 |
C nCFace :: owns a tile for cube grid runs using |
C nCFace :: owns a tile for cube grid runs using |
92 |
C :: multi-dim advection. |
C :: multi-dim advection. |
93 |
C [N,S,E,W]_edge :: true if N,S,E,W edge of myTile is an Edge of the cube |
C [N,S,E,W]_edge :: true if N,S,E,W edge of myTile is an Edge of the cube |
94 |
C msgBuf :: Informational/error meesage buffer |
C msgBuf :: Informational/error message buffer |
95 |
_RS maskUp (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RS maskUp (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
96 |
INTEGER i,j,k,km1,kUp,kDown |
INTEGER i,j,k,km1,kUp,kDown |
97 |
_RS xA (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RS xA (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
139 |
INTEGER npass, ipass |
INTEGER npass, ipass |
140 |
INTEGER nCFace, n |
INTEGER nCFace, n |
141 |
LOGICAL N_edge, S_edge, E_edge, W_edge |
LOGICAL N_edge, S_edge, E_edge, W_edge |
142 |
|
LOGICAL noFlowAcrossSurf |
143 |
CHARACTER*(MAX_LEN_MBUF) msgBuf |
CHARACTER*(MAX_LEN_MBUF) msgBuf |
144 |
#ifdef ALLOW_EXCH2 |
#ifdef ALLOW_EXCH2 |
145 |
INTEGER myTile |
INTEGER myTile |
444 |
|
|
445 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
446 |
|
|
447 |
|
noFlowAcrossSurf = rigidLid .OR. nonlinFreeSurf.GE.1 |
448 |
|
& .OR. select_rStar.NE.0 |
449 |
|
|
450 |
IF ( .NOT.implicitAdvection ) THEN |
IF ( .NOT.implicitAdvection ) THEN |
451 |
C-- Apply limiter (if any): |
C-- Apply limiter (if any): |
452 |
CALL GAD_SOM_LIM_R( bi,bj, limiter, |
CALL GAD_SOM_LIM_R( bi,bj, limiter, |
510 |
#else |
#else |
511 |
c IF ( k.EQ.1 ) THEN |
c IF ( k.EQ.1 ) THEN |
512 |
#endif |
#endif |
513 |
IF ( (rigidLid.OR.nonlinFreeSurf.GE.1) .AND. k.EQ.1 ) THEN |
IF ( noFlowAcrossSurf .AND. k.EQ.1 ) THEN |
514 |
C- Surface interface : |
C- Surface interface : |
515 |
DO j=1-OLy,sNy+OLy |
DO j=1-OLy,sNy+OLy |
516 |
DO i=1-OLx,sNx+OLx |
DO i=1-OLx,sNx+OLx |
520 |
ENDDO |
ENDDO |
521 |
ENDDO |
ENDDO |
522 |
|
|
523 |
ELSEIF ( rigidLid.OR.nonlinFreeSurf.GE.1 ) THEN |
ELSEIF ( noFlowAcrossSurf ) THEN |
524 |
C- Interior interface : |
C- Interior interface : |
525 |
DO j=1-OLy,sNy+OLy |
DO j=1-OLy,sNy+OLy |
526 |
DO i=1-OLx,sNx+OLx |
DO i=1-OLx,sNx+OLx |
589 |
c localTr = smTr0(i,j,k)/smVol(i,j,k) |
c localTr = smTr0(i,j,k)/smVol(i,j,k) |
590 |
c gTracer(i,j,k,bi,bj) = ( localTr - tracer(i,j,k,bi,bj) ) |
c gTracer(i,j,k,bi,bj) = ( localTr - tracer(i,j,k,bi,bj) ) |
591 |
c & / deltaTLev(k) |
c & / deltaTLev(k) |
592 |
C-- consistent with rescaling of tendencies (in FREESURF_RESCALE_G): |
C-- Non-Lin Free-Surf: consistent with rescaling of tendencies |
593 |
|
C (in FREESURF_RESCALE_G) and RealFreshFlux/addMass. |
594 |
|
C Also valid for linear Free-Surf (r & r* coords) except that surf tracer |
595 |
|
C loss/gain is computed (in GAD_SOM_ADV_R) from partially updated tracer |
596 |
|
C (instead of from Tr^n as fresh-water dilution effect) resulting in |
597 |
|
C inaccurate linFSConserveTr and "surfExpan_" monitor. |
598 |
gTracer(i,j,k,bi,bj) = |
gTracer(i,j,k,bi,bj) = |
599 |
& ( smTr0(i,j,k) - tracer(i,j,k,bi,bj)*smVol(i,j,k) ) |
& ( smTr0(i,j,k) - tracer(i,j,k,bi,bj)*smVol(i,j,k) ) |
600 |
& *recip_rA(i,j,bi,bj)*recip_deepFac2C(k) |
& *recip_rA(i,j,bi,bj)*recip_deepFac2C(k) |