Hi there,
I’m trying to use TauPyModel to read in a self-customized model file in format of npz. Then I’d like to calculate the traveltimes of phases like PmP and Pn. But I encounter a problem that in npz file there’s no word to declare the specific depth for the Moho discontinuity as the nd file. It seems that fix_discontinuity_depths() could be used to set the specific discontinuities, but there’s no clear document that I can follow. Could you help me with this? Thanks in advance!
Example code:
from obspy.taup.taup_create import build_taup_model
from obspy.taup import TauPyModel
build_taup_model(“self.tvel”, output_folder=“./”) ## self.tvel is a readable and self-customized velocity file, and this command is used to convert the velocity file from tvel format into npz format.
First 10 lines in self.tvel look like:
Modified IASPEI91 model
layered crust model
0.000 4.6290 2.6590 2.2513
2.000 4.6290 2.6590 2.2513
2.000 5.0840 2.9130 2.3969
4.000 5.0840 2.9130 2.3969
4.000 5.3960 3.0830 2.4967
6.000 5.3960 3.0830 2.4967
6.000 5.6520 3.2170 2.5786
8.000 5.6520 3.2170 2.5786
model = TauPyModel(“Layers.npz”)
model.model.moho_depth = 50.0 ## I use this to set the Moho discontinuity, but it doesn’t work…
model.model.s_mod.v_mod.fix_discontinuity_depths() ## It seems this command could help me reset the Moho discontinuity, but I don’t know how to deal with it.