108 |
C | |
C | |
109 |
C |-- OBCS_APPLY_UV |
C |-- OBCS_APPLY_UV |
110 |
C | |
C | |
|
C |-- CALL TIMEAVE_CUMUL_1T |
|
111 |
C |-- CALL DEBUG_STATS_RL |
C |-- CALL DEBUG_STATS_RL |
112 |
|
|
113 |
C !INPUT/OUTPUT PARAMETERS: |
C !INPUT/OUTPUT PARAMETERS: |
121 |
|
|
122 |
C !LOCAL VARIABLES: |
C !LOCAL VARIABLES: |
123 |
C == Local variables |
C == Local variables |
124 |
C fVer[STUV] o fVer: Vertical flux term - note fVer |
C fVer[UV] o fVer: Vertical flux term - note fVer |
125 |
C is "pipelined" in the vertical |
C is "pipelined" in the vertical |
126 |
C so we need an fVer for each |
C so we need an fVer for each |
127 |
C variable. |
C variable. |
128 |
C phiHydC :: hydrostatic potential anomaly at cell center |
C phiHydC :: hydrostatic potential anomaly at cell center |
129 |
C In z coords phiHyd is the hydrostatic potential |
C In z coords phiHyd is the hydrostatic potential |
130 |
C (=pressure/rho0) anomaly |
C (=pressure/rho0) anomaly |
133 |
C dPhiHydX,Y :: Gradient (X & Y directions) of hydrostatic potential anom. |
C dPhiHydX,Y :: Gradient (X & Y directions) of hydrostatic potential anom. |
134 |
C phiSurfX, :: gradient of Surface potential (Pressure/rho, ocean) |
C phiSurfX, :: gradient of Surface potential (Pressure/rho, ocean) |
135 |
C phiSurfY or geopotential (atmos) in X and Y direction |
C phiSurfY or geopotential (atmos) in X and Y direction |
136 |
|
C guDissip :: dissipation tendency (all explicit terms), u component |
137 |
|
C gvDissip :: dissipation tendency (all explicit terms), v component |
138 |
C iMin, iMax - Ranges and sub-block indices on which calculations |
C iMin, iMax - Ranges and sub-block indices on which calculations |
139 |
C jMin, jMax are applied. |
C jMin, jMax are applied. |
140 |
C bi, bj |
C bi, bj |
149 |
_RL dPhiHydY(1-Olx:sNx+Olx,1-Oly:sNy+Oly) |
_RL dPhiHydY(1-Olx:sNx+Olx,1-Oly:sNy+Oly) |
150 |
_RL phiSurfX(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RL phiSurfX(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
151 |
_RL phiSurfY(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RL phiSurfY(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
152 |
|
_RL guDissip(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
153 |
|
_RL gvDissip(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
154 |
_RL KappaRU (1-Olx:sNx+Olx,1-Oly:sNy+Oly,Nr) |
_RL KappaRU (1-Olx:sNx+Olx,1-Oly:sNy+Oly,Nr) |
155 |
_RL KappaRV (1-Olx:sNx+Olx,1-Oly:sNy+Oly,Nr) |
_RL KappaRV (1-Olx:sNx+Olx,1-Oly:sNy+Oly,Nr) |
156 |
|
|
160 |
INTEGER i, j |
INTEGER i, j |
161 |
INTEGER k, km1, kp1, kup, kDown |
INTEGER k, km1, kp1, kup, kDown |
162 |
|
|
163 |
LOGICAL DIFFERENT_MULTIPLE |
#ifdef ALLOW_DIAGNOSTICS |
164 |
EXTERNAL DIFFERENT_MULTIPLE |
_RL tmpFac |
165 |
|
#endif /* ALLOW_DIAGNOSTICS */ |
166 |
|
|
167 |
|
|
168 |
C--- The algorithm... |
C--- The algorithm... |
169 |
C |
C |
261 |
#ifdef ALLOW_AUTODIFF_TAMC |
#ifdef ALLOW_AUTODIFF_TAMC |
262 |
cph( |
cph( |
263 |
c-- need some re-initialisation here to break dependencies |
c-- need some re-initialisation here to break dependencies |
|
c-- totphihyd is assumed zero from ini_pressure, i.e. |
|
|
c-- avoiding iterate pressure p = integral of (g*rho(p)*dz) |
|
264 |
cph) |
cph) |
|
totPhiHyd(i,j,k,bi,bj) = 0. _d 0 |
|
265 |
gu(i,j,k,bi,bj) = 0. _d 0 |
gu(i,j,k,bi,bj) = 0. _d 0 |
266 |
gv(i,j,k,bi,bj) = 0. _d 0 |
gv(i,j,k,bi,bj) = 0. _d 0 |
267 |
#endif |
#endif |
280 |
dPhiHydY(i,j) = 0. _d 0 |
dPhiHydY(i,j) = 0. _d 0 |
281 |
phiSurfX(i,j) = 0. _d 0 |
phiSurfX(i,j) = 0. _d 0 |
282 |
phiSurfY(i,j) = 0. _d 0 |
phiSurfY(i,j) = 0. _d 0 |
283 |
|
guDissip(i,j) = 0. _d 0 |
284 |
|
gvDissip(i,j) = 0. _d 0 |
285 |
ENDDO |
ENDDO |
286 |
ENDDO |
ENDDO |
287 |
|
|
379 |
I bi,bj,iMin,iMax,jMin,jMax,k,kup,kDown, |
I bi,bj,iMin,iMax,jMin,jMax,k,kup,kDown, |
380 |
I dPhiHydX,dPhiHydY,KappaRU,KappaRV, |
I dPhiHydX,dPhiHydY,KappaRU,KappaRV, |
381 |
U fVerU, fVerV, |
U fVerU, fVerV, |
382 |
|
O guDissip, gvDissip, |
383 |
I myTime, myIter, myThid) |
I myTime, myIter, myThid) |
384 |
#endif |
#endif |
385 |
CALL TIMESTEP( |
CALL TIMESTEP( |
386 |
I bi,bj,iMin,iMax,jMin,jMax,k, |
I bi,bj,iMin,iMax,jMin,jMax,k, |
387 |
I dPhiHydX,dPhiHydY, phiSurfX, phiSurfY, |
I dPhiHydX,dPhiHydY, phiSurfX, phiSurfY, |
388 |
|
I guDissip, gvDissip, |
389 |
I myTime, myIter, myThid) |
I myTime, myIter, myThid) |
390 |
|
|
391 |
#ifdef ALLOW_OBCS |
#ifdef ALLOW_OBCS |
418 |
#endif /* ALLOW_AUTODIFF_TAMC */ |
#endif /* ALLOW_AUTODIFF_TAMC */ |
419 |
CALL IMPLDIFF( |
CALL IMPLDIFF( |
420 |
I bi, bj, iMin, iMax, jMin, jMax, |
I bi, bj, iMin, iMax, jMin, jMax, |
421 |
I deltaTmom, KappaRU,recip_HFacW, |
I 0, KappaRU,recip_HFacW, |
422 |
U gU, |
U gU, |
423 |
I myThid ) |
I myThid ) |
424 |
#ifdef ALLOW_AUTODIFF_TAMC |
#ifdef ALLOW_AUTODIFF_TAMC |
427 |
#endif /* ALLOW_AUTODIFF_TAMC */ |
#endif /* ALLOW_AUTODIFF_TAMC */ |
428 |
CALL IMPLDIFF( |
CALL IMPLDIFF( |
429 |
I bi, bj, iMin, iMax, jMin, jMax, |
I bi, bj, iMin, iMax, jMin, jMax, |
430 |
I deltaTmom, KappaRV,recip_HFacS, |
I 0, KappaRV,recip_HFacS, |
431 |
U gV, |
U gV, |
432 |
I myThid ) |
I myThid ) |
433 |
ENDIF |
ENDIF |
448 |
#endif /* ALLOW_AUTODIFF_TAMC */ |
#endif /* ALLOW_AUTODIFF_TAMC */ |
449 |
CALL IMPLDIFF( |
CALL IMPLDIFF( |
450 |
I bi, bj, iMin, iMax, jMin, jMax, |
I bi, bj, iMin, iMax, jMin, jMax, |
451 |
I deltaTmom, KappaRU,recip_HFacW, |
I 0, KappaRU,recip_HFacW, |
452 |
U vVelD, |
U vVelD, |
453 |
I myThid ) |
I myThid ) |
454 |
#ifdef ALLOW_AUTODIFF_TAMC |
#ifdef ALLOW_AUTODIFF_TAMC |
456 |
#endif /* ALLOW_AUTODIFF_TAMC */ |
#endif /* ALLOW_AUTODIFF_TAMC */ |
457 |
CALL IMPLDIFF( |
CALL IMPLDIFF( |
458 |
I bi, bj, iMin, iMax, jMin, jMax, |
I bi, bj, iMin, iMax, jMin, jMax, |
459 |
I deltaTmom, KappaRV,recip_HFacS, |
I 0, KappaRV,recip_HFacS, |
460 |
U uVelD, |
U uVelD, |
461 |
I myThid ) |
I myThid ) |
462 |
ENDIF |
ENDIF |
466 |
ENDDO |
ENDDO |
467 |
ENDDO |
ENDDO |
468 |
|
|
469 |
|
#ifdef ALLOW_OBCS |
470 |
|
IF (useOBCS) THEN |
471 |
|
CALL OBCS_PRESCRIBE_EXCHANGES(myThid) |
472 |
|
ENDIF |
473 |
|
#endif |
474 |
|
|
475 |
|
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
476 |
|
|
477 |
Cml( |
Cml( |
478 |
C In order to compare the variance of phiHydLow of a p/z-coordinate |
C In order to compare the variance of phiHydLow of a p/z-coordinate |
479 |
C run with etaH of a z/p-coordinate run the drift of phiHydLow |
C run with etaH of a z/p-coordinate run the drift of phiHydLow |
482 |
C & 'phiHydLow', myThid ) |
C & 'phiHydLow', myThid ) |
483 |
Cml) |
Cml) |
484 |
|
|
485 |
|
#ifdef ALLOW_DIAGNOSTICS |
486 |
|
IF ( usediagnostics ) THEN |
487 |
|
|
488 |
|
CALL DIAGNOSTICS_FILL(totPhihyd,'PHIHYD ',0,Nr,0,1,1,myThid) |
489 |
|
CALL DIAGNOSTICS_FILL(phiHydLow,'PHIBOT ',0, 1,0,1,1,myThid) |
490 |
|
|
491 |
|
tmpFac = 1. _d 0 |
492 |
|
CALL DIAGNOSTICS_SCALE_FILL(totPhihyd,tmpFac,2, |
493 |
|
& 'PHIHYDSQ',0,Nr,0,1,1,myThid) |
494 |
|
|
495 |
|
CALL DIAGNOSTICS_SCALE_FILL(phiHydLow,tmpFac,2, |
496 |
|
& 'PHIBOTSQ',0, 1,0,1,1,myThid) |
497 |
|
|
498 |
|
ENDIF |
499 |
|
#endif /* ALLOW_DIAGNOSTICS */ |
500 |
|
|
501 |
#ifdef ALLOW_DEBUG |
#ifdef ALLOW_DEBUG |
502 |
If ( debugLevel .GE. debLevB ) THEN |
If ( debugLevel .GE. debLevB ) THEN |
503 |
CALL DEBUG_STATS_RL(1,EtaN,'EtaN (DYNAMICS)',myThid) |
CALL DEBUG_STATS_RL(1,EtaN,'EtaN (DYNAMICS)',myThid) |
506 |
CALL DEBUG_STATS_RL(Nr,wVel,'Wvel (DYNAMICS)',myThid) |
CALL DEBUG_STATS_RL(Nr,wVel,'Wvel (DYNAMICS)',myThid) |
507 |
CALL DEBUG_STATS_RL(Nr,theta,'Theta (DYNAMICS)',myThid) |
CALL DEBUG_STATS_RL(Nr,theta,'Theta (DYNAMICS)',myThid) |
508 |
CALL DEBUG_STATS_RL(Nr,salt,'Salt (DYNAMICS)',myThid) |
CALL DEBUG_STATS_RL(Nr,salt,'Salt (DYNAMICS)',myThid) |
509 |
CALL DEBUG_STATS_RL(Nr,Gu,'Gu (DYNAMICS)',myThid) |
CALL DEBUG_STATS_RL(Nr,gU,'Gu (DYNAMICS)',myThid) |
510 |
CALL DEBUG_STATS_RL(Nr,Gv,'Gv (DYNAMICS)',myThid) |
CALL DEBUG_STATS_RL(Nr,gV,'Gv (DYNAMICS)',myThid) |
511 |
CALL DEBUG_STATS_RL(Nr,Gt,'Gt (DYNAMICS)',myThid) |
CALL DEBUG_STATS_RL(Nr,gT,'Gt (DYNAMICS)',myThid) |
512 |
CALL DEBUG_STATS_RL(Nr,Gs,'Gs (DYNAMICS)',myThid) |
CALL DEBUG_STATS_RL(Nr,gS,'Gs (DYNAMICS)',myThid) |
513 |
CALL DEBUG_STATS_RL(Nr,GuNm1,'GuNm1 (DYNAMICS)',myThid) |
#ifndef ALLOW_ADAMSBASHFORTH_3 |
514 |
CALL DEBUG_STATS_RL(Nr,GvNm1,'GvNm1 (DYNAMICS)',myThid) |
CALL DEBUG_STATS_RL(Nr,guNm1,'GuNm1 (DYNAMICS)',myThid) |
515 |
CALL DEBUG_STATS_RL(Nr,GtNm1,'GtNm1 (DYNAMICS)',myThid) |
CALL DEBUG_STATS_RL(Nr,gvNm1,'GvNm1 (DYNAMICS)',myThid) |
516 |
CALL DEBUG_STATS_RL(Nr,GsNm1,'GsNm1 (DYNAMICS)',myThid) |
CALL DEBUG_STATS_RL(Nr,gtNm1,'GtNm1 (DYNAMICS)',myThid) |
517 |
|
CALL DEBUG_STATS_RL(Nr,gsNm1,'GsNm1 (DYNAMICS)',myThid) |
518 |
|
#endif |
519 |
ENDIF |
ENDIF |
520 |
#endif |
#endif |
521 |
|
|