ice_adjust_categories Subroutine

public pure subroutine ice_adjust_categories(grid, ms, ice)

Outer shim (outer-shim + flat-impl pattern). No-op when the ice slot is not live (is_init gate) or when ice%ncat == 1 (the legacy-mode bit-identity contract — see module docstring). No dt/eos needed: this is a pure area/mass reshuffle, no thermodynamics.

Arguments

Type IntentOptional Attributes Name
type(hgrid_t), intent(in) :: grid
type(multilayer_state_t), intent(in) :: ms

READ-ONLY: only wet_mask is read (the gate).

type(ocean_sea_ice_t), intent(inout) :: ice

Calls

proc~~ice_adjust_categories~~CallsGraph proc~ice_adjust_categories ice_adjust_categories proc~ice_adjust_categories_impl ice_adjust_categories_impl proc~ice_adjust_categories->proc~ice_adjust_categories_impl local local proc~ice_adjust_categories_impl->local

Called by

proc~~ice_adjust_categories~~CalledByGraph proc~ice_adjust_categories ice_adjust_categories proc~engine_step_ice engine_step_ice proc~engine_step_ice->proc~ice_adjust_categories proc~ice_transport_step ice_transport_step proc~engine_step_ice->proc~ice_transport_step proc~ice_transport_step->proc~ice_adjust_categories 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

Source Code

   pure subroutine ice_adjust_categories(grid, ms, ice)
      !! Outer shim (outer-shim + flat-impl pattern). No-op when the ice
      !! slot is not live (`is_init` gate) or when `ice%ncat == 1` (the
      !! legacy-mode bit-identity contract — see module docstring). No
      !! `dt`/`eos` needed: this is a pure area/mass reshuffle, no
      !! thermodynamics.
      type(hgrid_t), intent(in) :: grid
      type(multilayer_state_t), intent(in) :: ms
         !! READ-ONLY: only `wet_mask` is read (the gate).
      type(ocean_sea_ice_t), intent(inout) :: ice

      if (.not. ice%is_init) return
      if (ice%ncat == 1) return

      call ice_adjust_categories_impl(ms%wet_mask, ice%part_size, ice%m_ice, ice%m_snow, &
                                      ice%enth_ice, ice%enth_snow, ice%sal_ice, ice%mh_lim, &
                                      grid%nghost, ice%ncat, ice%nk_ice, &
                                      grid%nx_total, grid%ny_total)
   end subroutine ice_adjust_categories