Scalar entry point returning only what a coupling seam consumes:
the interface state, the canonical melt mass flux and the ocean
-> interface heat flux. A thin wrapper over cavity_solve_melt
that keeps the solution BUNDLE inside the callee, so a
do concurrent over columns needs no derived-type local(...)
clause at all — each iteration writes its own array elements.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | T_w |
Far-field temperature (degC). |
||
| real(kind=wp), | intent(in) | :: | S_w |
Far-field salinity (g/kg). |
||
| real(kind=wp), | intent(in) | :: | p_b |
Interface pressure (Pa). |
||
| real(kind=wp), | intent(in) | :: | u_star |
Friction velocity (m/s). |
||
| real(kind=wp), | intent(in) | :: | S_i |
Ice salinity (g/kg). |
||
| type(ocean_cavity_exchange_t), | intent(in) | :: | par |
Exchange-law bundle. |
||
| type(ocean_cavity_ice_t), | intent(in) | :: | ice |
Ice-conduction bundle. |
||
| type(eos_t), | intent(in) | :: | eos |
Shared EOS handle — the liquidus. |
||
| type(ocean_cavity_const_t), | intent(in) | :: | const |
Constants bundle. |
||
| real(kind=wp), | intent(out) | :: | T_b |
Interface temperature (degC). |
||
| real(kind=wp), | intent(out) | :: | S_b |
Interface salinity (g/kg). |
||
| real(kind=wp), | intent(out) | :: | m_mass |
Melt mass flux (kg/m^2/s), > 0 melting; EXACTLY zero on any non-OK status. |
||
| real(kind=wp), | intent(out) | :: | q_ocean |
Turbulent heat flux ocean -> interface (W/m^2). |
||
| integer, | intent(out) | :: | ierr |
|
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(ocean_cavity_solution_t), | private | :: | sol |
pure subroutine cavity_melt_point(T_w, S_w, p_b, u_star, S_i, par, ice, eos, const, & T_b, S_b, m_mass, q_ocean, ierr) !! Scalar entry point returning only what a coupling seam consumes: !! the interface state, the canonical melt mass flux and the ocean !! -> interface heat flux. A thin wrapper over `cavity_solve_melt` !! that keeps the solution BUNDLE inside the callee, so a !! `do concurrent` over columns needs no derived-type `local(...)` !! clause at all — each iteration writes its own array elements. !$acc routine seq real(wp), intent(in) :: T_w !! Far-field temperature (degC). real(wp), intent(in) :: S_w !! Far-field salinity (g/kg). real(wp), intent(in) :: p_b !! Interface pressure (Pa). real(wp), intent(in) :: u_star !! Friction velocity (m/s). real(wp), intent(in) :: S_i !! Ice salinity (g/kg). type(ocean_cavity_exchange_t), intent(in) :: par !! Exchange-law bundle. type(ocean_cavity_ice_t), intent(in) :: ice !! Ice-conduction bundle. type(eos_t), intent(in) :: eos !! Shared EOS handle — the liquidus. type(ocean_cavity_const_t), intent(in) :: const !! Constants bundle. real(wp), intent(out) :: T_b !! Interface temperature (degC). real(wp), intent(out) :: S_b !! Interface salinity (g/kg). real(wp), intent(out) :: m_mass !! Melt mass flux (kg/m^2/s), > 0 melting; EXACTLY zero on any !! non-OK status. real(wp), intent(out) :: q_ocean !! Turbulent heat flux ocean -> interface (W/m^2). integer, intent(out) :: ierr !! `CAVITY_MELT_*` status. type(ocean_cavity_solution_t) :: sol call cavity_solve_melt(T_w, S_w, p_b, u_star, S_i, par, ice, eos, const, sol, ierr) T_b = sol%T_b S_b = sol%S_b m_mass = sol%m_mass q_ocean = sol%q_ocean end subroutine cavity_melt_point