58 |
C o uTrans: Zonal transport |
C o uTrans: Zonal transport |
59 |
C o vTrans: Meridional transport |
C o vTrans: Meridional transport |
60 |
C o rTrans: Vertical transport |
C o rTrans: Vertical transport |
61 |
C maskC,maskUp o maskC: land/water mask for tracer cells |
C maskUp o maskUp: land/water mask for W points |
|
C o maskUp: land/water mask for W points |
|
62 |
C fVer[STUV] o fVer: Vertical flux term - note fVer |
C fVer[STUV] o fVer: Vertical flux term - note fVer |
63 |
C is "pipelined" in the vertical |
C is "pipelined" in the vertical |
64 |
C so we need an fVer for each |
C so we need an fVer for each |
66 |
C rhoK, rhoKM1 - Density at current level, and level above |
C rhoK, rhoKM1 - Density at current level, and level above |
67 |
C phiHyd - Hydrostatic part of the potential phiHydi. |
C phiHyd - Hydrostatic part of the potential phiHydi. |
68 |
C In z coords phiHydiHyd is the hydrostatic |
C In z coords phiHydiHyd is the hydrostatic |
69 |
C pressure anomaly |
C Potential (=pressure/rho0) anomaly |
70 |
C In p coords phiHydiHyd is the geopotential |
C In p coords phiHydiHyd is the geopotential |
71 |
C surface height |
C surface height anomaly. |
|
C anomaly. |
|
72 |
C phiSurfX, - gradient of Surface potentiel (Pressure/rho, ocean) |
C phiSurfX, - gradient of Surface potentiel (Pressure/rho, ocean) |
73 |
C phiSurfY or geopotentiel (atmos) in X and Y direction |
C phiSurfY or geopotentiel (atmos) in X and Y direction |
74 |
C KappaRT, - Total diffusion in vertical for T and S. |
C KappaRT, - Total diffusion in vertical for T and S. |
79 |
C k, kup, - Index for layer above and below. kup and kDown |
C k, kup, - Index for layer above and below. kup and kDown |
80 |
C kDown, km1 are switched with layer to be the appropriate |
C kDown, km1 are switched with layer to be the appropriate |
81 |
C index into fVerTerm. |
C index into fVerTerm. |
82 |
|
C tauAB - Adams-Bashforth timestepping weight: 0=forward ; 1/2=Adams-Bashf. |
83 |
_RS xA (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RS xA (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
84 |
_RS yA (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RS yA (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
85 |
_RL uTrans (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RL uTrans (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
86 |
_RL vTrans (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RL vTrans (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
87 |
_RL rTrans (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RL rTrans (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
|
_RS maskC (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
|
88 |
_RS maskUp (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RS maskUp (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
89 |
_RL fVerT (1-OLx:sNx+OLx,1-OLy:sNy+OLy,2) |
_RL fVerT (1-OLx:sNx+OLx,1-OLy:sNy+OLy,2) |
90 |
_RL fVerS (1-OLx:sNx+OLx,1-OLy:sNy+OLy,2) |
_RL fVerS (1-OLx:sNx+OLx,1-OLy:sNy+OLy,2) |
102 |
_RL sigmaX (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
_RL sigmaX (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
103 |
_RL sigmaY (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
_RL sigmaY (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
104 |
_RL sigmaR (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
_RL sigmaR (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
105 |
|
_RL tauAB |
106 |
|
|
107 |
C This is currently used by IVDC and Diagnostics |
C This is currently used by IVDC and Diagnostics |
108 |
_RL ConvectCount (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
_RL ConvectCount (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
199 |
ENDDO |
ENDDO |
200 |
rhoKM1 (i,j) = 0. _d 0 |
rhoKM1 (i,j) = 0. _d 0 |
201 |
rhok (i,j) = 0. _d 0 |
rhok (i,j) = 0. _d 0 |
|
maskC (i,j) = 0. _d 0 |
|
202 |
phiSurfX(i,j) = 0. _d 0 |
phiSurfX(i,j) = 0. _d 0 |
203 |
phiSurfY(i,j) = 0. _d 0 |
phiSurfY(i,j) = 0. _d 0 |
204 |
ENDDO |
ENDDO |
215 |
#ifdef ALLOW_AUTODIFF_TAMC |
#ifdef ALLOW_AUTODIFF_TAMC |
216 |
C-- HPF directive to help TAMC |
C-- HPF directive to help TAMC |
217 |
CHPF$ INDEPENDENT, NEW (rTrans,fVerT,fVerS,fVerU,fVerV |
CHPF$ INDEPENDENT, NEW (rTrans,fVerT,fVerS,fVerU,fVerV |
218 |
CHPF$& ,phiHyd,utrans,vtrans,maskc,xA,yA |
CHPF$& ,phiHyd,utrans,vtrans,xA,yA |
219 |
CHPF$& ,KappaRT,KappaRS,KappaRU,KappaRV |
CHPF$& ,KappaRT,KappaRS,KappaRU,KappaRV |
220 |
CHPF$& ) |
CHPF$& ) |
221 |
#endif /* ALLOW_AUTODIFF_TAMC */ |
#endif /* ALLOW_AUTODIFF_TAMC */ |
419 |
|
|
420 |
C-- Get temporary terms used by tendency routines |
C-- Get temporary terms used by tendency routines |
421 |
CALL CALC_COMMON_FACTORS ( |
CALL CALC_COMMON_FACTORS ( |
422 |
I bi,bj,iMin,iMax,jMin,jMax,k,km1,kup,kDown, |
I bi,bj,iMin,iMax,jMin,jMax,k, |
423 |
O xA,yA,uTrans,vTrans,rTrans,maskC,maskUp, |
O xA,yA,uTrans,vTrans,rTrans,maskUp, |
424 |
I myThid) |
I myThid) |
425 |
|
|
426 |
#ifdef INCLUDE_CALC_DIFFUSIVITY_CALL |
#ifdef INCLUDE_CALC_DIFFUSIVITY_CALL |
427 |
C-- Calculate the total vertical diffusivity |
C-- Calculate the total vertical diffusivity |
428 |
CALL CALC_DIFFUSIVITY( |
CALL CALC_DIFFUSIVITY( |
429 |
I bi,bj,iMin,iMax,jMin,jMax,k, |
I bi,bj,iMin,iMax,jMin,jMax,k, |
430 |
I maskC,maskup, |
I maskUp, |
431 |
O KappaRT,KappaRS,KappaRU,KappaRV, |
O KappaRT,KappaRS,KappaRU,KappaRV, |
432 |
I myThid) |
I myThid) |
433 |
#endif |
#endif |
437 |
IF ( tempStepping ) THEN |
IF ( tempStepping ) THEN |
438 |
CALL CALC_GT( |
CALL CALC_GT( |
439 |
I bi,bj,iMin,iMax,jMin,jMax, k,km1,kup,kDown, |
I bi,bj,iMin,iMax,jMin,jMax, k,km1,kup,kDown, |
440 |
I xA,yA,uTrans,vTrans,rTrans,maskUp,maskC, |
I xA,yA,uTrans,vTrans,rTrans,maskUp, |
441 |
I KappaRT, |
I KappaRT, |
442 |
U fVerT, |
U fVerT, |
443 |
I myTime, myThid) |
I myTime, myThid) |
444 |
|
tauAB = 0.5d0 + abEps |
445 |
CALL TIMESTEP_TRACER( |
CALL TIMESTEP_TRACER( |
446 |
I bi,bj,iMin,iMax,jMin,jMax,k, |
I bi,bj,iMin,iMax,jMin,jMax,k,tauAB, |
447 |
I theta, gT, |
I theta, gT, |
448 |
U gTnm1, |
U gTnm1, |
449 |
I myIter, myThid) |
I myIter, myThid) |
451 |
IF ( saltStepping ) THEN |
IF ( saltStepping ) THEN |
452 |
CALL CALC_GS( |
CALL CALC_GS( |
453 |
I bi,bj,iMin,iMax,jMin,jMax, k,km1,kup,kDown, |
I bi,bj,iMin,iMax,jMin,jMax, k,km1,kup,kDown, |
454 |
I xA,yA,uTrans,vTrans,rTrans,maskUp,maskC, |
I xA,yA,uTrans,vTrans,rTrans,maskUp, |
455 |
I KappaRS, |
I KappaRS, |
456 |
U fVerS, |
U fVerS, |
457 |
I myTime, myThid) |
I myTime, myThid) |
458 |
|
tauAB = 0.5d0 + abEps |
459 |
CALL TIMESTEP_TRACER( |
CALL TIMESTEP_TRACER( |
460 |
I bi,bj,iMin,iMax,jMin,jMax,k, |
I bi,bj,iMin,iMax,jMin,jMax,k,tauAB, |
461 |
I salt, gS, |
I salt, gS, |
462 |
U gSnm1, |
U gSnm1, |
463 |
I myIter, myThid) |
I myIter, myThid) |
532 |
jMin = 1-OLy+2 |
jMin = 1-OLy+2 |
533 |
jMax = sNy+OLy-1 |
jMax = sNy+OLy-1 |
534 |
|
|
535 |
C-- Explicit part of the Surface Pressure Gradient (add in TIMESTEP) |
C-- Explicit part of the Surface Potentiel Gradient (add in TIMESTEP) |
536 |
C (note: this loop will be replaced by CALL CALC_GRAD_ETA) |
C (note: this loop will be replaced by CALL CALC_GRAD_ETA) |
537 |
IF (implicSurfPress.NE.1.) THEN |
IF (implicSurfPress.NE.1.) THEN |
538 |
DO j=jMin,jMax |
CALL CALC_GRAD_PHI_SURF( |
539 |
DO i=iMin,iMax |
I bi,bj,iMin,iMax,jMin,jMax, |
540 |
phiSurfX(i,j) = _recip_dxC(i,j,bi,bj)*gBaro |
I etaN, |
541 |
& *(etaN(i,j,bi,bj)-etaN(i-1,j,bi,bj)) |
O phiSurfX,phiSurfY, |
542 |
phiSurfY(i,j) = _recip_dyC(i,j,bi,bj)*gBaro |
I myThid ) |
|
& *(etaN(i,j,bi,bj)-etaN(i,j-1,bi,bj)) |
|
|
ENDDO |
|
|
ENDDO |
|
543 |
ENDIF |
ENDIF |
544 |
|
|
545 |
C-- Start of dynamics loop |
C-- Start of dynamics loop |