geost.models.model_array.ModelDataArray.get_thickness#
- ModelDataArray.get_thickness(condition: GeotopUnits | DataArray) DataArray[source]#
Calculate the thickness where a voxelmodel or layermodel meets a specified condition. The condition can be a boolean DataArray or Dataset that indicates which voxels or layers to include in the thickness calculation.
- Parameters:
condition (GeotopUnits | xr.DataArray) – A boolean DataArray or Dataset indicating which voxels or layers to include in the thickness calculation. The condition should have the same dimensions as the model.
- Returns:
xarray.DataArray containing the calculated thickness for each horizontal x,y- location in the model.
- Return type:
xr.DataArray
Examples
Determine the thickness in a voxelmodel DataArray of stratigraphy where the stratigraphy equals 1100 or 1200:
>>> thickness = voxelmodel_strat.gst.get_thickness( ... voxelmodel_strat.isin([1100, 1200]) ... )
Or in a layermodel for a subset of units:
>>> thickness = layermodel.gst.get_thickness(layermodel["layer"].isin(["B", "D"]))
If you are working with GeoTOP, you can also use a
GeotopUnitsobject to specify the condition, for example to get the thickness of the “Formatie van Echteld” unit:>>> geotop_strat = geost.read_geotop_from_opendap( ... data_vars="strat", bbox=(110_000, 440_000, 120_000, 450_000) ... ) >>> strat_units = geost.bro.geotop_strat_units() >>> thickness = geotop_strat.gst.get_thickness( ... strat_units.select_description_contains("Formatie van Echteld") ... )