Driver-facing entry point for the surface Dirichlet BC.
Self-gates on ms%idx_age <= 0, else delegates to the
flat-impl ocean_ideal_age_reset_step kernel. Call exactly
ONCE per outer step, after rk2_average + the ALE remap —
see the module header for the full ordering contract.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(hgrid_t), | intent(in) | :: | grid | |||
| type(multilayer_state_t), | intent(inout) | :: | ms | |||
| real(kind=wp), | intent(in) | :: | young_eff |
Host-computed surface value (s) — see |
||
| logical, | intent(in), | optional | :: | active |
Optional gate (thermo cadence). Absent => kernel runs; present-and-false => early return. |
subroutine ocean_ideal_age_reset_surface(grid, ms, young_eff, active) !! Driver-facing entry point for the surface Dirichlet BC. !! Self-gates on `ms%idx_age <= 0`, else delegates to the !! flat-impl `ocean_ideal_age_reset_step` kernel. Call exactly !! ONCE per outer step, after `rk2_average` + the ALE remap — !! see the module header for the full ordering contract. type(hgrid_t), intent(in) :: grid type(multilayer_state_t), intent(inout) :: ms real(wp), intent(in) :: young_eff !! Host-computed surface value (s) — see `ocean_ideal_age_young_val`. !! Computed ONCE on the host per outer step and passed by value; !! never call `exp()` inside a `do concurrent` body. logical, intent(in), optional :: active !! Optional gate (thermo cadence). Absent => kernel runs; !! present-and-false => early return. if (present(active)) then if (.not. active) return end if if (ms%idx_age <= 0) return call ocean_ideal_age_reset_step(ms%tracers(ms%idx_age)%hTr, ms%h_layer, & young_eff, grid%nx_total, grid%ny_total, ms%nz_ml) end subroutine ocean_ideal_age_reset_surface