harmonica icon indicating copy to clipboard operation
harmonica copied to clipboard

Add function to create tesseroid layers

Open santisoler opened this issue 6 years ago • 2 comments

Description of the desired feature

A tesseroid layer could be defined as a collection of tesseroids sorted in a regular way within a region, whose longitudinal and latitudinal boundaries touch each other leaving no empty space in between nor overlapping each other. Tesseroids layers are very useful for gravity inversion (e.g. Moho inversion). So the function should allow us to modify the top and bottom boundaries of the tesseroid layer according to a given topography data or to a predicted radii by an inversion algorithm.

The tesseroid layer should be returned as an xarray object, what will ease the process of computing the forward model of the layer.

Are you willing to help implement and maintain this feature? Yes

santisoler avatar Jul 30 '19 14:07 santisoler

Hello @santisoler, Can I try this?

aguspesce avatar May 23 '22 17:05 aguspesce

Sure! Be my guest! Take a look at what we did for the prism layer. The tesseroid layer should be analogous to that one but defined in spherical coordinates.

The only corner case I can think of right now is that for tessseroids we would need to check if the longitude coordinates don't exceed a full turn around the globe and create overlapping tesseroids. Because the longitude coordinates will correspond to the center of the tesseroids, we need to check if the difference between the eastmost boundary and the westmost boundary is not larger than 360:

westmost = longitude[0] - longitude_spacing / 2
eastmost = longitude[-1] + longitude_spacing / 2

assert eastmost - westmost <= 360

This snippet is just to give an idea, feel free to implement it as you consider the best way.

A similar thing would happen for the latitude coordinate, we need to check that the southermost boundary is not lower than -90, and that the northernmost boundary is not larger than 90.

santisoler avatar May 23 '22 18:05 santisoler