fb = RHO_WATERSEAWATER_CPmax(0, SST - T_f)h_top/dt_therm [W/m^2],
the complement of the frazil bank: a warm (above-freezing) ocean surface
under ice melts the base (fb > 0 -> bmelt in ice_temp_sis2 TRAP #3);
a supercooled surface grows it (that path is the frazil bank, PR 1/3b).
Same RHO_WATERSEAWATER_CP convention as ice_frazil_accumulate so growth
and melt share one energy scale.
NO CAP (v1): fb is the full above-freezing flux. The column’s bottom-melt
peel is self-limiting (clamps to available ice mass, spills the remainder
to heat_to_ocn), so nothing is discarded and the heat budget closes.
ICE-PRESENCE GATE (crucial): fb is ZERO on ice-free cells — no ice base,
no basal flux. The gate mirrors ice_thermo_columns’ own ice threshold
sum_cat m_ice > ICE_RHO_ICE*H_VANISHED so the column and the coupler
agree EXACTLY on which cells exchange. Without it, a warm ice-free ocean
cell (the normal open-ocean state, SST > T_f) would compute a large
fb > 0 that the column then never consumes (m_ice = 0 => heat_to_ocn = 0),
and the melt-side reduce kernel would inject a spurious Q_heat = -fb,
cooling the open ocean by several degC per thermo step. The sample seam
(sst_seam/ssurf_seam/tfw_seam) is STILL filled on all wet cells (harmless
— the column only reads it where it has ice).
One-step lag: reads the outer step’s FINAL surface state (called post-dyn,
pre-column, like ice_frazil_accumulate). Physical cells only; wet +
non-vanished gate. Outer-shim + flat-impl (registry deref on host).
ALSO fills the sample seam (sst_seam/ssurf_seam/tfw_seam) the column
driver (rdb_ice_thermo_driver) reuses — one SST/SSS/T_f sample serves
both fb and the column’s ocean-side inputs, keeping them at the same
one-step-lagged snapshot (physically consistent, PLAN_ICE_PR3c
§”Ocean -> ice basal heat flux”).
Nodes of different colours represent the following:
Solid arrows point from a submodule to the (sub)module which it is
descended from. Dashed arrows point from a module or program unit to
modules which it uses.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Nodes of different colours represent the following:
Solid arrows point from a submodule to the (sub)module which it is
descended from. Dashed arrows point from a module or program unit to
modules which it uses.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Outer shim (outer-shim + flat-impl pattern): dereference the
tracer registry (ms%tracers(idx)%hTr) on the HOST and forward
bare arrays to the device kernel — same rule as ice_frazil_accumulate
/ ice_frazil_uptake. No-op when either S or T is unregistered.
Device kernel over PHYSICAL cells (ghosts excluded — same
physical-cells-only contract as ice_frazil_accumulate_impl).
fb/sst_seam/ssurf_seam/tfw_seam are zeroed unconditionally
first. The SAMPLE seam (sst_seam/ssurf_seam/tfw_seam) is filled on
every wet, non-vanished cell (harmless — the column reads it only
where it has ice). But fb is filled ONLY where BOTH the cell is
wet+non-vanished AND it carries ice (sum_cat m_ice >
ICE_RHO_ICE*H_VANISHED, exactly ice_thermo_columns’ own per-cat
ice threshold, summed): no ice base ⇒ no basal flux. This keeps the
coupler and the column in lockstep on which cells exchange, so an
ice-free warm ocean cell (SST > T_f, the normal open-ocean state)
reports fb = 0 and the melt-side reduce kernel’s -fb term is a
harmless subtraction of zero (rather than a spurious ocean-cooling
Q_heat = -fb).