invert4geom.create_model

Contents

invert4geom.create_model#

create_model(zref, density_contrast, topography, buffer_width=0, model_type='prisms', upper_confining_layer=None, lower_confining_layer=None)[source]#

Convert a topography grid into a model, which can be used as the starting model for an inversion. Choose between using prisms or tesseroids, and constraining the topography during the inversion with upper and lower confining layers.

Parameters:
  • zref (float) – The reference elevation to build prisms or tesseroids around. Model elements above this reference are assigned positive density contrasts while those below are assigned negative density contrasts. This value should be relative to the same reference frame as the upward variable in the topography Dataset (e.g., WGS84 ellipsoidal height, mean sea level, etc).

  • density_contrast (DataArray | float) – The density contrast to use for the prisms or tesseroids. This can be a constant value, or a DataArray with the same dimensions as the topography Dataset.

  • topography (Dataset) – A dataset with coordinates easting and northing (if using prisms) or longitude and latitude (if using tesseroids), as well as variables upward defining the topography (with same vertical reference as the gravity data, i.e. WGS84) in meters. For tesseroid models, the Dataset must also contain a geocentric_radius variable, which can be created using the Python package Boule. The variable upward is then assumed to be the ellipsoidal height, and the geocentric height is calculated as upward + geocentric_radius. The dataset can optionally contain a mask variable. Mask values of NaN won’t be altered during the inversion, while non-NaN (finite) mask values are free to change. If you don’t have a topography grid, you can create one with invert4geom.create_topography.

  • buffer_width (float) – The width in meters or decimal degrees of a buffer zone used to zoom-in on the provided data creating an inner region. This inner region will be used for plotting and calculating statistics, this avoids skewing plots and values by edge effects, by default is None.

  • model_type (str) – The type of model to create, either prisms or tesseroids, by default prisms.

  • upper_confining_layer (DataArray | None) – The upper confining layer for the model, should be elevations relative to the same reference frame as the upward variable in the topography Dataset, by default None

  • lower_confining_layer (DataArray | None) – The lower confining layer for the model, should be elevations relative to the same reference frame as the upward variable in the topography Dataset, by default None

Returns:

A dataset containing the variables associated with the prism / tesseroid layer (top, bottom, density) as well as variables topography, starting_topography, mask, upper_confining_layer, lower_confining_layer , and attributes model_type, dataset_type, zref, density_contrast, spacing, buffer_width, region, and inner_region.

Return type:

Dataset