cavity_solve_melt Subroutine

public pure subroutine cavity_solve_melt(T_w, S_w, p_b, u_star, S_i, par, ice, eos, const, sol, ierr)

cavity_solve_melt_f with the Coriolis parameter taken from the bundle (par%f_cor) — the scalar entry point every host caller and the kernel suite use.

Arguments

Type IntentOptional 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). Must exceed S_i.

real(kind=wp), intent(in) :: p_b

Interface pressure (Pa).

real(kind=wp), intent(in) :: u_star

Friction velocity (m/s), strictly positive — from cavity_ustar.

real(kind=wp), intent(in) :: S_i

Ice salinity (g/kg), >= 0.

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.

type(ocean_cavity_solution_t), intent(out) :: sol

Interface state, fluxes and solver diagnostics. On any non-OK status this carries the safe state (m_mass exactly zero).

integer, intent(out) :: ierr

CAVITY_MELT_* status.


Calls

proc~~cavity_solve_melt~~CallsGraph proc~cavity_solve_melt cavity_solve_melt proc~cavity_solve_melt_f cavity_solve_melt_f proc~cavity_solve_melt->proc~cavity_solve_melt_f proc~cavity_heat_fluxes cavity_heat_fluxes proc~cavity_solve_melt_f->proc~cavity_heat_fluxes proc~cavity_law_is_implicit cavity_law_is_implicit proc~cavity_solve_melt_f->proc~cavity_law_is_implicit proc~cavity_obukhov_length cavity_obukhov_length proc~cavity_solve_melt_f->proc~cavity_obukhov_length proc~cavity_outer_residual cavity_outer_residual proc~cavity_solve_melt_f->proc~cavity_outer_residual proc~cavity_safe_state cavity_safe_state proc~cavity_solve_melt_f->proc~cavity_safe_state proc~cavity_solution_reset cavity_solution_reset proc~cavity_solve_melt_f->proc~cavity_solution_reset proc~cavity_state_at_x cavity_state_at_x proc~cavity_solve_melt_f->proc~cavity_state_at_x proc~eos_freezing_point eos_freezing_point proc~cavity_solve_melt_f->proc~eos_freezing_point proc~cavity_ice_terms cavity_ice_terms proc~cavity_heat_fluxes->proc~cavity_ice_terms proc~cavity_t_ice cavity_t_ice proc~cavity_heat_fluxes->proc~cavity_t_ice proc~cavity_l_plus_is_neutral cavity_l_plus_is_neutral proc~cavity_outer_residual->proc~cavity_l_plus_is_neutral proc~cavity_safe_state->proc~eos_freezing_point proc~cavity_state_at_x->proc~cavity_safe_state proc~cavity_buoyancy_flux cavity_buoyancy_flux proc~cavity_state_at_x->proc~cavity_buoyancy_flux proc~cavity_exchange_velocities_f cavity_exchange_velocities_f proc~cavity_state_at_x->proc~cavity_exchange_velocities_f proc~cavity_l_plus_from_state cavity_l_plus_from_state proc~cavity_state_at_x->proc~cavity_l_plus_from_state proc~cavity_three_equation cavity_three_equation proc~cavity_state_at_x->proc~cavity_three_equation proc~cavity_gamma_hj99 cavity_gamma_hj99 proc~cavity_exchange_velocities_f->proc~cavity_gamma_hj99 proc~cavity_gamma_yung25 cavity_gamma_yung25 proc~cavity_exchange_velocities_f->proc~cavity_gamma_yung25 proc~cavity_three_equation->proc~cavity_safe_state proc~cavity_three_equation->proc~eos_freezing_point proc~cavity_three_equation->proc~cavity_ice_terms proc~cavity_three_equation->proc~cavity_t_ice proc~cavity_gamma_hj99->proc~cavity_l_plus_is_neutral proc~cavity_gamma_yung25->proc~cavity_l_plus_is_neutral

Called by

proc~~cavity_solve_melt~~CalledByGraph proc~cavity_solve_melt cavity_solve_melt proc~cavity_melt_point cavity_melt_point proc~cavity_melt_point->proc~cavity_solve_melt proc~cavity_melt_columns cavity_melt_columns proc~cavity_melt_columns->proc~cavity_melt_point

Source Code

   pure subroutine cavity_solve_melt(T_w, S_w, p_b, u_star, S_i, par, ice, eos, const, &
                                     sol, ierr)
      !! `cavity_solve_melt_f` with the Coriolis parameter taken from the
      !! bundle (`par%f_cor`) — the scalar entry point every host caller
      !! and the kernel suite use.
      !$acc routine seq
      real(wp), intent(in) :: T_w
         !! Far-field temperature (degC).
      real(wp), intent(in) :: S_w
         !! Far-field salinity (g/kg).  Must exceed `S_i`.
      real(wp), intent(in) :: p_b
         !! Interface pressure (Pa).
      real(wp), intent(in) :: u_star
         !! Friction velocity (m/s), strictly positive — from
         !! `cavity_ustar`.
      real(wp), intent(in) :: S_i
         !! Ice salinity (g/kg), >= 0.
      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.
      type(ocean_cavity_solution_t), intent(out) :: sol
         !! Interface state, fluxes and solver diagnostics.  On any non-OK
         !! status this carries the safe state (`m_mass` exactly zero).
      integer, intent(out) :: ierr
         !! `CAVITY_MELT_*` status.

      call cavity_solve_melt_f(T_w, S_w, p_b, u_star, S_i, par, par%f_cor, ice, eos, &
                               const, sol, ierr)
   end subroutine cavity_solve_melt