D1 follow-up: is the visc_rem PRODUCER needed, independent of
the (retired) weighted BT-correction fold? .true. whenever
ANY real consumer is on — forcing_visc_rem/renorm_visc_rem/
bt_rem_from_visc_rem (each already .or.-ed with
visc_rem_chain by their own helper) — or the legacy
correction_visc_rem field itself, so a test that constructs
cfg directly and sets that field alone (bypassing the nml
retirement check) still gets a live producer. This is what
configure_ocean_bt wires into bt_work%bt_visc_rem_producer,
which vmix_apply_in_stage’s do_remnant reads — NOT
bt_work%bt_correction_visc_rem, which now drives ONLY the
weighted-fold dispatch in apply_bt_correction (and is never
set by visc_rem_chain).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(config_t), | intent(in) | :: | cfg |
pure function ocean_bt_visc_rem_producer_on(cfg) result(on) !! D1 follow-up: is the visc_rem PRODUCER needed, independent of !! the (retired) weighted BT-correction fold? `.true.` whenever !! ANY real consumer is on — `forcing_visc_rem`/`renorm_visc_rem`/ !! `bt_rem_from_visc_rem` (each already `.or.`-ed with !! `visc_rem_chain` by their own helper) — or the legacy !! `correction_visc_rem` field itself, so a test that constructs !! `cfg` directly and sets that field alone (bypassing the nml !! retirement check) still gets a live producer. This is what !! `configure_ocean_bt` wires into `bt_work%bt_visc_rem_producer`, !! which `vmix_apply_in_stage`'s `do_remnant` reads — NOT !! `bt_work%bt_correction_visc_rem`, which now drives ONLY the !! weighted-fold dispatch in `apply_bt_correction` (and is never !! set by `visc_rem_chain`). type(config_t), intent(in) :: cfg logical :: on on = cfg%ocean%bt%correction_visc_rem .or. ocean_bt_forcing_visc_rem_on(cfg) & .or. ocean_bt_renorm_visc_rem_on(cfg) .or. ocean_bt_rem_from_visc_rem_on(cfg) end function ocean_bt_visc_rem_producer_on