cavity_melt_point_gamma_f Subroutine

private pure subroutine cavity_melt_point_gamma_f(T_w, S_w, p_b, u_star, S_i, par, f_cor, ice, eos, const, T_b, S_b, m_mass, q_ocean, gamma_t, gamma_s, ierr)

cavity_melt_point_gamma with the Coriolis parameter passed as a per-column SCALAR — what cavity_melt_columns_2d calls, so no device code has to build a modified ocean_cavity_exchange_t (see cavity_exchange_velocities_f).

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).

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 (its f_cor member is NOT read).

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

Coriolis parameter (1/s) for this column; hj99 only.

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.

real(kind=wp), intent(out) :: q_ocean

Turbulent heat flux ocean -> interface (W/m^2).

real(kind=wp), intent(out) :: gamma_t

Thermal exchange velocity (m/s) of the converged solve.

real(kind=wp), intent(out) :: gamma_s

Haline exchange velocity (m/s) of the converged solve.

integer, intent(out) :: ierr

CAVITY_MELT_* status.


Calls

proc~~cavity_melt_point_gamma_f~~CallsGraph proc~cavity_melt_point_gamma_f cavity_melt_point_gamma_f proc~cavity_solve_melt_f cavity_solve_melt_f proc~cavity_melt_point_gamma_f->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_melt_point_gamma_f~~CalledByGraph proc~cavity_melt_point_gamma_f cavity_melt_point_gamma_f proc~cavity_melt_columns_2d cavity_melt_columns_2d proc~cavity_melt_columns_2d->proc~cavity_melt_point_gamma_f proc~cavity_melt_point_gamma cavity_melt_point_gamma proc~cavity_melt_point_gamma->proc~cavity_melt_point_gamma_f proc~ocean_cavity_flux_step ocean_cavity_flux_step proc~ocean_cavity_flux_step->proc~cavity_melt_columns_2d proc~engine_step_finalize engine_step_finalize proc~engine_step_finalize->proc~ocean_cavity_flux_step proc~driver_run_ocean driver_run_ocean proc~driver_run_ocean->proc~engine_step_finalize proc~rdb_ocean_step rdb_ocean_step proc~rdb_ocean_step->proc~engine_step_finalize proc~driver_run driver_run proc~driver_run->proc~driver_run_ocean

Variables

Type Visibility Attributes Name Initial
type(ocean_cavity_solution_t), private :: sol

Source Code

   pure subroutine cavity_melt_point_gamma_f(T_w, S_w, p_b, u_star, S_i, par, f_cor, ice, &
                                             eos, const, T_b, S_b, m_mass, q_ocean, &
                                             gamma_t, gamma_s, ierr)
      !! `cavity_melt_point_gamma` with the Coriolis parameter passed as a
      !! per-column SCALAR — what `cavity_melt_columns_2d` calls, so no
      !! device code has to build a modified `ocean_cavity_exchange_t`
      !! (see `cavity_exchange_velocities_f`).
      !$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 (its `f_cor` member is NOT read).
      real(wp), intent(in) :: f_cor
         !! Coriolis parameter (1/s) for this column; `hj99` only.
      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.
      real(wp), intent(out) :: q_ocean
         !! Turbulent heat flux ocean -> interface (W/m^2).
      real(wp), intent(out) :: gamma_t
         !! Thermal exchange velocity (m/s) of the converged solve.
      real(wp), intent(out) :: gamma_s
         !! Haline exchange velocity (m/s) of the converged solve.
      integer, intent(out) :: ierr
         !! `CAVITY_MELT_*` status.
      type(ocean_cavity_solution_t) :: sol

      call cavity_solve_melt_f(T_w, S_w, p_b, u_star, S_i, par, f_cor, 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
      gamma_t = sol%gamma_t
      gamma_s = sol%gamma_s
   end subroutine cavity_melt_point_gamma_f