ice_compute_basal_flux Subroutine

public 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.

Arguments

Type IntentOptional 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) — ocean_dyn_t%therm_dt(dt).


Calls

proc~~ice_compute_basal_flux~~CallsGraph proc~ice_compute_basal_flux ice_compute_basal_flux proc~ice_compute_basal_flux_impl ice_compute_basal_flux_impl proc~ice_compute_basal_flux->proc~ice_compute_basal_flux_impl local local proc~ice_compute_basal_flux_impl->local proc~eos_freezing_point eos_freezing_point proc~ice_compute_basal_flux_impl->proc~eos_freezing_point

Called by

proc~~ice_compute_basal_flux~~CalledByGraph proc~ice_compute_basal_flux ice_compute_basal_flux proc~engine_step_ice engine_step_ice proc~engine_step_ice->proc~ice_compute_basal_flux proc~driver_run_ocean driver_run_ocean proc~driver_run_ocean->proc~engine_step_ice proc~rdb_ocean_step rdb_ocean_step proc~rdb_ocean_step->proc~engine_step_ice proc~driver_run driver_run proc~driver_run->proc~driver_run_ocean

Variables

Type Visibility Attributes Name Initial
integer, private :: idx_S
integer, private :: idx_T

Source Code

   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