geost.models.model_array.ModelDataArray.most_common#

ModelDataArray.most_common(return_thickness=False) → DataArray | Dataset[source]#

Determine the “most common” value and corresponding thickness in a voxelmodel or a layermodel. In a voxelmodel, this calculates the mode (most frequently occurring value) along the depth (z) dimension for each horizontal location (x, y) in the model. In a layermodel, it identifies the layer with the maximum thickness at each x,y-location and returns the corresponding value and most common layer name.

Parameters:

return_thickness (bool, optional) – If True, also return the thickness of the most common value. The default is False. Note that a layermodel that already has a thickness variable will return a duplicate thickness variable if this is set to True.

Returns:

  • For a voxelmodel: xarray.DataArray (x, y) with the most common value for

each x,y-location. If return_thickness is True, returns an xarray.Dataset (x, y) with data variables “most_common” and “thickness”. - For a layermodel: xarray.Dataset (x, y) with a “most_common” variable that contains the value of the most common layer and a “most_common_layer” variable that contains the name of the most common layer at each x,y-location.

Return type:

xr.DataArray | xr.Dataset