sponge_relax_band_x_tracer Subroutine

private subroutine sponge_relax_band_x_tracer(ms, it, nx_total, ny_total, nz, j0, j1, wall_face, band, side, strength, C_bc, dt)

Host dispatch for one tracer’s relax_band_x_impl call: routes the salinity/temperature budget mirror (PR-23) so the legacy band sponge’s tracer sink is instrumented exactly like the map-driven path, without threading an if-branch into every one of the four edge blocks in ocean_sponge_apply_tracers.

Arguments

Type IntentOptional Attributes Name
type(multilayer_state_t), intent(inout) :: ms
integer, intent(in) :: it
integer, intent(in) :: nx_total
integer, intent(in) :: ny_total
integer, intent(in) :: nz
integer, intent(in) :: j0
integer, intent(in) :: j1
integer, intent(in) :: wall_face
integer, intent(in) :: band
integer, intent(in) :: side
real(kind=wp), intent(in) :: strength
real(kind=wp), intent(in) :: C_bc
real(kind=wp), intent(in) :: dt

Calls

proc~~sponge_relax_band_x_tracer~~CallsGraph proc~sponge_relax_band_x_tracer sponge_relax_band_x_tracer proc~relax_band_x_impl relax_band_x_impl proc~sponge_relax_band_x_tracer->proc~relax_band_x_impl local local proc~relax_band_x_impl->local proc~relax_one relax_one proc~relax_band_x_impl->proc~relax_one proc~relax_toward relax_toward proc~relax_one->proc~relax_toward

Called by

proc~~sponge_relax_band_x_tracer~~CalledByGraph proc~sponge_relax_band_x_tracer sponge_relax_band_x_tracer proc~ocean_sponge_apply_tracers ocean_sponge_apply_tracers proc~ocean_sponge_apply_tracers->proc~sponge_relax_band_x_tracer proc~run_stage_split run_stage_split proc~run_stage_split->proc~ocean_sponge_apply_tracers proc~ocean_dyn_step_split ocean_dyn_step_split proc~ocean_dyn_step_split->proc~run_stage_split 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

Source Code

   subroutine sponge_relax_band_x_tracer(ms, it, nx_total, ny_total, nz, &
                                         j0, j1, wall_face, band, side, strength, C_bc, dt)
      !! Host dispatch for one tracer's `relax_band_x_impl` call: routes the
      !! salinity/temperature budget mirror (PR-23) so the legacy band
      !! sponge's tracer sink is instrumented exactly like the map-driven
      !! path, without threading an `if`-branch into every one of the four
      !! edge blocks in `ocean_sponge_apply_tracers`.
      type(multilayer_state_t), intent(inout) :: ms
      integer, intent(in) :: it, nx_total, ny_total, nz, j0, j1, wall_face, band, side
      real(wp), intent(in) :: strength, C_bc, dt

      if (it == ms%idx_salinity) then
         call relax_band_x_impl(ms%tracers(it)%hTr, ms%h_layer, nx_total, ny_total, nz, &
                                j0, j1, wall_face, band, side, strength, C_bc, dt, &
                                budget=ms%salt_budget_sponge)
      else if (it == ms%idx_temperature) then
         call relax_band_x_impl(ms%tracers(it)%hTr, ms%h_layer, nx_total, ny_total, nz, &
                                j0, j1, wall_face, band, side, strength, C_bc, dt, &
                                budget=ms%heat_budget_sponge)
      else
         call relax_band_x_impl(ms%tracers(it)%hTr, ms%h_layer, nx_total, ny_total, nz, &
                                j0, j1, wall_face, band, side, strength, C_bc, dt)
      end if
   end subroutine sponge_relax_band_x_tracer