Everything cavity_solve_melt returns: the interface state, the
fluxes a coupling seam needs, and the solver diagnostics.
DELIBERATELY WITHOUT DEFAULT INITIALISERS. A derived type that
carries them cannot be a do concurrent local(...) variable on
gfortran 15 (“LOCAL specifier … of derived type with default
initializer is not yet supported”), which would bar the coupling
kernel — and this suite’s device test — from declaring one per
column. cavity_solve_melt therefore DEFINES every component on
every path (cavity_solution_reset first, before any early
return), so intent(out) never leaves one undefined.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=wp), | public | :: | L_obukhov |
Dimensional Obukhov length (m), > 0 stabilising. |
|||
| real(kind=wp), | public | :: | S_b |
Interface salinity (g/kg). |
|||
| real(kind=wp), | public | :: | S_star |
Haline driving |
|||
| real(kind=wp), | public | :: | T_b |
Interface temperature (degC), on the liquidus by construction. |
|||
| real(kind=wp), | public | :: | T_star |
Thermal driving |
|||
| real(kind=wp), | public | :: | b_flux |
Interfacial buoyancy flux (m^2/s^3), < 0 stabilising. |
|||
| logical, | public | :: | converged |
Outer iteration converged (always |
|||
| real(kind=wp), | public | :: | gamma_s |
Salt exchange velocity actually used (m/s). |
|||
| real(kind=wp), | public | :: | gamma_t |
Heat exchange velocity actually used (m/s). |
|||
| real(kind=wp), | public | :: | l_plus |
Viscous Obukhov scale (dimensionless), > 0 stabilising;
|
|||
| real(kind=wp), | public | :: | m_mass |
Canonical melt mass flux (kg/m^2/s of ice), > 0 melting. |
|||
| integer, | public | :: | n_iter |
Outer bisection iterations taken (0 for an explicit law or a destabilising short-circuit). |
|||
| real(kind=wp), | public | :: | q_ice |
Conductive + ice-warming flux interface → ice (W/m^2). |
|||
| real(kind=wp), | public | :: | q_latent |
Latent heat consumed by the phase change (W/m^2). |
|||
| real(kind=wp), | public | :: | q_ocean |
Turbulent heat flux ocean → interface (W/m^2). |
|||
| real(kind=wp), | public | :: | u_star |
Friction velocity the solve was given (m/s). |
type :: ocean_cavity_solution_t !! Everything `cavity_solve_melt` returns: the interface state, the !! fluxes a coupling seam needs, and the solver diagnostics. !! !! DELIBERATELY WITHOUT DEFAULT INITIALISERS. A derived type that !! carries them cannot be a `do concurrent` `local(...)` variable on !! gfortran 15 ("LOCAL specifier ... of derived type with default !! initializer is not yet supported"), which would bar the coupling !! kernel — and this suite's device test — from declaring one per !! column. `cavity_solve_melt` therefore DEFINES every component on !! every path (`cavity_solution_reset` first, before any early !! return), so `intent(out)` never leaves one undefined. real(wp) :: T_b !! Interface temperature (degC), on the liquidus by construction. real(wp) :: S_b !! Interface salinity (g/kg). real(wp) :: m_mass !! **Canonical** melt mass flux (kg/m^2/s of ice), > 0 melting. real(wp) :: gamma_t !! Heat exchange velocity actually used (m/s). real(wp) :: gamma_s !! Salt exchange velocity actually used (m/s). real(wp) :: u_star !! Friction velocity the solve was given (m/s). real(wp) :: b_flux !! Interfacial buoyancy flux (m^2/s^3), < 0 stabilising. real(wp) :: l_plus !! Viscous Obukhov scale (dimensionless), > 0 stabilising; !! `CAVITY_L_PLUS_NEUTRAL` for a vanishing buoyancy flux. real(wp) :: L_obukhov !! Dimensional Obukhov length (m), > 0 stabilising. real(wp) :: T_star !! Thermal driving `T_w - T_f(S_w, p_b)` (degC). real(wp) :: S_star !! Haline driving `S_w - S_b` (g/kg). real(wp) :: q_ocean !! Turbulent heat flux ocean → interface (W/m^2). real(wp) :: q_ice !! Conductive + ice-warming flux interface → ice (W/m^2). real(wp) :: q_latent !! Latent heat consumed by the phase change (W/m^2). integer :: n_iter !! Outer bisection iterations taken (0 for an explicit law or a !! destabilising short-circuit). logical :: converged !! Outer iteration converged (always `.true.` for an explicit !! law). end type ocean_cavity_solution_t