integrate_3d - calls to do 3D model integration


    subroutine integrate_3d(runtype,n)
    use getm_timers, only: tic, toc, TIM_INTEGR3D
    use getm_timers, only: TIM_TEMPH, TIM_SALTH
    integer, intent(in)                 :: runtype,n


This is a wrapper routine to call all 3D related subroutines. The call position for the coordinates routine depends on the compiler option MUDFLAT: If it is defined, then the call to coordinates construction is made such that drying and flooding is stable. If MUDFLAT is not defined, then the adaptive grids with Lagrangian component which are currently under development are supported. Both, drying and flooding and Lagrangian coordinates does not go together yet. The call sequence is as follows:

start_macro initialising a 3d step see page [*]
do_bdy_3d boundary conditions for $ \theta$ and $ S$ see page [*]
coordinates layer heights (MUTFLAT defined) see page [*]
bottom_friction_3d bottom friction see page [*]
do_internal_pressure internal pressure gradient see page [*]
uu_momentum_3d layer-integrated $ u$-velocity see page [*]
vv_momentum_3d layer-integrated $ v$-velocity see page [*]
coordinates layer heights (MUTFLAT not defined) see page [*]
ww_momentum_3d grid-related vertical velocity see page [*]
uv_advect_3d momentum advection see page [*]
uv_diffusion_3d momentum diffusion see page [*]
stresses_3d stresses (for GOTM) see page [*]
ss_nn shear and stratification (for GOTM) see page [*]
gotm interface and call to GOTM see page [*]
do_temperature potential temperature equation see page [*]
do_salinity salinity equation see page [*]
do_eqstate equation of state see page [*]
do_spm suspended matter equation see page [*]
do_getm_bio call to GOTM-BIO (not yet released)  
slow_bottom_friction slow bottom friction see page [*]
slow_terms sum of slow terms see page [*]
stop_macro finishing a 3d step see page [*]

Several calls are only executed for certain compiler options. At each time step the call sequence for the horizontal momentum equations is changed in order to allow for higher order accuracy for the Coriolis rotation. LOCAL VARIABLES:

   logical, save              :: ufirst=.true.

kklingbe 2017-10-02