invert4geom.DatasetAccessorInvert4Geom.forward_gravity#
- DatasetAccessorInvert4Geom.forward_gravity(layer, name='forward_gravity', field='g_z', progressbar=False, **kwargs)[source]#
Calculate the forward gravity of the model at each point of the gravity grid. Add the calculated gravity effect as a new dataset variable.
- Parameters:
layer (xarray.Dataset) โ a prism or tesseroid layer
name (str, optional) โ Name to assigned the variable for the calculated gravity, by default โforward_gravityโ
field (str, optional) โ Choose which gravitational field to be calculated, by default โg_zโ which is the downward acceleration.
progressbar (bool, optional) โ Display a progress bar of the calculation, by default False
kwargs (Any) โ Additional keyword arguments to pass to
harmonica.DatasetAccessorPrismLayer.gravityorharmonica.DatasetAccessorTesseroidLayer.gravitydepending on the model type.
- Return type: