127 |
C phiSurfY or geopotentiel (atmos) in X and Y direction |
C phiSurfY or geopotentiel (atmos) in X and Y direction |
128 |
C KappaRT, - Total diffusion in vertical for T and S. |
C KappaRT, - Total diffusion in vertical for T and S. |
129 |
C KappaRS (background + spatially varying, isopycnal term). |
C KappaRS (background + spatially varying, isopycnal term). |
130 |
|
C useVariableK = T when vertical diffusion is not constant |
131 |
C iMin, iMax - Ranges and sub-block indices on which calculations |
C iMin, iMax - Ranges and sub-block indices on which calculations |
132 |
C jMin, jMax are applied. |
C jMin, jMax are applied. |
133 |
C bi, bj |
C bi, bj |
154 |
_RL sigmaR (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
_RL sigmaR (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
155 |
C This is currently used by IVDC and Diagnostics |
C This is currently used by IVDC and Diagnostics |
156 |
_RL ConvectCount (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
_RL ConvectCount (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
157 |
|
LOGICAL useVariableK |
158 |
INTEGER iMin, iMax |
INTEGER iMin, iMax |
159 |
INTEGER jMin, jMax |
INTEGER jMin, jMax |
160 |
INTEGER bi, bj |
INTEGER bi, bj |
505 |
ENDIF |
ENDIF |
506 |
#endif /* ALLOW_AIM */ |
#endif /* ALLOW_AIM */ |
507 |
|
|
|
#ifdef ALLOW_TIMEAVE |
|
|
IF (taveFreq.GT.0. .AND. ivdc_kappa.NE.0.) THEN |
|
|
CALL TIMEAVE_CUMULATE(ConvectCountTave, ConvectCount, Nr, |
|
|
I deltaTclock, bi, bj, myThid) |
|
|
ENDIF |
|
|
#endif /* ALLOW_TIMEAVE */ |
|
|
|
|
508 |
#ifndef DISABLE_MULTIDIM_ADVECTION |
#ifndef DISABLE_MULTIDIM_ADVECTION |
509 |
C-- Some advection schemes are better calculated using a multi-dimensional |
C-- Some advection schemes are better calculated using a multi-dimensional |
510 |
C method in the absence of any other terms and, if used, is done here. |
C method in the absence of any other terms and, if used, is done here. |
746 |
C-- End If implicitDiffusion |
C-- End If implicitDiffusion |
747 |
ENDIF |
ENDIF |
748 |
|
|
749 |
|
#ifdef ALLOW_TIMEAVE |
750 |
|
IF (taveFreq.GT.0. .AND. ivdc_kappa.NE.0.) THEN |
751 |
|
CALL TIMEAVE_CUMUL_1T(ConvectCountTave, ConvectCount, |
752 |
|
I Nr, deltaTclock, bi, bj, myThid) |
753 |
|
ENDIF |
754 |
|
useVariableK = useKPP .OR. useGMredi .OR. ivdc_kappa.NE.0. |
755 |
|
IF (taveFreq.GT.0. .AND. useVariableK ) THEN |
756 |
|
IF (implicitDiffusion) THEN |
757 |
|
CALL TIMEAVE_CUMUL_DIF_1T(TdiffRtave, gT, kappaRT, |
758 |
|
I Nr, 3, deltaTclock, bi, bj, myThid) |
759 |
|
ELSE |
760 |
|
CALL TIMEAVE_CUMUL_DIF_1T(TdiffRtave, theta, kappaRT, |
761 |
|
I Nr, 3, deltaTclock, bi, bj, myThid) |
762 |
|
ENDIF |
763 |
|
ENDIF |
764 |
|
#endif /* ALLOW_TIMEAVE */ |
765 |
|
|
766 |
#endif /* SINGLE_LAYER_MODE */ |
#endif /* SINGLE_LAYER_MODE */ |
767 |
|
|
768 |
Ccs- |
C-- end bi,bj loops. |
769 |
ENDDO |
ENDDO |
770 |
ENDDO |
ENDDO |
771 |
|
|
|
#ifdef ALLOW_AIM |
|
|
c IF ( useAIM ) THEN |
|
|
c CALL AIM_AIM2DYN_EXCHANGES( myTime, myThid ) |
|
|
c ENDIF |
|
|
#endif /* ALLOW_AIM */ |
|
|
c IF ( staggerTimeStep ) THEN |
|
|
c IF ( useAIM .OR. useCubedSphereExchange ) THEN |
|
|
c IF (tempStepping) _EXCH_XYZ_R8(gT,myThid) |
|
|
c IF (saltStepping) _EXCH_XYZ_R8(gS,myThid) |
|
|
c ELSEIF ( useGMRedi .AND. Oly.LT.4 ) THEN |
|
|
cc .AND. GM_AdvForm .AND. .NOT.GM_AdvSeparate ) THEN |
|
|
c IF (tempMultiDimAdvec) _EXCH_XYZ_R8(gT,myThid) |
|
|
c IF (saltMultiDimAdvec) _EXCH_XYZ_R8(gS,myThid) |
|
|
c ENDIF |
|
|
c ENDIF |
|
|
|
|
772 |
#ifndef DISABLE_DEBUGMODE |
#ifndef DISABLE_DEBUGMODE |
773 |
If (debugMode) THEN |
If (debugMode) THEN |
774 |
CALL DEBUG_STATS_RL(Nr,uVel,'Uvel (THERMODYNAMICS)',myThid) |
CALL DEBUG_STATS_RL(Nr,uVel,'Uvel (THERMODYNAMICS)',myThid) |