Driver-facing entry point for the interior-aging SOURCE term.
Self-gates on ms%idx_age <= 0 (no-op when the ideal-age
tracer isn’t registered), else delegates to the flat-impl
ocean_ideal_age_age_step kernel. Call once per RK2 stage
with dt = therm_dt and active = dyn%is_thermo_step() — see
the module header for the full contract.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(hgrid_t), | intent(in) | :: | grid | |||
| type(multilayer_state_t), | intent(inout) | :: | ms | |||
| real(kind=wp), | intent(in) | :: | dt | |||
| logical, | intent(in), | optional | :: | active |
Optional gate (thermo cadence). Absent => kernel runs; present-and-false => early return. |
subroutine ocean_ideal_age_apply(grid, ms, dt, active) !! Driver-facing entry point for the interior-aging SOURCE term. !! Self-gates on `ms%idx_age <= 0` (no-op when the ideal-age !! tracer isn't registered), else delegates to the flat-impl !! `ocean_ideal_age_age_step` kernel. Call once per RK2 stage !! with `dt = therm_dt` and `active = dyn%is_thermo_step()` — see !! the module header for the full contract. type(hgrid_t), intent(in) :: grid type(multilayer_state_t), intent(inout) :: ms real(wp), intent(in) :: dt 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_age_step(ms%tracers(ms%idx_age)%hTr, ms%h_layer, & dt, grid%nx_total, grid%ny_total, ms%nz_ml) end subroutine ocean_ideal_age_apply