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.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(hgrid_t), | intent(in) | :: | grid | |||
| type(eos_t), | intent(in) | :: | eos | |||
| type(multilayer_state_t), | intent(in) | :: | ms |
READ-ONLY: SST/SSS are sampled here, never written. |
||
| type(ocean_sea_ice_t), | intent(inout) | :: | ice |
Writes ice%fb and the sst_seam/ssurf_seam/tfw_seam sample seam. |
||
| real(kind=wp), | intent(in) | :: | dt_therm |
Effective thermo timestep (s) — |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | private | :: | idx_S | ||||
| integer, | private | :: | idx_T |
pure subroutine ice_compute_basal_flux(grid, eos, ms, ice, dt_therm) !! 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. type(hgrid_t), intent(in) :: grid type(eos_t), intent(in) :: eos type(multilayer_state_t), intent(in) :: ms !! READ-ONLY: SST/SSS are sampled here, never written. type(ocean_sea_ice_t), intent(inout) :: ice !! Writes ice%fb and the sst_seam/ssurf_seam/tfw_seam sample seam. real(wp), intent(in) :: dt_therm !! Effective thermo timestep (s) — `ocean_dyn_t%therm_dt(dt)`. integer :: idx_T, idx_S idx_T = ms%idx_temperature idx_S = ms%idx_salinity if (idx_T <= 0 .or. idx_S <= 0) return call ice_compute_basal_flux_impl(ms%tracers(idx_T)%hTr, ms%tracers(idx_S)%hTr, & ms%h_layer, ms%wet_mask, ice%m_ice, eos, & ice%fb, ice%sst_seam, ice%ssurf_seam, ice%tfw_seam, & dt_therm, grid%nghost, ice%ncat, ms%nz_ml, & grid%nx_total, grid%ny_total) end subroutine ice_compute_basal_flux