11 |
# ifdef ALLOW_KPP |
# ifdef ALLOW_KPP |
12 |
# include "KPP_OPTIONS.h" |
# include "KPP_OPTIONS.h" |
13 |
# endif |
# endif |
14 |
|
# ifdef ALLOW_SEAICE |
15 |
|
# include "SEAICE_OPTIONS.h" |
16 |
|
# endif |
17 |
#endif /* ALLOW_AUTODIFF_TAMC */ |
#endif /* ALLOW_AUTODIFF_TAMC */ |
18 |
|
|
19 |
CBOP |
CBOP |
22 |
SUBROUTINE DO_OCEANIC_PHYS(myTime, myIter, myThid) |
SUBROUTINE DO_OCEANIC_PHYS(myTime, myIter, myThid) |
23 |
C !DESCRIPTION: \bv |
C !DESCRIPTION: \bv |
24 |
C *==========================================================* |
C *==========================================================* |
25 |
C | SUBROUTINE DO_OCEANIC_PHYS |
C | SUBROUTINE DO_OCEANIC_PHYS |
26 |
C | o Controlling routine for oceanic physics and |
C | o Controlling routine for oceanic physics and |
27 |
C | parameterization |
C | parameterization |
28 |
C *==========================================================* |
C *==========================================================* |
29 |
C | o originally, part of S/R thermodynamics |
C | o originally, part of S/R thermodynamics |
62 |
# ifdef EXACT_CONSERV |
# ifdef EXACT_CONSERV |
63 |
# include "SURFACE.h" |
# include "SURFACE.h" |
64 |
# endif |
# endif |
65 |
|
# ifdef ALLOW_EXF |
66 |
|
# include "ctrl.h" |
67 |
|
# include "EXF_FIELDS.h" |
68 |
|
# ifdef ALLOW_BULKFORMULAE |
69 |
|
# include "EXF_CONSTANTS.h" |
70 |
|
# endif |
71 |
|
# endif |
72 |
|
# ifdef ALLOW_SEAICE |
73 |
|
# include "SEAICE.h" |
74 |
|
# endif |
75 |
#endif /* ALLOW_AUTODIFF_TAMC */ |
#endif /* ALLOW_AUTODIFF_TAMC */ |
76 |
|
|
77 |
C !INPUT/OUTPUT PARAMETERS: |
C !INPUT/OUTPUT PARAMETERS: |
90 |
C jMin, jMax are applied. |
C jMin, jMax are applied. |
91 |
C bi, bj :: tile indices |
C bi, bj :: tile indices |
92 |
C i,j,k :: loop indices |
C i,j,k :: loop indices |
93 |
|
_RL rhokp1 (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
94 |
_RL rhokm1 (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RL rhokm1 (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
95 |
_RL rhok (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RL rhok (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
96 |
_RL sigmaX (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
_RL sigmaX (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
114 |
#endif /* ALLOW_AUTODIFF_TAMC */ |
#endif /* ALLOW_AUTODIFF_TAMC */ |
115 |
|
|
116 |
#ifdef ALLOW_DEBUG |
#ifdef ALLOW_DEBUG |
117 |
IF ( debugLevel .GE. debLevB ) |
IF ( debugLevel .GE. debLevB ) |
118 |
& CALL DEBUG_ENTER('DO_OCEANIC_PHYS',myThid) |
& CALL DEBUG_ENTER('DO_OCEANIC_PHYS',myThid) |
119 |
#endif |
#endif |
120 |
|
|
121 |
doDiagsRho = 0 |
doDiagsRho = 0 |
122 |
#ifdef ALLOW_DIAGNOSTICS |
#ifdef ALLOW_DIAGNOSTICS |
123 |
IF ( useDiagnostics .AND. fluidIsWater ) THEN |
IF ( useDiagnostics .AND. fluidIsWater ) THEN |
130 |
ENDIF |
ENDIF |
131 |
#endif /* ALLOW_DIAGNOSTICS */ |
#endif /* ALLOW_DIAGNOSTICS */ |
132 |
|
|
133 |
#ifdef ALLOW_THSICE |
#ifdef ALLOW_SEAICE |
134 |
|
C-- Call sea ice model to compute forcing/external data fields. In |
135 |
|
C addition to computing prognostic sea-ice variables and diagnosing the |
136 |
|
C forcing/external data fields that drive the ocean model, SEAICE_MODEL |
137 |
|
C also sets theta to the freezing point under sea-ice. The implied |
138 |
|
C surface heat flux is then stored in variable surfaceTendencyTice, |
139 |
|
C which is needed by KPP package (kpp_calc.F and kpp_transport_t.F) |
140 |
|
C to diagnose surface buoyancy fluxes and for the non-local transport |
141 |
|
C term. Because this call precedes model thermodynamics, temperature |
142 |
|
C under sea-ice may not be "exactly" at the freezing point by the time |
143 |
|
C theta is dumped or time-averaged. |
144 |
|
IF ( useSEAICE ) THEN |
145 |
|
#ifdef ALLOW_AUTODIFF_TAMC |
146 |
|
CADJ STORE atemp,aqh,precip = comlev1, key = ikey_dynamics |
147 |
|
CADJ STORE swdown,lwdown = comlev1, key = ikey_dynamics |
148 |
|
CADJ STORE theta = comlev1, key = ikey_dynamics |
149 |
|
cph# ifdef EXF_READ_EVAP |
150 |
|
CADJ STORE evap = comlev1, key = ikey_dynamics |
151 |
|
cph# endif |
152 |
|
cph# ifdef SEAICE_ALLOW_DYNAMICS |
153 |
|
CADJ STORE uvel,vvel = comlev1, key = ikey_dynamics |
154 |
|
cph# endif |
155 |
|
# ifdef SEAICE_CGRID |
156 |
|
CADJ STORE fu, fv = comlev1, key = ikey_dynamics |
157 |
|
CADJ STORE seaicemasku = comlev1, key = ikey_dynamics |
158 |
|
CADJ STORE seaicemaskv = comlev1, key = ikey_dynamics |
159 |
|
# ifdef ATMOSPHERIC_LOADING |
160 |
|
CADJ STORE siceload = comlev1, key = ikey_dynamics |
161 |
|
# endif |
162 |
|
# endif |
163 |
|
#endif |
164 |
|
#ifdef ALLOW_DEBUG |
165 |
|
IF ( debugLevel .GE. debLevB ) |
166 |
|
& CALL DEBUG_CALL('SEAICE_MODEL',myThid) |
167 |
|
#endif |
168 |
|
CALL TIMER_START('SEAICE_MODEL [DO_OCEANIC_PHYS]', myThid) |
169 |
|
CALL SEAICE_MODEL( myTime, myIter, myThid ) |
170 |
|
CALL TIMER_STOP ('SEAICE_MODEL [DO_OCEANIC_PHYS]', myThid) |
171 |
|
#ifdef ALLOW_COST_ICE |
172 |
|
CALL COST_ICE_TEST ( myTime, myIter, myThid ) |
173 |
|
#endif |
174 |
|
ENDIF |
175 |
|
#endif /* ALLOW_SEAICE */ |
176 |
|
|
177 |
|
#if (defined ALLOW_THSICE) && !(defined ALLOW_ATM2D) |
178 |
IF ( useThSIce .AND. fluidIsWater ) THEN |
IF ( useThSIce .AND. fluidIsWater ) THEN |
179 |
#ifdef ALLOW_DEBUG |
#ifdef ALLOW_DEBUG |
180 |
IF ( debugLevel .GE. debLevB ) |
IF ( debugLevel .GE. debLevB ) |
214 |
CALL FREEZE_SURFACE( myTime, myIter, myThid ) |
CALL FREEZE_SURFACE( myTime, myIter, myThid ) |
215 |
ENDIF |
ENDIF |
216 |
|
|
217 |
#ifdef COMPONENT_MODULE |
#ifdef ALLOW_OCN_COMPON_INTERF |
|
# ifndef ALLOW_AIM |
|
218 |
C-- Apply imported data (from coupled interface) to forcing fields |
C-- Apply imported data (from coupled interface) to forcing fields |
219 |
C jmc: do not know precisely where to put this call (bf or af thSIce ?) |
C jmc: do not know precisely where to put this call (bf or af thSIce ?) |
220 |
IF ( useCoupler ) THEN |
IF ( useCoupler ) THEN |
221 |
CALL OCN_APPLY_IMPORT( .TRUE., myTime, myIter, myThid ) |
CALL OCN_APPLY_IMPORT( .TRUE., myTime, myIter, myThid ) |
222 |
ENDIF |
ENDIF |
223 |
# endif |
#endif /* ALLOW_OCN_COMPON_INTERF */ |
224 |
#endif /* COMPONENT_MODULE */ |
|
225 |
|
#ifdef ALLOW_BALANCE_FLUXES |
226 |
|
C balance fluxes |
227 |
|
IF ( balanceEmPmR ) |
228 |
|
& CALL REMOVE_MEAN_RS( 1, EmPmR, maskH, maskH, rA, drF, |
229 |
|
& 'EmPmR', myTime, myThid ) |
230 |
|
IF ( balanceQnet ) |
231 |
|
& CALL REMOVE_MEAN_RS( 1, Qnet, maskH, maskH, rA, drF, |
232 |
|
& 'Qnet ', myTime, myThid ) |
233 |
|
#endif /* ALLOW_BALANCE_FLUXES */ |
234 |
|
|
235 |
#ifdef ALLOW_AUTODIFF_TAMC |
#ifdef ALLOW_AUTODIFF_TAMC |
236 |
C-- HPF directive to help TAMC |
C-- HPF directive to help TAMC |
254 |
itdkey = (act1 + 1) + act2*max1 |
itdkey = (act1 + 1) + act2*max1 |
255 |
& + act3*max1*max2 |
& + act3*max1*max2 |
256 |
& + act4*max1*max2*max3 |
& + act4*max1*max2*max3 |
257 |
|
#else /* ALLOW_AUTODIFF_TAMC */ |
258 |
|
C if fluid is not water, by-pass find_rho, gmredi, surfaceForcing |
259 |
|
C and all vertical mixing schemes, but keep OBCS_CALC |
260 |
|
IF ( fluidIsWater ) THEN |
261 |
#endif /* ALLOW_AUTODIFF_TAMC */ |
#endif /* ALLOW_AUTODIFF_TAMC */ |
262 |
|
|
263 |
C-- Set up work arrays with valid (i.e. not NaN) values |
C-- Set up work arrays with valid (i.e. not NaN) values |
270 |
DO i=1-OLx,sNx+OLx |
DO i=1-OLx,sNx+OLx |
271 |
rhok (i,j) = 0. _d 0 |
rhok (i,j) = 0. _d 0 |
272 |
rhoKM1 (i,j) = 0. _d 0 |
rhoKM1 (i,j) = 0. _d 0 |
273 |
|
rhoKP1 (i,j) = 0. _d 0 |
274 |
ENDDO |
ENDDO |
275 |
ENDDO |
ENDDO |
276 |
|
|
305 |
VisbeckK(i,j,bi,bj) = 0. _d 0 |
VisbeckK(i,j,bi,bj) = 0. _d 0 |
306 |
# endif |
# endif |
307 |
# endif /* ALLOW_GMREDI */ |
# endif /* ALLOW_GMREDI */ |
308 |
|
# ifdef ALLOW_KPP |
309 |
|
KPPdiffKzS(i,j,k,bi,bj) = 0. _d 0 |
310 |
|
KPPdiffKzT(i,j,k,bi,bj) = 0. _d 0 |
311 |
|
# endif /* ALLOW_KPP */ |
312 |
#endif /* ALLOW_AUTODIFF_TAMC */ |
#endif /* ALLOW_AUTODIFF_TAMC */ |
313 |
ENDDO |
ENDDO |
314 |
ENDDO |
ENDDO |
331 |
#endif /* ALLOW_AUTODIFF_TAMC */ |
#endif /* ALLOW_AUTODIFF_TAMC */ |
332 |
|
|
333 |
#ifdef ALLOW_DEBUG |
#ifdef ALLOW_DEBUG |
334 |
IF ( debugLevel .GE. debLevB ) |
IF ( debugLevel .GE. debLevB ) |
335 |
& CALL DEBUG_MSG('ENTERING UPWARD K LOOP',myThid) |
& CALL DEBUG_MSG('ENTERING UPWARD K LOOP',myThid) |
336 |
#endif |
#endif |
337 |
|
|
348 |
|
|
349 |
C-- Calculate gradients of potential density for isoneutral |
C-- Calculate gradients of potential density for isoneutral |
350 |
C slope terms (e.g. GM/Redi tensor or IVDC diffusivity) |
C slope terms (e.g. GM/Redi tensor or IVDC diffusivity) |
|
c IF ( k.GT.1 .AND. (useGMRedi.OR.ivdc_kappa.NE.0.) ) THEN |
|
351 |
IF ( useGMRedi .OR. (k.GT.1 .AND. ivdc_kappa.NE.0.) |
IF ( useGMRedi .OR. (k.GT.1 .AND. ivdc_kappa.NE.0.) |
352 |
& .OR. doDiagsRho.GE.1 ) THEN |
& .OR. doDiagsRho.GE.1 ) THEN |
353 |
#ifdef ALLOW_DEBUG |
#ifdef ALLOW_DEBUG |
354 |
IF ( debugLevel .GE. debLevB ) |
IF ( debugLevel .GE. debLevB ) |
355 |
& CALL DEBUG_CALL('FIND_RHO',myThid) |
& CALL DEBUG_CALL('FIND_RHO',myThid) |
356 |
#endif |
#endif |
357 |
#ifdef ALLOW_AUTODIFF_TAMC |
#ifdef ALLOW_AUTODIFF_TAMC |
376 |
I myThid ) |
I myThid ) |
377 |
ENDIF |
ENDIF |
378 |
#ifdef ALLOW_DEBUG |
#ifdef ALLOW_DEBUG |
379 |
IF ( debugLevel .GE. debLevB ) |
IF ( debugLevel .GE. debLevB ) |
380 |
& CALL DEBUG_CALL('GRAD_SIGMA',myThid) |
& CALL DEBUG_CALL('GRAD_SIGMA',myThid) |
381 |
#endif |
#endif |
382 |
|
cph Avoid variable aliasing for adjoint !!! |
383 |
|
DO j=jMin,jMax |
384 |
|
DO i=iMin,iMax |
385 |
|
rhoKP1(i,j) = rhoK(i,j) |
386 |
|
ENDDO |
387 |
|
ENDDO |
388 |
CALL GRAD_SIGMA( |
CALL GRAD_SIGMA( |
389 |
I bi, bj, iMin, iMax, jMin, jMax, k, |
I bi, bj, iMin, iMax, jMin, jMax, k, |
390 |
I rhoK, rhoKm1, rhoK, |
I rhoK, rhoKm1, rhoKp1, |
391 |
O sigmaX, sigmaY, sigmaR, |
O sigmaX, sigmaY, sigmaR, |
392 |
I myThid ) |
I myThid ) |
393 |
ENDIF |
ENDIF |
402 |
c ==> should use sigmaR !!! |
c ==> should use sigmaR !!! |
403 |
IF (k.GT.1 .AND. ivdc_kappa.NE.0.) THEN |
IF (k.GT.1 .AND. ivdc_kappa.NE.0.) THEN |
404 |
#ifdef ALLOW_DEBUG |
#ifdef ALLOW_DEBUG |
405 |
IF ( debugLevel .GE. debLevB ) |
IF ( debugLevel .GE. debLevB ) |
406 |
& CALL DEBUG_CALL('CALC_IVDC',myThid) |
& CALL DEBUG_CALL('CALC_IVDC',myThid) |
407 |
#endif |
#endif |
408 |
CALL CALC_IVDC( |
CALL CALC_IVDC( |
423 |
ENDDO |
ENDDO |
424 |
|
|
425 |
#ifdef ALLOW_DIAGNOSTICS |
#ifdef ALLOW_DIAGNOSTICS |
|
c IF ( useDiagnostics .AND. |
|
|
c & (useGMRedi .OR. ivdc_kappa.NE.0.) ) THEN |
|
426 |
IF ( doDiagsRho.GE.1 ) THEN |
IF ( doDiagsRho.GE.1 ) THEN |
427 |
CALL DIAGNOSTICS_FILL (sigmaR, 'DRHODR ', 0, Nr, |
CALL DIAGNOSTICS_FILL (sigmaR, 'DRHODR ', 0, Nr, |
428 |
& 2, bi, bj, myThid) |
& 2, bi, bj, myThid) |
429 |
ENDIF |
ENDIF |
430 |
#endif |
#endif |
431 |
|
|
|
#ifdef ALLOW_OBCS |
|
|
C-- Calculate future values on open boundaries |
|
|
IF (useOBCS) THEN |
|
|
#ifdef ALLOW_DEBUG |
|
|
IF ( debugLevel .GE. debLevB ) |
|
|
& CALL DEBUG_CALL('OBCS_CALC',myThid) |
|
|
#endif |
|
|
CALL OBCS_CALC( bi, bj, myTime+deltaTclock, myIter+1, |
|
|
I uVel, vVel, wVel, theta, salt, |
|
|
I myThid ) |
|
|
ENDIF |
|
|
#endif /* ALLOW_OBCS */ |
|
|
|
|
|
#ifndef ALLOW_AUTODIFF_TAMC |
|
|
IF ( fluidIsWater ) THEN |
|
|
#endif |
|
432 |
C-- Determines forcing terms based on external fields |
C-- Determines forcing terms based on external fields |
433 |
C relaxation terms, etc. |
C relaxation terms, etc. |
434 |
#ifdef ALLOW_DEBUG |
#ifdef ALLOW_DEBUG |
435 |
IF ( debugLevel .GE. debLevB ) |
IF ( debugLevel .GE. debLevB ) |
436 |
& CALL DEBUG_CALL('EXTERNAL_FORCING_SURF',myThid) |
& CALL DEBUG_CALL('EXTERNAL_FORCING_SURF',myThid) |
437 |
#endif |
#endif |
438 |
#ifdef ALLOW_AUTODIFF_TAMC |
#ifdef ALLOW_AUTODIFF_TAMC |
439 |
CADJ STORE EmPmR(:,:,bi,bj) |
CADJ STORE EmPmR(:,:,bi,bj) |
440 |
CADJ & = comlev1_bibj, key=itdkey, byte=isbyte |
CADJ & = comlev1_bibj, key=itdkey, byte=isbyte |
441 |
|
# ifdef EXACT_CONSERV |
442 |
CADJ STORE PmEpR(:,:,bi,bj) |
CADJ STORE PmEpR(:,:,bi,bj) |
443 |
CADJ & = comlev1_bibj, key=itdkey, byte=isbyte |
CADJ & = comlev1_bibj, key=itdkey, byte=isbyte |
444 |
|
# endif |
445 |
|
# ifdef NONLIN_FRSURF |
446 |
|
CADJ STORE hFac_surfC(:,:,bi,bj) |
447 |
|
CADJ & = comlev1_bibj, key=itdkey, byte=isbyte |
448 |
|
CADJ STORE recip_hFacC(:,:,:,bi,bj) |
449 |
|
CADJ & = comlev1_bibj, key=itdkey, byte=isbyte |
450 |
|
# endif |
451 |
#endif |
#endif |
452 |
CALL EXTERNAL_FORCING_SURF( |
CALL EXTERNAL_FORCING_SURF( |
453 |
I bi, bj, iMin, iMax, jMin, jMax, |
I bi, bj, iMin, iMax, jMin, jMax, |
454 |
I myTime, myIter, myThid ) |
I myTime, myIter, myThid ) |
455 |
#ifndef ALLOW_AUTODIFF_TAMC |
#ifdef ALLOW_AUTODIFF_TAMC |
456 |
ENDIF |
# ifdef EXACT_CONSERV |
457 |
|
cph-test |
458 |
|
cphCADJ STORE PmEpR(:,:,bi,bj) |
459 |
|
cphCADJ & = comlev1_bibj, key=itdkey, byte=isbyte |
460 |
|
# endif |
461 |
#endif |
#endif |
462 |
|
|
463 |
#ifdef ALLOW_AUTODIFF_TAMC |
#ifdef ALLOW_AUTODIFF_TAMC |
491 |
C-- Calculate iso-neutral slopes for the GM/Redi parameterisation |
C-- Calculate iso-neutral slopes for the GM/Redi parameterisation |
492 |
IF (useGMRedi) THEN |
IF (useGMRedi) THEN |
493 |
#ifdef ALLOW_DEBUG |
#ifdef ALLOW_DEBUG |
494 |
IF ( debugLevel .GE. debLevB ) |
IF ( debugLevel .GE. debLevB ) |
495 |
& CALL DEBUG_CALL('GMREDI_CALC_TENSOR',myThid) |
& CALL DEBUG_CALL('GMREDI_CALC_TENSOR',myThid) |
496 |
#endif |
#endif |
497 |
CALL GMREDI_CALC_TENSOR( |
CALL GMREDI_CALC_TENSOR( |
513 |
C-- Compute KPP mixing coefficients |
C-- Compute KPP mixing coefficients |
514 |
IF (useKPP) THEN |
IF (useKPP) THEN |
515 |
#ifdef ALLOW_DEBUG |
#ifdef ALLOW_DEBUG |
516 |
IF ( debugLevel .GE. debLevB ) |
IF ( debugLevel .GE. debLevB ) |
517 |
& CALL DEBUG_CALL('KPP_CALC',myThid) |
& CALL DEBUG_CALL('KPP_CALC',myThid) |
518 |
#endif |
#endif |
519 |
CALL KPP_CALC( |
CALL KPP_CALC( |
531 |
C-- Compute PP81 mixing coefficients |
C-- Compute PP81 mixing coefficients |
532 |
IF (usePP81) THEN |
IF (usePP81) THEN |
533 |
#ifdef ALLOW_DEBUG |
#ifdef ALLOW_DEBUG |
534 |
IF ( debugLevel .GE. debLevB ) |
IF ( debugLevel .GE. debLevB ) |
535 |
& CALL DEBUG_CALL('PP81_CALC',myThid) |
& CALL DEBUG_CALL('PP81_CALC',myThid) |
536 |
#endif |
#endif |
537 |
CALL PP81_CALC( |
CALL PP81_CALC( |
543 |
C-- Compute MY82 mixing coefficients |
C-- Compute MY82 mixing coefficients |
544 |
IF (useMY82) THEN |
IF (useMY82) THEN |
545 |
#ifdef ALLOW_DEBUG |
#ifdef ALLOW_DEBUG |
546 |
IF ( debugLevel .GE. debLevB ) |
IF ( debugLevel .GE. debLevB ) |
547 |
& CALL DEBUG_CALL('MY82_CALC',myThid) |
& CALL DEBUG_CALL('MY82_CALC',myThid) |
548 |
#endif |
#endif |
549 |
CALL MY82_CALC( |
CALL MY82_CALC( |
555 |
C-- Compute GGL90 mixing coefficients |
C-- Compute GGL90 mixing coefficients |
556 |
IF (useGGL90) THEN |
IF (useGGL90) THEN |
557 |
#ifdef ALLOW_DEBUG |
#ifdef ALLOW_DEBUG |
558 |
IF ( debugLevel .GE. debLevB ) |
IF ( debugLevel .GE. debLevB ) |
559 |
& CALL DEBUG_CALL('GGL90_CALC',myThid) |
& CALL DEBUG_CALL('GGL90_CALC',myThid) |
560 |
#endif |
#endif |
561 |
CALL GGL90_CALC( |
CALL GGL90_CALC( |
564 |
#endif /* ALLOW_GGL90 */ |
#endif /* ALLOW_GGL90 */ |
565 |
|
|
566 |
#ifdef ALLOW_TIMEAVE |
#ifdef ALLOW_TIMEAVE |
567 |
IF ( taveFreq.GT. 0. _d 0 .AND. fluidIsWater ) THEN |
IF ( taveFreq.GT. 0. _d 0 ) THEN |
568 |
CALL TIMEAVE_SURF_FLUX( bi, bj, myTime, myIter, myThid) |
CALL TIMEAVE_SURF_FLUX( bi, bj, myTime, myIter, myThid) |
569 |
ENDIF |
ENDIF |
570 |
IF (taveFreq.GT.0. .AND. ivdc_kappa.NE.0.) THEN |
IF (taveFreq.GT.0. .AND. ivdc_kappa.NE.0.) THEN |
573 |
ENDIF |
ENDIF |
574 |
#endif /* ALLOW_TIMEAVE */ |
#endif /* ALLOW_TIMEAVE */ |
575 |
|
|
576 |
|
#ifndef ALLOW_AUTODIFF_TAMC |
577 |
|
C--- if fluid Is Water: end |
578 |
|
ENDIF |
579 |
|
#endif |
580 |
|
|
581 |
|
#ifdef ALLOW_OBCS |
582 |
|
C-- Calculate future values on open boundaries |
583 |
|
IF (useOBCS) THEN |
584 |
|
#ifdef ALLOW_DEBUG |
585 |
|
IF ( debugLevel .GE. debLevB ) |
586 |
|
& CALL DEBUG_CALL('OBCS_CALC',myThid) |
587 |
|
#endif |
588 |
|
CALL OBCS_CALC( bi, bj, myTime+deltaTclock, myIter+1, |
589 |
|
I uVel, vVel, wVel, theta, salt, |
590 |
|
I myThid ) |
591 |
|
ENDIF |
592 |
|
#endif /* ALLOW_OBCS */ |
593 |
|
|
594 |
C-- end bi,bj loops. |
C-- end bi,bj loops. |
595 |
ENDDO |
ENDDO |
596 |
ENDDO |
ENDDO |
597 |
|
|
|
#ifdef ALLOW_BALANCE_FLUXES |
|
|
C balance fluxes |
|
|
if ( balanceEmPmR ) |
|
|
& CALL REMOVE_MEAN_RS( 1, EmPmR, maskH, maskH, rA, drF, |
|
|
& 'EmPmR', myTime, myThid ) |
|
|
if ( balanceQnet ) |
|
|
& CALL REMOVE_MEAN_RS( 1, Qnet, maskH, maskH, rA, drF, |
|
|
& 'Qnet ', myTime, myThid ) |
|
|
#endif /* ALLOW_BALANCE_FLUXES */ |
|
|
|
|
598 |
#ifdef ALLOW_DIAGNOSTICS |
#ifdef ALLOW_DIAGNOSTICS |
599 |
IF ( fluidIsWater .AND. useDiagnostics ) THEN |
IF ( fluidIsWater .AND. useDiagnostics ) THEN |
600 |
CALL DIAGS_OCEANIC_SURF_FLUX( myTime, myIter, myThid ) |
CALL DIAGS_OCEANIC_SURF_FLUX( myTime, myIter, myThid ) |
606 |
#endif |
#endif |
607 |
|
|
608 |
#ifdef ALLOW_DEBUG |
#ifdef ALLOW_DEBUG |
609 |
IF ( debugLevel .GE. debLevB ) |
IF ( debugLevel .GE. debLevB ) |
610 |
& CALL DEBUG_LEAVE('DO_OCEANIC_PHYS',myThid) |
& CALL DEBUG_LEAVE('DO_OCEANIC_PHYS',myThid) |
611 |
#endif |
#endif |
612 |
|
|
613 |
RETURN |
RETURN |