PISM, A Parallel Ice Sheet Model  stable v2.1.1 committed by Constantine Khrulev on 2024-12-04 13:36:58 -0900

◆ relabel()

static void pism::ocean::relabel ( RelabelingType  type,
double  threshold,
array::Scalar mask 
)
static

Re-label components in a mask processed by label_connected_components.

If type is BY_AREA, the biggest one gets the value of 2, all the other ones 1, the background is set to zero.

If type is AREA_THRESHOLD, patches with areas above threshold get the value of 2, all the other ones 1, the background is set to zero.

Definition at line 188 of file PicoGeometry.cc.

References pism::array::Scalar::as_int(), BY_AREA, pism::ParallelSection::check(), pism::ParallelSection::failed(), pism::RuntimeError::formatted(), pism::GlobalSum(), pism::array::Array::grid(), pism::k, pism::array::max(), PISM_ERROR_LOCATION, and pism::array::Array::set().

Referenced by pism::ocean::PicoGeometry::compute_ice_rises(), and pism::ocean::PicoGeometry::compute_ocean_mask().