geost.models.model_array.ModelDataArray.get_top_bottom#
- ModelDataArray.get_top_bottom(condition: GeotopUnits | DataArray) Dataset[source]#
Derive the top and bottom depths at each x,y-location of a specified condition from a voxelmodel or layermodel. 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. The condition should have the same dimensions as the model.
- Returns:
xarray.Dataset containing “top” and “bottom” DataArrays for each horizontal x,y-location in the model.
- Return type:
xr.Dataset
Examples
Determine the top and bottom in a voxelmodel DataArray of stratigraphy where the stratigraphy equals 1100 or 1200:
>>> top_bottom = voxelmodel_strat.gst.get_top_bottom( ... voxelmodel_strat.isin([1100, 1200]) ... )
Or in a layermodel for a subset of units:
>>> top_bottom = layermodel.gst.get_top_bottom(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 top and bottom 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() >>> top_bottom = geotop_strat.gst.get_top_bottom( ... strat_units.select_description_contains("Formatie van Echteld") ... )