run_meke_step Subroutine

private subroutine run_meke_step(grid, metrics, gm, varmix, wavespeed, hv, ms, dt, meke)

Thin dispatcher: call meke_step only when the MEKE slot is present AND enabled, forwarding the (also-optional) VarMix + wavespeed slots so the feedback seam + length scales engage when those are on. meke_step itself no-ops on enable=.false.; this guard avoids the call (and the present-propagation noise) when the slot is absent. hv%ke_diss (the lateral-viscosity KE dissipation rate) is forwarded for the frictional source; it is 0 unless hv%compute_ke_diss is set (and meke%frcoeff<0 ignores it) ⇒ inert by default.

Arguments

Type IntentOptional Attributes Name
type(hgrid_t), intent(in) :: grid
type(ocean_metrics_t), intent(in) :: metrics
type(ocean_gm_t), intent(in) :: gm
type(ocean_varmix_t), intent(inout), optional :: varmix
type(ocean_wave_speed_t), intent(in), optional :: wavespeed
type(ocean_horizontal_viscosity_t), intent(in) :: hv
type(multilayer_state_t), intent(in) :: ms
real(kind=wp), intent(in) :: dt
type(ocean_meke_t), intent(inout), optional :: meke

Calls

proc~~run_meke_step~~CallsGraph proc~run_meke_step run_meke_step proc~meke_step meke_step proc~run_meke_step->proc~meke_step proc~meke_advect meke_advect proc~meke_step->proc~meke_advect proc~meke_baro_transport meke_baro_transport proc~meke_step->proc~meke_baro_transport proc~meke_bbl_speed2 meke_bbl_speed2 proc~meke_step->proc~meke_bbl_speed2 proc~meke_drag meke_drag proc~meke_step->proc~meke_drag proc~meke_feed_khth meke_feed_khth proc~meke_step->proc~meke_feed_khth proc~meke_kh_closure meke_kh_closure proc~meke_step->proc~meke_kh_closure proc~meke_ku_closure meke_ku_closure proc~meke_step->proc~meke_ku_closure proc~meke_lateral meke_lateral proc~meke_step->proc~meke_lateral proc~meke_length_scales meke_length_scales proc~meke_step->proc~meke_length_scales proc~meke_mass meke_mass proc~meke_step->proc~meke_mass proc~meke_source meke_source proc~meke_step->proc~meke_source proc~meke_stage_rd meke_stage_rd proc~meke_step->proc~meke_stage_rd proc~meke_stage_sn meke_stage_sn proc~meke_step->proc~meke_stage_sn proc~meke_zero_2d meke_zero_2d proc~meke_step->proc~meke_zero_2d local local proc~meke_advect->local proc~meke_baro_transport->local proc~meke_bbl_speed2->local proc~meke_drag->local proc~meke_feed_khth->local proc~meke_kh_closure->local proc~meke_ku_closure->local proc~meke_lateral->local proc~meke_length_scales->local proc~meke_inv_lmix meke_inv_lmix proc~meke_length_scales->proc~meke_inv_lmix proc~meke_mass->local proc~meke_source->local

Called by

proc~~run_meke_step~~CalledByGraph proc~run_meke_step run_meke_step proc~ocean_dyn_step_split ocean_dyn_step_split proc~ocean_dyn_step_split->proc~run_meke_step proc~engine_step engine_step proc~engine_step->proc~ocean_dyn_step_split proc~driver_run_ocean driver_run_ocean proc~driver_run_ocean->proc~engine_step proc~rdb_ocean_step rdb_ocean_step proc~rdb_ocean_step->proc~engine_step proc~driver_run driver_run proc~driver_run->proc~driver_run_ocean

Source Code

   subroutine run_meke_step(grid, metrics, gm, varmix, wavespeed, hv, ms, dt, meke)
      !! Thin dispatcher: call `meke_step` only when the MEKE slot is present
      !! AND enabled, forwarding the (also-optional) VarMix + wavespeed slots
      !! so the feedback seam + length scales engage when those are on.
      !! `meke_step` itself no-ops on `enable=.false.`; this guard avoids the
      !! call (and the present-propagation noise) when the slot is absent.
      !! `hv%ke_diss` (the lateral-viscosity KE dissipation rate) is forwarded
      !! for the frictional source; it is 0 unless `hv%compute_ke_diss` is set
      !! (and `meke%frcoeff<0` ignores it) ⇒ inert by default.
      type(hgrid_t), intent(in) :: grid
      type(ocean_metrics_t), intent(in) :: metrics
      type(ocean_gm_t), intent(in) :: gm
      type(ocean_varmix_t), intent(inout), optional :: varmix
      type(ocean_wave_speed_t), intent(in), optional :: wavespeed
      type(ocean_horizontal_viscosity_t), intent(in) :: hv
      type(multilayer_state_t), intent(in) :: ms
      real(wp), intent(in) :: dt
      type(ocean_meke_t), intent(inout), optional :: meke

      if (.not. present(meke)) return
      if (.not. meke%enable) return
      call meke_step(grid, metrics, meke, gm, varmix, wavespeed, ms, dt, &
                     ke_diss_ext=hv%ke_diss)
   end subroutine run_meke_step