ice_snow_accumulate Subroutine

public pure subroutine ice_snow_accumulate(nk, m_lay, snow)

Snow source-term branch of ice_resize_SIS2 (SIS2_ice_thm.F90:1122): m_lay(0) = m_lay(0) + snow. The snow layer’s specific enthalpy enthalpy(0) is UNCHANGED by snowfall – SIS2 is explicit that this “should do nothing” (SIS_slow_thermo.F90:1032-1033) and books the implied energy against the atmosphere (enth_snowfall = snow*enthalpy(0) -> Enth_Mass_in_atm). Roundabout’s atmosphere is a prescribed slab with no energy budget to charge, so that bookkeeping is not ported – a documented v1 divergence (PLAN_PR26_snowfall.md, S3).

The SIS2 guard if (mtot_ice == 0.0) m_lay(0) = 0.0 (SIS2_ice_thm.F90:1121, needed because SIS2 gates its column on part_size > 0 and so can reach a category with zero ice mass) is deliberately NOT ported: ice_column_step’s caller only ever reaches this routine on a category that already passed the column’s own entry gate (m_ice > ICE_RHO_ICE*H_VANISHED, rdb_ice_column.F90), so mtot_ice > 0 always holds here. The ice-free share of the snowfall is routed to the ocean by rdb_ice_snow%ice_snowfall_ocean_share instead of being added as orphan snow (which would trip rdb_ice_transport’s fail-loud mca_snow > 0 where mca_ice <= 0 reduction).

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nk

Number of ice layers (declared first – decl-order).

real(kind=wp), intent(inout) :: m_lay(0:nk)

Layer masses (kg/m^2), 0 = snow, 1..nk = ice.

real(kind=wp), intent(in) :: snow

New snow mass this thermo window (kg/m^2), fprec*dt_therm. snowfall=0 => snow==0.0_wp => the guard below makes this call bit-identical to a no-op by inspection, not IEEE luck.


Called by

proc~~ice_snow_accumulate~~CalledByGraph proc~ice_snow_accumulate ice_snow_accumulate proc~ice_column_step ice_column_step proc~ice_column_step->proc~ice_snow_accumulate proc~ice_thermo_columns ice_thermo_columns proc~ice_thermo_columns->proc~ice_column_step proc~ice_thermo_driver_step ice_thermo_driver_step proc~ice_thermo_driver_step->proc~ice_thermo_columns proc~engine_step_ice engine_step_ice proc~engine_step_ice->proc~ice_thermo_driver_step 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

Source Code

   pure subroutine ice_snow_accumulate(nk, m_lay, snow)
      !! Snow source-term branch of `ice_resize_SIS2`
      !! (SIS2_ice_thm.F90:1122): `m_lay(0) = m_lay(0) + snow`. The
      !! snow layer's specific enthalpy `enthalpy(0)` is UNCHANGED by
      !! snowfall -- SIS2 is explicit that this "should do nothing"
      !! (SIS_slow_thermo.F90:1032-1033) and books the implied energy
      !! against the atmosphere (`enth_snowfall = snow*enthalpy(0)` ->
      !! `Enth_Mass_in_atm`). Roundabout's atmosphere is a prescribed slab
      !! with no energy budget to charge, so that bookkeeping is not
      !! ported -- a documented v1 divergence (PLAN_PR26_snowfall.md, S3).
      !!
      !! The SIS2 guard `if (mtot_ice == 0.0) m_lay(0) = 0.0`
      !! (SIS2_ice_thm.F90:1121, needed because SIS2 gates its column on
      !! `part_size > 0` and so can reach a category with zero ice mass)
      !! is deliberately NOT ported: `ice_column_step`'s caller only
      !! ever reaches this routine on a category that already passed
      !! the column's own entry gate (`m_ice > ICE_RHO_ICE*H_VANISHED`,
      !! `rdb_ice_column.F90`), so `mtot_ice > 0` always holds here. The
      !! ice-free share of the snowfall is routed to the ocean by
      !! `rdb_ice_snow%ice_snowfall_ocean_share` instead of being added
      !! as orphan snow (which would trip `rdb_ice_transport`'s
      !! fail-loud `mca_snow > 0` where `mca_ice <= 0` reduction).
      !$acc routine seq
      integer, intent(in) :: nk
         !! Number of ice layers (declared first -- decl-order).
      real(wp), intent(inout) :: m_lay(0:nk)
         !! Layer masses (kg/m^2), 0 = snow, 1..nk = ice.
      real(wp), intent(in) :: snow
         !! New snow mass this thermo window (kg/m^2), `fprec*dt_therm`.
         !! `snowfall=0` => `snow==0.0_wp` => the guard below makes this
         !! call bit-identical to a no-op by inspection, not IEEE luck.

      if (snow /= 0.0_wp) then
         m_lay(0) = m_lay(0) + snow
      end if
   end subroutine ice_snow_accumulate