harmonica.tesseroid_layer

harmonica.tesseroid_layer#

harmonica.tesseroid_layer(coordinates, surface, reference, properties=None)[source]#

Create a layer of tesseroids of equal size

Parameters:
coordinatestuple

List containing the coordinates of the centers of the tesseroids in spherical coordinates in the following order longitude and latitude.

surface2d-array

Array used to create the uppermost boundary of the tesserois layer. All radii should be in meters. On every point where surface is below reference, the surface value will be used to set the bottom boundary of that tesseroid, while the reference value will be used to set the top boundary of the tesseroid.

reference2d-array or float

Reference surface used to create the lowermost boundary of the tesseroids layer. It can be either a plane or an irregular surface passed as 2d array. Radii must be in meters.

propertiesdict or None

Dictionary containing the physical properties of the tesseroids. The keys must be strings that will be used to name the corresponding data_var inside the xarray.Dataset, while the values must be 2d-arrays. All physical properties must be passed in SI units. If None, no data_var will be added to the xarray.Dataset. Default is None.

Returns:
datasetxarray.Dataset

Dataset containing the coordinates of the center of each tesseroid, the height of its top and bottom boundaries ans its corresponding physical properties.

See also

harmonica.DatasetAccessorsTesseroidLayer

Examples using harmonica.tesseroid_layer#

Layer of tesseroids

Layer of tesseroids