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 | Intent | Optional | 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 |
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