-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3D gravity inversion of prism layers #322
Comments
Just find this paper, that might give an idea of how to include different density contrast (maybe different geology) into the inversion. Haas et al 2020. https://academic.oup.com/gji/article/221/3/1896/5808816?login=true |
This would be very useful feature. There is some overlap with SimPEG here. Perhaps SimPEG inversion engine could be used and linked to Harmonica for forward model with prisms. I think @santisoler is looking at this in SimPEG at the moment to rework SimPEG gravity forward modeling. It would save reinventing a lot of inverse code that is already well used and supported. VPMG commercial code that does this style calls this a geometry inversion, VPMG also has the option to alternate 1 geometry iteration and one property (i.e density) iteration then back to geometry iteration etc to solve for both geometry and density. |
Hi @craigmillernz. Thanks for joining the conversation. I agree that we should make efforts to avoid overlaps with SimPEG. And you're right, I'm working on building some common ground for prism forward modelling between SimPEG and Harmonica. I'm looking forward to getting more awesome results. Nevertheless, I like the way that a geometry inversion could be built on top of Harmonica. SimPEG is mainly developed for inverting the physical properties of an already discretized space. I'm guessing that trying to implement something like the geometry inversion carried out by Uieda et al (2017) on top of the SimPEG framework could be challenging. But again, I don't mean to write a complete separate inversion framework in Harmonica just for that. Maybe we could start with specific inversion functions, like |
Thanks for pointing that out @LL-Geo, I'll look through it. |
Santi I like your idea of having a few specific inversions for common tasks, but it might end up with be a lot of duplicated code. What do you think are the benefits over having a generic |
I tend to agree with Matt that a more generic function with use cases might be better. I was really just wondering how easy it would be to couple the prisms discretization onto the simpeg inversion framework, You'll know best about that! If they aren't really compatible, then a separate inversion within Harmonica would be appropriate. |
Matt you might find this useful for general inversion theory - from UBC. This used to be a standalone website, but it looks like you now have to download. Follow the instructions on the page. |
Hi everyone, sorry for the lack of updates here! I've been struggling to implement regularization for a while and was wondering if anyone had ideas to help. I've added some smoothness regularization within the least-squares solver with a damping term (with verde.base.least_squares), which helps stabilize the inversion. But, I'd like to add some hard constraints into the regularization as well, which seems to be referred to as "smallness" regularization (as discussed here). There are a series of seismic constraints on the bathymetry depths which I would like to be unchanged (within error margins) after the inversion. Ideally, at each iteration, the correction value at these points would be 0, and the smoothness term will help ensure these constraint points don't turn into pedestals, as the unconstrained bathymetry surrounding them changes. Does anyone have ideas for how to implement this? Would it be within the least squares solver? I've tried to follow along with similar implementations in PyGIMLi, SimPEG, and the legacy Fatiando, but I've either only seen smoothness regularization, or I'm unable to understand how it's coded. Any help or suggestions would be appreciated! |
Hi @mdtanker. I'm glad you are getting into the rabbit hole of inversion, it's a fun one haha! The good news here is that you are already using some simple kind of smallness regularization. The The second term that involves the $$ \phi(\mathbf{m}) = \lVert \mathbf{d}\text{obs} - \mathbf{G} \mathbf{m} \rVert^2 + \alpha \lVert \mathbf{m} - \mathbf{m}\text{ref} \rVert^2 $$ Here's a nice chapter to get into these topics: https://pubs.geoscienceworld.org/books/book/2111/chapter-abstract/114879875/Inversion-for-Applied-Geophysics-A-Tutorial?redirectedFrom=fulltext The problem is that you won't be able to use the There are also some lecture notes from @leouieda and @birocoles. They have really nice stuff there, particularly if you need to implement this stuff: https://www.semanticscholar.org/paper/T%C3%B3picos-de-invers%C3%A3o-em-geof%C3%ADsica-OliveiraVanderlei-Leonardo/fd651157443f37ad603057a10d683322ff123263 |
Hi @mdtanker ,I came across your project on GitHub and I'm truly impressed by the remarkable feature you've been working on. Your research on 3D gravity inversion for modeling the bathymetry beneath a float ice shelf sounds fascinating. I'm particularly intrigued by your implementation of the vertical-prisms approach and the focus on geometry inversion to minimize the observed gravity misfit. I'm genuinely interested in learning from your implementation and gaining insights into the techniques you've employed. It would greatly benefit my own learning and allow me to explore potential areas for improvement.I would be grateful if you could kindly share the code you've already developed. Thank you (^▽^) |
Hi @WYJLCYWHZ. apologies for the slow reply. Thank you for your kind words on my work. The inversion code is included in my repository RIS_gravity_inversion, but it is written specifically for my use-case and is not very well documented or tested yet. In the coming months, I will work on making this inversion code more accessible and understandable for other users. I'll try and post updates in this thread or in a Fatiando discussion. Let me know if you have specific questions. |
Thank you very much (^▽^) |
Description of the desired feature:
I'm working on a 3D gravity inversion for my Ph.D. to model the bathymetry beneath a float ice shelf. I'm using a vertical-prisms approach, and I'm mostly interested in a geometry inversion, where each prism's density remains unchanged, but the prisms' tops or bottoms are updated to minimize the observed gravity - forward gravity misfit. While this inversion is in the early stages, I'm already using several
harmonica
tools so I think it would be great to include a fully supported inversion module in harmonica.Below is a description of my specific use case, a list of what I already have coded, and ideas for additional features to add.
Current state of inversion
Model setup
xarray.load_dataset()
to load netcdf's as gridspygmt.grdsample()
to make sure all grids' extents matchharmonica.prism_layer()
surface
= ice base,reference
= bathymetryprism_layer(... properties={'density':water_density)
pygmt.grdtrack()
to sample the lower grids values at the grid's prism locationsharmonica.prism_layer.gravity()
for each prism layerrun geometry inversion
active_layer
ex:active_layer='bathymetry_prisms'
surface_correction
active_layer
tops, as well as the bottoms of the layer aboveactive_layer
harmonica.DatasetAccessorPrismLayer.update_top_bottom()
scipy.sparse.linalg.lsqr()
This is just the method I already had implemented, suggest from my advisor, but I'm happy to alter this and would appreciate suggestions.
Features to add:
surface_correction
by a constraints grid* 0's at constraints, linearly increasing to 1's at a specified distance from nearest constraints
*
scipy.spatial.cKDTree.query()
to get grid of minimum distances to constraints*
gmt grdmath
LE and GE to set constraints to 0 and other points to 1*
gmt grdblend
to merge the clipped grids* and
rioxarray.interpolate_na()
to linearly interpolate between 0 and 1discretize.TreeMesh().
from SimPEG.Discussion
layers
, with a dictionary for each layer, which includes a .nc filename, a resolution, constant density values, and a dataframe and dataset for each layer. This makes it easy to apply functions to an arbitrary number of input layers (example below). If there's a better method for this let me know.discretize.TreeMesh().
for the buffer region. I'm unsure if I should be calculating misfit for the whole region or just the inside. Also, I'm not sure if I should invert the prisms just within the inside, or for the whole region.Are you willing to help implement and maintain this feature?
Yes I'm happy and excited to implement this, but I'm in the last year of my Ph.D. so the outcome of this inversion is more pressing than the implementation of the inversion into Harmonica. Hopefully they can happen simultaneously. @santisoler has suggested looking at both the old Fatiando module
fatiando.inversion
and some code related to Uieda and Barbosa 2016 for inspiration on how to implement this, which I will do.The text was updated successfully, but these errors were encountered: