Define every component of the solution bundle. Called FIRST by
cavity_solve_melt, before any early return, because the type
carries no default initialisers (see its docstring: they would
bar it from a do concurrent local(...) clause on gfortran).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ocean_cavity_solution_t), | intent(out) | :: | sol |
Solution bundle, zeroed. |
pure subroutine cavity_solution_reset(sol) !! Define every component of the solution bundle. Called FIRST by !! `cavity_solve_melt`, before any early return, because the type !! carries no default initialisers (see its docstring: they would !! bar it from a `do concurrent` `local(...)` clause on gfortran). !$acc routine seq type(ocean_cavity_solution_t), intent(out) :: sol !! Solution bundle, zeroed. sol%T_b = 0.0_wp sol%S_b = 0.0_wp sol%m_mass = 0.0_wp sol%gamma_t = 0.0_wp sol%gamma_s = 0.0_wp sol%u_star = 0.0_wp sol%b_flux = 0.0_wp sol%l_plus = 0.0_wp sol%L_obukhov = 0.0_wp sol%T_star = 0.0_wp sol%S_star = 0.0_wp sol%q_ocean = 0.0_wp sol%q_ice = 0.0_wp sol%q_latent = 0.0_wp sol%n_iter = 0 sol%converged = .false. end subroutine cavity_solution_reset