Write the named liquidus coefficient SET onto the EOS handle.
Called once, at configure time, from the earliest
configure_ocean_* stage — before the flat-POD handle is copied
onto the vmix / EPBL / kappa-shear / tidal-mixing slots and
before ocean_state_enter_data, so every copy and every device
kernel taking eos_t by value sees the configured set (same
contract as rho0 / p_ref; no !$acc update device is owed).
TFREEZE_SET_INVALID leaves the handle UNTOUCHED — the abort
belongs to validate_config, which owns the fail-loud message;
this routine is pure and cannot speak.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(eos_t), | intent(inout) | :: | eos | |||
| integer, | intent(in) | :: | code |
pure subroutine eos_apply_tfreeze_set(eos, code) !! Write the named liquidus coefficient SET onto the EOS handle. !! Called once, at configure time, from the earliest !! `configure_ocean_*` stage — before the flat-POD handle is copied !! onto the vmix / EPBL / kappa-shear / tidal-mixing slots and !! before `ocean_state_enter_data`, so every copy and every device !! kernel taking `eos_t` by value sees the configured set (same !! contract as `rho0` / `p_ref`; no `!$acc update device` is owed). !! !! `TFREEZE_SET_INVALID` leaves the handle UNTOUCHED — the abort !! belongs to `validate_config`, which owns the fail-loud message; !! this routine is `pure` and cannot speak. type(eos_t), intent(inout) :: eos integer, intent(in) :: code select case (code) case (TFREEZE_SET_ISOMIP) eos%tfr_s = TFR_ISOMIP_S_COEFF eos%tfr_0 = TFR_ISOMIP_0_COEFF eos%tfr_p = TFR_ISOMIP_P_COEFF case (TFREEZE_SET_SEAICE) eos%tfr_s = TFR_S_COEFF eos%tfr_0 = TFR_0_COEFF eos%tfr_p = TFR_P_COEFF case default ! TFREEZE_SET_INVALID (and anything else): leave the handle at ! whatever it already carries — the default sea-ice set unless a ! caller has already applied one. `validate_config` owns the ! fail-loud; this routine is `pure` and cannot report. end select end subroutine eos_apply_tfreeze_set