Net surface heat flux (W/m^2): h%state%surface_flux%Q_heat. P2
called this the “STANDALONE sf slot” (a separate, minimally-
seeded object from ocean_state%surface_flux) because the P1
step call never ran ocean_surface_flux_assemble. P2.4 unifies
setup+step across all three callers via the shared engine
(rdb_ocean_engine), so rdb_ocean_step now DOES run the
assembler (via engine_step_finalize) against this SAME field —
a write here is live-consumed the same way the driver’s is.
Shape (nx_total, ny_total).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(c_ptr), | intent(in), | value | :: | c_handle | ||
| type(c_ptr), | intent(out) | :: | ptr | |||
| integer(kind=c_int), | intent(out) | :: | nx | |||
| integer(kind=c_int), | intent(out) | :: | ny | |||
| integer(kind=c_int), | intent(out) | :: | gen |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(ocean_handle_t), | private, | pointer | :: | h | |||
| real(kind=wp), | private, | pointer | :: | tmp(:,:) |
function rdb_ocean_get_q_heat_ptr(c_handle, ptr, nx, ny, gen) result(status) & bind(c, name="rdb_ocean_get_q_heat_ptr") !! Net surface heat flux (W/m^2): `h%state%surface_flux%Q_heat`. P2 !! called this the "STANDALONE `sf` slot" (a separate, minimally- !! seeded object from `ocean_state%surface_flux`) because the P1 !! step call never ran `ocean_surface_flux_assemble`. P2.4 unifies !! setup+step across all three callers via the shared engine !! (`rdb_ocean_engine`), so `rdb_ocean_step` now DOES run the !! assembler (via `engine_step_finalize`) against this SAME field — !! a write here is live-consumed the same way the driver's is. !! Shape `(nx_total, ny_total)`. type(c_ptr), intent(in), value :: c_handle type(c_ptr), intent(out) :: ptr integer(c_int), intent(out) :: nx, ny, gen integer(c_int) :: status type(ocean_handle_t), pointer :: h real(wp), pointer :: tmp(:, :) ptr = c_null_ptr nx = 0 ny = 0 gen = 0 status = resolve_ocean(c_handle, h) if (status /= OCEAN_STATUS_OK) return tmp => h%state%surface_flux%Q_heat call fill_getter_2d(ptr, nx, ny, gen, tmp, h%state%dyn%outer_step_count) end function rdb_ocean_get_q_heat_ptr