Skip to content
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

Export velocity model #50

Open
sstaehler opened this issue Mar 8, 2017 · 3 comments
Open

Export velocity model #50

sstaehler opened this issue Mar 8, 2017 · 3 comments

Comments

@sstaehler
Copy link
Collaborator

Feature proposal:

  • a routine to export the velocity model
  • preferably with a direct route to create a TauPyModel object in obspy from it.

Does anyone else think, it's a good idea? Should be pretty straightforward, and I can implement it in the next weeks.

@krischer
Copy link
Owner

krischer commented Mar 8, 2017

Great idea!

If you want a direct path to ObsPy you have to generate this object here: https://github.com/obspy/obspy/blob/master/obspy/taup/velocity_model.py#L18

Otherwise you could also generate one of the supported text file format and then just use TauPCreate. Might be a bit more generically useful.

A side note: There is actually no proper 1D model handling in ObsPy and that would be very nice to have. So if you want to take the time to cook up something more generic please open an issue on the obspy github to discuss it :)

@martinvandriel
Copy link
Collaborator

How would you do it? Assume it's a 1D model? We do not strictly assume this anywhere yet but in principle allow for lateral variations in the AxiSEM run. Hence we also store the model on the mesh and not as a 1D model in the databases.

Of course, the 1D modelname is readily in the file and could be used with the 1D model class from the salvus mesher to do a bunch of stuff (but not yet writing to other file formats).

@sstaehler
Copy link
Collaborator Author

Well, the simplemost solution would be to traverse along the axis, read out the velocities of all points there and create a reasonable parameterisation from it.

I would very much like it to work with arbitrary models, esp. ones that are not the Earth...

Of course, if the user has enabled lateral variations, traversing the axis will not work. I would probably add a flag to the output file whether lateral variation had been switched on and throw an exception then. Another solution would be to use the median of all elements in depth range (d + Deltad), but that's not fool proof either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants