3 |
|
|
4 |
#include "PACKAGES_CONFIG.h" |
#include "PACKAGES_CONFIG.h" |
5 |
#include "CPP_OPTIONS.h" |
#include "CPP_OPTIONS.h" |
6 |
|
#undef DYNAMICS_GUGV_EXCH_CHECK |
7 |
|
|
8 |
CBOP |
CBOP |
9 |
C !ROUTINE: DYNAMICS |
C !ROUTINE: DYNAMICS |
31 |
C | with the free-surface evolution or the rigid-lid: |
C | with the free-surface evolution or the rigid-lid: |
32 |
C | U[n] = U* + dt x d/dx P |
C | U[n] = U* + dt x d/dx P |
33 |
C | V[n] = V* + dt x d/dy P |
C | V[n] = V* + dt x d/dy P |
34 |
|
C | W[n] = W* + dt x d/dz P (NH mode) |
35 |
C | |
C | |
36 |
C | "Calculation of Gs" |
C | "Calculation of Gs" |
37 |
C | =================== |
C | =================== |
92 |
C !CALLING SEQUENCE: |
C !CALLING SEQUENCE: |
93 |
C DYNAMICS() |
C DYNAMICS() |
94 |
C | |
C | |
95 |
|
C |-- CALC_EP_FORCING |
96 |
|
C | |
97 |
C |-- CALC_GRAD_PHI_SURF |
C |-- CALC_GRAD_PHI_SURF |
98 |
C | |
C | |
99 |
C |-- CALC_VISCOSITY |
C |-- CALC_VISCOSITY |
108 |
C | |
C | |
109 |
C |-- OBCS_APPLY_UV |
C |-- OBCS_APPLY_UV |
110 |
C | |
C | |
111 |
|
C |-- MOM_U_IMPLICIT_R |
112 |
|
C |-- MOM_V_IMPLICIT_R |
113 |
|
C | |
114 |
C |-- IMPLDIFF |
C |-- IMPLDIFF |
115 |
C | |
C | |
116 |
C |-- OBCS_APPLY_UV |
C |-- OBCS_APPLY_UV |
117 |
C | |
C | |
118 |
C |-- CALL DEBUG_STATS_RL |
C |-- CALC_GW |
119 |
|
C | |
120 |
|
C |-- DIAGNOSTICS_FILL |
121 |
|
C |-- DEBUG_STATS_RL |
122 |
|
|
123 |
C !INPUT/OUTPUT PARAMETERS: |
C !INPUT/OUTPUT PARAMETERS: |
124 |
C == Routine arguments == |
C == Routine arguments == |
220 |
C--- |
C--- |
221 |
CEOP |
CEOP |
222 |
|
|
223 |
|
#ifdef ALLOW_DEBUG |
224 |
|
IF ( debugLevel .GE. debLevB ) |
225 |
|
& CALL DEBUG_ENTER( 'DYNAMICS', myThid ) |
226 |
|
#endif |
227 |
|
|
228 |
C-- Call to routine for calculation of |
C-- Call to routine for calculation of |
229 |
C Eliassen-Palm-flux-forced U-tendency, |
C Eliassen-Palm-flux-forced U-tendency, |
230 |
C if desired: |
C if desired: |
277 |
cph( |
cph( |
278 |
c-- need some re-initialisation here to break dependencies |
c-- need some re-initialisation here to break dependencies |
279 |
cph) |
cph) |
280 |
gu(i,j,k,bi,bj) = 0. _d 0 |
gU(i,j,k,bi,bj) = 0. _d 0 |
281 |
gv(i,j,k,bi,bj) = 0. _d 0 |
gV(i,j,k,bi,bj) = 0. _d 0 |
282 |
#endif |
#endif |
283 |
ENDDO |
ENDDO |
284 |
ENDDO |
ENDDO |
434 |
#endif /* ALLOW_AUTODIFF_TAMC */ |
#endif /* ALLOW_AUTODIFF_TAMC */ |
435 |
CALL IMPLDIFF( |
CALL IMPLDIFF( |
436 |
I bi, bj, iMin, iMax, jMin, jMax, |
I bi, bj, iMin, iMax, jMin, jMax, |
437 |
I 0, KappaRU,recip_HFacW, |
I -1, KappaRU,recip_HFacW, |
438 |
U gU, |
U gU, |
439 |
I myThid ) |
I myThid ) |
440 |
#ifdef ALLOW_AUTODIFF_TAMC |
#ifdef ALLOW_AUTODIFF_TAMC |
443 |
#endif /* ALLOW_AUTODIFF_TAMC */ |
#endif /* ALLOW_AUTODIFF_TAMC */ |
444 |
CALL IMPLDIFF( |
CALL IMPLDIFF( |
445 |
I bi, bj, iMin, iMax, jMin, jMax, |
I bi, bj, iMin, iMax, jMin, jMax, |
446 |
I 0, KappaRV,recip_HFacS, |
I -2, KappaRV,recip_HFacS, |
447 |
U gV, |
U gV, |
448 |
I myThid ) |
I myThid ) |
449 |
ENDIF |
ENDIF |
490 |
|
|
491 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
492 |
|
|
493 |
|
#ifdef ALLOW_NONHYDROSTATIC |
494 |
|
C-- Step forward W field in N-H algorithm |
495 |
|
IF ( momStepping .AND. nonHydrostatic ) THEN |
496 |
|
#ifdef ALLOW_DEBUG |
497 |
|
IF ( debugLevel .GE. debLevB ) |
498 |
|
& CALL DEBUG_CALL('CALC_GW', myThid ) |
499 |
|
#endif |
500 |
|
CALL TIMER_START('CALC_GW [DYNAMICS]',myThid) |
501 |
|
CALL CALC_GW( myTime, myIter, myThid ) |
502 |
|
CALL TIMER_STOP ('CALC_GW [DYNAMICS]',myThid) |
503 |
|
ENDIF |
504 |
|
#endif |
505 |
|
|
506 |
|
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
507 |
|
|
508 |
Cml( |
Cml( |
509 |
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 |
510 |
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 |
550 |
ENDIF |
ENDIF |
551 |
#endif |
#endif |
552 |
|
|
553 |
|
#ifdef DYNAMICS_GUGV_EXCH_CHECK |
554 |
|
C- jmc: For safety checking only: This Exchange here should not change |
555 |
|
C the solution. If solution changes, it means something is wrong, |
556 |
|
C but it does not mean that it is less wrong with this exchange. |
557 |
|
IF ( debugLevel .GT. debLevB ) THEN |
558 |
|
CALL EXCH_UV_XYZ_RL(gU,gV,.TRUE.,myThid) |
559 |
|
ENDIF |
560 |
|
#endif |
561 |
|
|
562 |
|
#ifdef ALLOW_DEBUG |
563 |
|
IF ( debugLevel .GE. debLevB ) |
564 |
|
& CALL DEBUG_LEAVE( 'DYNAMICS', myThid ) |
565 |
|
#endif |
566 |
|
|
567 |
RETURN |
RETURN |
568 |
END |
END |