Problem building velocity model ak135f

Hello everyone!
This is my very first topic in this forum.
Here is the issue : I need to use the model ak135f to calculate the travel times. To this end, I need to build a file with the extension .npz. I have found in the internal directory of the obspy :
obspy/taup/data/
the number of files containing different models, among them the file
ak135f.nd
of which I show here the first few lines:
0.00 1.4500 0.0000 1.0200 57822.00 0.00
3.00 1.4500 0.0000 1.0200 57822.00 0.00
3.00 1.6500 1.0000 2.0000 163.35 80.00
3.30 1.6500 1.0000 2.0000 163.35 80.00
3.30 5.8000 3.2000 2.6000 1478.30 599.99
10.00 5.8000 3.2000 2.6000 1478.30 599.99
10.00 6.8000 3.9000 2.9200 1368.02 599.99
18.00 6.8000 3.9000 2.9200 1368.02 599.99
18.00 8.0355 4.4839 3.6410 950.50 394.62
43.00 8.0379 4.4856 3.5801 972.77 403.93
80.00 8.0400 4.4800 3.5020 1008.71 417.59
mantle
80.00 8.0450 4.4900 3.5020 182.03 75.60
120.00 8.0505 4.5000 3.4268 182.57 76.06
etc…
the key point for me is that the model contains a liquid outer layer.
And here is the issue : when trying to build the .npz file using the function
taup_create.build_taup_model
I get an error message :

SlownessModelError: Unable to handle zero S velocity layers at surface. This should be fixed at some point, but is a limitation of TauP at this point.

:slightly_frowning_face: I would greatly appreciate your help in resolving this issue.

For the moment, I have built .npz file in which I have set the S wave velocity for the liquid layer to be 0.0005. This allows me to build .npz and the function get_travel_times calculates the travel times.
If this is the only solution, is it a good one in your opinion? The difference between this modified ak135f and the one in which S waves velocity is exactly zero is negligible?

I thank everyone in advance for your help/comments/suggestions!
Best regards!

Hi,

hmm - yea that is a bit unfortunate but also not something that will be fixed anytime soon if nobody rises up to get it done as this would be a significant amount of work.

I think it’ll be probably fine, especially if you look at purely P waves phases. I’m not sure what happens if the final leg of the phase is S phase to be honest.

This package here might also have an answer for you: https://github.com/malcolmw/pykonal

But I have never used and don’t know if it can deal with your case.

Hello LionKrischer,
Thanks for your reply. In fact yes, I am interested only in P-waves. Well, if the issue is not fixed, I will use then this slightly fake ak135f :slight_smile:
Thank you also for suggesting this interesting pykonal package, I was not aware of it!
Best regards!

I’ll mark this topic solved, even though it was only solved with a hacky workaround… for work on a real fix, it should go in the github issue tracker.