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 theupwardvariable in thetopographyDataset (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 thetopographyDataset.topography (
Dataset) β A dataset with coordinateseastingandnorthing(if using prisms) orlongitudeandlatitude(if using tesseroids), as well as variablesupwarddefining the topography (with same vertical reference as the gravity data, i.e. WGS84) in meters. For tesseroid models, the Dataset must also contain ageocentric_radiusvariable, which can be created using the Python package Boule. The variableupwardis then assumed to be the ellipsoidal height, and the geocentric height is calculated asupward + geocentric_radius. The dataset can optionally contain amaskvariable. 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 withinvert4geom.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, eitherprismsortesseroids, by defaultprisms.upper_confining_layer (
DataArray|None) β The upper confining layer for the model, should be elevations relative to the same reference frame as theupwardvariable in thetopographyDataset, by default Nonelower_confining_layer (
DataArray|None) β The lower confining layer for the model, should be elevations relative to the same reference frame as theupwardvariable in thetopographyDataset, by default None
- Returns:
A dataset containing the variables associated with the prism / tesseroid layer (
top,bottom,density) as well as variablestopography,starting_topography,mask,upper_confining_layer,lower_confining_layer, and attributesmodel_type,dataset_type,zref,density_contrast,spacing,buffer_width,region, andinner_region.- Return type: