Outer shim (outer-shim + flat-impl pattern): ms/eos are
accepted for call-site parity with the other thermo-cadence
kernels (ice_compute_basal_flux, ice_frazil_uptake) even
though this step reads its ocean-surface sample from the
ice%sst_seam/ssurf_seam/tfw_seam scratch (filled by
ice_compute_basal_flux earlier in the same window) rather
than re-deriving it from ms/eos directly — eos is unused
here but kept in the signature so a future revision that DOES
need a fresh EOS evaluation does not have to change every call
site.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(hgrid_t), | intent(in) | :: | grid | |||
| type(eos_t), | intent(in) | :: | eos | |||
| type(multilayer_state_t), | intent(in) | :: | ms | |||
| type(ocean_sea_ice_t), | intent(inout) | :: | ice | |||
| real(kind=wp), | intent(in) | :: | dt_therm |
Effective thermo timestep (s) — |
pure subroutine ice_thermo_driver_step(grid, eos, ms, ice, dt_therm) !! Outer shim (outer-shim + flat-impl pattern): `ms`/`eos` are !! accepted for call-site parity with the other thermo-cadence !! kernels (`ice_compute_basal_flux`, `ice_frazil_uptake`) even !! though this step reads its ocean-surface sample from the !! `ice%sst_seam`/`ssurf_seam`/`tfw_seam` scratch (filled by !! `ice_compute_basal_flux` earlier in the same window) rather !! than re-deriving it from `ms`/`eos` directly — `eos` is unused !! here but kept in the signature so a future revision that DOES !! need a fresh EOS evaluation does not have to change every call !! site. type(hgrid_t), intent(in) :: grid type(eos_t), intent(in) :: eos type(multilayer_state_t), intent(in) :: ms type(ocean_sea_ice_t), intent(inout) :: ice real(wp), intent(in) :: dt_therm !! Effective thermo timestep (s) — `ocean_dyn_t%therm_dt(dt)`. associate (unused => eos) end associate if (ice%ncat > 1) then call ice_fb_part_sum_fill_impl(ms%wet_mask, ice%part_size, ice%m_ice, ice%fb_part_sum, & grid%nghost, ice%ncat, grid%nx_total, grid%ny_total) end if if (ice%has_snowfall) then call ice_snow_part_ocn_fill_impl(ms%wet_mask, ice%part_size, ice%m_ice, & ice%snow_part_ocn, grid%nghost, ice%ncat, & grid%nx_total, grid%ny_total) end if call ice_thermo_columns(grid%nghost, grid%nx_total, grid%ny_total, & ice%ncat, ice%nk_ice, dt_therm, ice%snow_ice, ms%wet_mask, & ice%m_ice, ice%m_snow, ice%enth_ice, ice%enth_snow, & ice%sal_ice, ice%atm_sf0, ice%atm_dsfdt, ice%atm_sw_dn, & ice%atm_fprec, ice%tfw_seam, ice%fb, ice%sst_seam, & ice%ssurf_seam, ice%tsurf_out, ice%h2o_ocn_to_ice, & ice%h2o_ice_to_ocn, ice%heat_to_ocn, ice%sw_thru, & ice%snow_to_ice) if (ice%ncat == 1) then call ice_thermo_driver_reduce_impl(ms%wet_mask, ice%h2o_ocn_to_ice, & ice%h2o_ice_to_ocn, ice%heat_to_ocn, & ice%sw_thru, ice%ssurf_seam, ice%fb, & ice%heat_flux_diag, ice%sw_thru_diag, & ice%m_melt_diag, & ice%salt_flux_diag, dt_therm, grid%nghost, & ice%ncat, grid%nx_total, grid%ny_total) else call ice_thermo_driver_reduce_multicat_impl(ms%wet_mask, ice%part_size, & ice%h2o_ocn_to_ice, ice%h2o_ice_to_ocn, & ice%heat_to_ocn, ice%sw_thru, & ice%ssurf_seam, ice%fb, & ice%fb_part_sum, & ice%heat_flux_diag, ice%sw_thru_diag, & ice%m_melt_diag, & ice%salt_flux_diag, dt_therm, grid%nghost, & ice%ncat, grid%nx_total, grid%ny_total) end if end subroutine ice_thermo_driver_step