The two sides of (E3), in (g/kg)*kg/m^2/s:
f_turb = rho_w*gamma_s*(S_w - S_b) turbulent salt flux
toward the interface
f_phase = m_mass*(S_b - S_i) salt rejected/diluted by
the phase change
(E3) says these are equal; the unit tests assert it to round-off.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ocean_cavity_const_t), | intent(in) | :: | const |
Constants bundle — |
||
| real(kind=wp), | intent(in) | :: | S_w |
Far-field salinity (g/kg). |
||
| real(kind=wp), | intent(in) | :: | S_b |
Interface salinity (g/kg). |
||
| real(kind=wp), | intent(in) | :: | m_mass |
Melt mass flux (kg/m^2/s). |
||
| real(kind=wp), | intent(in) | :: | gamma_s |
Salt exchange velocity (m/s). |
||
| real(kind=wp), | intent(in) | :: | S_i |
Ice salinity (g/kg). |
||
| real(kind=wp), | intent(out) | :: | f_turb |
Turbulent salt flux toward the interface. |
||
| real(kind=wp), | intent(out) | :: | f_phase |
Phase-change salt flux. |
pure subroutine cavity_salt_fluxes(const, S_w, S_b, m_mass, gamma_s, S_i, & f_turb, f_phase) !! The two sides of (E3), in (g/kg)*kg/m^2/s: !! !! `f_turb = rho_w*gamma_s*(S_w - S_b)` turbulent salt flux !! toward the interface !! `f_phase = m_mass*(S_b - S_i)` salt rejected/diluted by !! the phase change !! !! (E3) says these are equal; the unit tests assert it to round-off. !$acc routine seq type(ocean_cavity_const_t), intent(in) :: const !! Constants bundle — `rho_w`. real(wp), intent(in) :: S_w !! Far-field salinity (g/kg). real(wp), intent(in) :: S_b !! Interface salinity (g/kg). real(wp), intent(in) :: m_mass !! Melt mass flux (kg/m^2/s). real(wp), intent(in) :: gamma_s !! Salt exchange velocity (m/s). real(wp), intent(in) :: S_i !! Ice salinity (g/kg). real(wp), intent(out) :: f_turb !! Turbulent salt flux toward the interface. real(wp), intent(out) :: f_phase !! Phase-change salt flux. f_turb = const%rho_w*gamma_s*(S_w - S_b) f_phase = m_mass*(S_b - S_i) end subroutine cavity_salt_fluxes