Refresh the ocean surface salt-flux field from the ice slot.
Components off (default):
Q_salt(i,j) = Q_salt_const + salt_flux_diag(i,j)
POSITIVE SALINIFIES (TRAP #2 above — matches
apply_surface_src_2d_impl’s hTr_S += dt/rho0*Q_salt). This
is a FULL OVERWRITE from the configure-time constant plus the
last uptake’s rate: no accumulation drift, and a thermo window
with no freezing resets the field back to the background
(salt_flux_diag == 0 when the bank was empty or the cell was
dry/land/vanished — see ice_frazil_uptake_impl’s unconditional
diag zeroing).
Components on (sf%use_components, PR-12): write the ice’s
own COMPONENT instead — sf%salt_flux(i,j) = salt_flux_diag(i,j)
(no Q_salt_const term: ocean_surface_flux_assemble adds it).
Sets has_salt either way (§13 item 6 of the PR-12 plan: any
filler that can produce non-zero net salt must set the latch).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ocean_surface_flux_t), | intent(inout) | :: | sf | |||
| type(ocean_sea_ice_t), | intent(in) | :: | ice |
pure subroutine ice_ocean_brine_flux(sf, ice) !! Refresh the ocean surface salt-flux field from the ice slot. !! **Components off** (default): !! Q_salt(i,j) = Q_salt_const + salt_flux_diag(i,j) !! POSITIVE SALINIFIES (TRAP #2 above — matches !! `apply_surface_src_2d_impl`'s `hTr_S += dt/rho0*Q_salt`). This !! is a FULL OVERWRITE from the configure-time constant plus the !! last uptake's rate: no accumulation drift, and a thermo window !! with no freezing resets the field back to the background !! (`salt_flux_diag == 0` when the bank was empty or the cell was !! dry/land/vanished — see `ice_frazil_uptake_impl`'s unconditional !! diag zeroing). !! **Components on** (`sf%use_components`, PR-12): write the ice's !! own COMPONENT instead — `sf%salt_flux(i,j) = salt_flux_diag(i,j)` !! (no `Q_salt_const` term: `ocean_surface_flux_assemble` adds it). !! Sets `has_salt` either way (§13 item 6 of the PR-12 plan: any !! filler that can produce non-zero net salt must set the latch). type(ocean_surface_flux_t), intent(inout) :: sf type(ocean_sea_ice_t), intent(in) :: ice sf%has_salt = .true. if (sf%use_components) then call ice_ocean_brine_flux_components_impl(sf%salt_flux, ice%salt_flux_diag, & ice%nx_total, ice%ny_total) else call ice_ocean_brine_flux_impl(sf%Q_salt, ice%salt_flux_diag, & sf%Q_salt_const, ice%nx_total, ice%ny_total) end if end subroutine ice_ocean_brine_flux