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

Error: running QSSP with CRUST2 #22

Closed
hvasbath opened this issue Dec 25, 2018 · 4 comments
Closed

Error: running QSSP with CRUST2 #22

hvasbath opened this issue Dec 25, 2018 · 4 comments

Comments

@hvasbath
Copy link
Owner

Transferred from personal mail from @fangjinSGG
When I calculate seismic GF functions replacing the crust from the ak135 earth model with crust from the crust2 model based on QSSP backend, an error called "STOP Error: earth radius smaller than pre-defined! statement executed" is thrown out. I have no idea why it happened. The page (e359b98#diff-0a7529cc0f3035dcda0414a3cb4d0b06R1569) says that you have changed the qssp version to '2010beta' from '2010'. But I can't find the qssp2010beta version.

@hvasbath
Copy link
Owner Author

Thank you for reporting the issue!
Please copy and paste a full error traceback otherwise it will be hard to help you.
The QSSP commit is very old and has been reversed later. Please use the QSSP package here: https://github.com/pyrocko/fomosto-qssp

How did you enable the CRUST2.0 model? Setting the flag or did you modify it by hand? Did you try to run the tutorial or is it you own setup?
You may also attach or copy paste your config file part under seismic_config so that I can inspect it.

@fangjinSGG
Copy link

Thanks a lot for your reply!
I am exactly using the qssp2010 version now. I just try to run the tutorial and set the variable 'use_crust2' to true. The config file part under seismic_config is as follows:

seismic_config: !beat.SeismicConfig
datadir: /data3/jfang/My_beat/Laquila
noise_estimator: !beat.SeismicNoiseAnalyserConfig
structure: non-toeplitz
pre_arrival_time: 10.0
pre_stack_cut: true
station_corrections: true
waveforms:

  • !beat.WaveformFitConfig
    include: true
    preprocess_data: true
    name: any_P
    channels: [Z]
    filterer: !beat.heart.Filter
    lower_corner: 0.001
    upper_corner: 0.1
    order: 4
    distances: [30.0, 90.0]
    interpolation: multilinear
    arrival_taper: !beat.heart.ArrivalTaper
    a: -15.0
    b: -10.0
    c: 40.0
    d: 55.0
    dataset_specific_residual_noise_estimation: false
    gf_config: !beat.SeismicGFConfig
    store_superdir: /data3/jfang/BEATS/GF
    reference_model_idx: 0
    n_variations: [0, 1]
    earth_model_name: ak135-f-continental.m
    nworkers: 4
    use_crust2: true
    replace_water: true
    source_depth_min: 0.0
    source_depth_max: 30.0
    source_depth_spacing: 4.0
    source_distance_radius: 50.0
    source_distance_spacing: 4.0
    error_depth: 0.1
    error_velocities: 0.1
    depth_limit_variation: 600.0
    code: qssp
    sample_rate: 0.5
    rm_gfs: false

The error tracebacks are as follows now:
config - INFO All parameter-priors ok!
config - INFO All hyper-parameters ok!
config - INFO All hierarchical-parameters ok!
beat - INFO Creating Green's Function stores individually for each station!
heart - INFO Using crust2 profile
heart - INFO Station TSUM
heart - INFO ---------------------
heart - INFO Creating Store at /data3/jfang/BEATS/GF/TSUM_ak135_0.500Hz_0
heart - INFO Using crust2 profile
heart - INFO Filling store ...
pyrocko.gf.store - INFO making travel time table for phasegroup "any_P"
pyrocko.spit - INFO at level 0: 100.0% covered, 1 cell
pyrocko.fomosto.qssp - INFO Starting step 1 / 2, block 1 / 8
pyrocko.fomosto.qssp - INFO Starting step 1 / 2, block 2 / 8
pyrocko.fomosto.qssp - INFO Starting step 1 / 2, block 3 / 8
pyrocko.fomosto.qssp - INFO Starting step 1 / 2, block 4 / 8
pyrocko.fomosto.qssp - WARNING qssp emitted something via stderr:

STOP Error: earth radius smaller than pre-defined!
pyrocko.fomosto.qssp - WARNING qssp emitted something via stderr:

STOP Error: earth radius smaller than pre-defined!

pyrocko.fomosto.qssp - WARNING qssp emitted something via stderr:

STOP Error: earth radius smaller than pre-defined!
pyrocko.fomosto.qssp - WARNING qssp emitted something via stderr:

STOP Error: earth radius smaller than pre-defined!

pyrocko.fomosto.qssp - INFO Done with step 1 / 2, block 2 / 8, wallclock time: 0 s
pyrocko.fomosto.qssp - INFO Done with step 1 / 2, block 4 / 8, wallclock time: 0 s
pyrocko.fomosto.qssp - INFO Done with step 1 / 2, block 1 / 8, wallclock time: 0 s
pyrocko.fomosto.qssp - INFO Done with step 1 / 2, block 3 / 8, wallclock time: 0 s
pyrocko.fomosto.qssp - INFO Starting step 1 / 2, block 5 / 8
pyrocko.fomosto.qssp - INFO Starting step 1 / 2, block 6 / 8
pyrocko.fomosto.qssp - INFO Starting step 1 / 2, block 7 / 8
pyrocko.fomosto.qssp - INFO Starting step 1 / 2, block 8 / 8
pyrocko.fomosto.qssp - WARNING qssp emitted something via stderr:

STOP Error: earth radius smaller than pre-defined!

pyrocko.fomosto.qssp - WARNING qssp emitted something via stderr:

STOP Error: earth radius smaller than pre-defined!

pyrocko.fomosto.qssp - WARNING qssp emitted something via stderr:

STOP Error: earth radius smaller than pre-defined!

pyrocko.fomosto.qssp - INFO Done with step 1 / 2, block 7 / 8, wallclock time: 0 s
pyrocko.fomosto.qssp - INFO Done with step 1 / 2, block 6 / 8, wallclock time: 0 s
pyrocko.fomosto.qssp - INFO Done with step 1 / 2, block 5 / 8, wallclock time: 0 s
pyrocko.fomosto.qssp - WARNING qssp emitted something via stderr:

STOP Error: earth radius smaller than pre-defined!

pyrocko.fomosto.qssp - INFO Done with step 1 / 2, block 8 / 8, wallclock time: 1 s
pyrocko.fomosto.qssp - INFO Starting step 2 / 2, block 1 / 8
pyrocko.fomosto.qssp - INFO Starting step 2 / 2, block 2 / 8
pyrocko.fomosto.qssp - INFO Starting step 2 / 2, block 3 / 8
pyrocko.fomosto.qssp - INFO Starting step 2 / 2, block 4 / 8
pyrocko.fomosto.qssp - WARNING qssp emitted something via stderr:

STOP Error: earth radius smaller than pre-defined!

pyrocko.fomosto.qssp - WARNING qssp emitted something via stderr:

STOP Error: earth radius smaller than pre-defined!

pyrocko.fomosto.qssp - WARNING qssp emitted something via stderr:

STOP Error: earth radius smaller than pre-defined!

pyrocko.fomosto.qssp - WARNING qssp emitted something via stderr:

STOP Error: earth radius smaller than pre-defined!

Traceback (most recent call last):
Traceback (most recent call last):
Traceback (most recent call last):
Traceback (most recent call last):
File "/data3/jfang/.anaconda3/lib/python3.7/site-packages/pyrocko/parimap.py", line 26, in worker
res = function(*args, **kwargs)
File "/data3/jfang/.anaconda3/lib/python3.7/site-packages/pyrocko/parimap.py", line 26, in worker
res = function(*args, **kwargs)
File "/data3/jfang/.anaconda3/lib/python3.7/site-packages/pyrocko/gf/builder.py", line 85, in __work_block
builder.work_block(iblock)
File "/data3/jfang/.anaconda3/lib/python3.7/site-packages/pyrocko/fomosto/qssp.py", line 718, in work_block
rawtraces = runner.get_traces()
File "/data3/jfang/.anaconda3/lib/python3.7/site-packages/pyrocko/fomosto/qssp.py", line 542, in get_traces
data = num.loadtxt(fn, skiprows=1, dtype=num.float)
File "/data3/jfang/.anaconda3/lib/python3.7/site-packages/pyrocko/gf/builder.py", line 85, in __work_block
builder.work_block(iblock)
File "/data3/jfang/.anaconda3/lib/python3.7/site-packages/numpy/lib/npyio.py", line 926, in loadtxt
fh = np.lib._datasource.open(fname, 'rt', encoding=encoding)
File "/data3/jfang/.anaconda3/lib/python3.7/site-packages/pyrocko/fomosto/qssp.py", line 718, in work_block
rawtraces = runner.get_traces()
File "/data3/jfang/.anaconda3/lib/python3.7/site-packages/numpy/lib/_datasource.py", line 262, in open
return ds.open(path, mode, encoding=encoding, newline=newline)
File "/data3/jfang/.anaconda3/lib/python3.7/site-packages/pyrocko/fomosto/qssp.py", line 542, in get_traces
data = num.loadtxt(fn, skiprows=1, dtype=num.float)
File "/data3/jfang/.anaconda3/lib/python3.7/site-packages/numpy/lib/_datasource.py", line 618, in open
raise IOError("%s not found." % path)
File "/data3/jfang/.anaconda3/lib/python3.7/site-packages/numpy/lib/npyio.py", line 926, in loadtxt
fh = np.lib._datasource.open(fname, 'rt', encoding=encoding)
File "/data3/jfang/.anaconda3/lib/python3.7/site-packages/numpy/lib/_datasource.py", line 262, in open
return ds.open(path, mode, encoding=encoding, newline=newline)
File "/data3/jfang/.anaconda3/lib/python3.7/site-packages/pyrocko/parimap.py", line 26, in worker
res = function(*args, **kwargs)
File "/data3/jfang/.anaconda3/lib/python3.7/site-packages/numpy/lib/_datasource.py", line 618, in open
raise IOError("%s not found." % path)
File "/data3/jfang/.anaconda3/lib/python3.7/site-packages/pyrocko/parimap.py", line 26, in worker
res = function(*args, **kwargs)
OSError: /tmp/qssprun-bkv0w6rj/receivers.ae not found.
File "/data3/jfang/.anaconda3/lib/python3.7/site-packages/pyrocko/gf/builder.py", line 85, in __work_block
builder.work_block(iblock)
File "/data3/jfang/.anaconda3/lib/python3.7/site-packages/pyrocko/gf/builder.py", line 85, in __work_block
builder.work_block(iblock)
File "/data3/jfang/.anaconda3/lib/python3.7/site-packages/pyrocko/fomosto/qssp.py", line 718, in work_block
rawtraces = runner.get_traces()
File "/data3/jfang/.anaconda3/lib/python3.7/site-packages/pyrocko/fomosto/qssp.py", line 718, in work_block
rawtraces = runner.get_traces()
OSError: /tmp/qssprun-xyaja8d6/receivers.ae not found.
File "/data3/jfang/.anaconda3/lib/python3.7/site-packages/pyrocko/fomosto/qssp.py", line 542, in get_traces
data = num.loadtxt(fn, skiprows=1, dtype=num.float)
File "/data3/jfang/.anaconda3/lib/python3.7/site-packages/pyrocko/fomosto/qssp.py", line 542, in get_traces
data = num.loadtxt(fn, skiprows=1, dtype=num.float)
File "/data3/jfang/.anaconda3/lib/python3.7/site-packages/numpy/lib/npyio.py", line 926, in loadtxt
fh = np.lib._datasource.open(fname, 'rt', encoding=encoding)
File "/data3/jfang/.anaconda3/lib/python3.7/site-packages/numpy/lib/npyio.py", line 926, in loadtxt
fh = np.lib._datasource.open(fname, 'rt', encoding=encoding)
File "/data3/jfang/.anaconda3/lib/python3.7/site-packages/numpy/lib/_datasource.py", line 262, in open
return ds.open(path, mode, encoding=encoding, newline=newline)
File "/data3/jfang/.anaconda3/lib/python3.7/site-packages/numpy/lib/_datasource.py", line 262, in open
return ds.open(path, mode, encoding=encoding, newline=newline)
File "/data3/jfang/.anaconda3/lib/python3.7/site-packages/numpy/lib/_datasource.py", line 618, in open
raise IOError("%s not found." % path)
File "/data3/jfang/.anaconda3/lib/python3.7/site-packages/numpy/lib/_datasource.py", line 618, in open
raise IOError("%s not found." % path)
OSError: /tmp/qssprun-859timg8/receivers.ae not found.
OSError: /tmp/qssprun-hl5q_ndz/receivers.ae not found.
Traceback (most recent call last):
File "/data3/jfang/.anaconda3/bin/beat", line 11, in
load_entry_point('beat==1.0rc1', 'console_scripts', 'beat')()
File "/data3/jfang/.anaconda3/lib/python3.7/site-packages/beat-1.0rc1-py3.7-linux-x86_64.egg/beat/apps/beat.py", line 1588, in main
globals()'command_' + command
File "/data3/jfang/.anaconda3/lib/python3.7/site-packages/beat-1.0rc1-py3.7-linux-x86_64.egg/beat/apps/beat.py", line 993, in command_build_gfs
force=options.force)
File "/data3/jfang/.anaconda3/lib/python3.7/site-packages/beat-1.0rc1-py3.7-linux-x86_64.egg/beat/heart.py", line 1664, in seis_construct_gf
store_dir, nworkers=sf.nworkers, force=force)
File "/data3/jfang/.anaconda3/lib/python3.7/site-packages/pyrocko/fomosto/qssp.py", line 890, in build
step=step, iblock=iblock)
File "/data3/jfang/.anaconda3/lib/python3.7/site-packages/pyrocko/gf/builder.py", line 166, in build
Interrupted, store.StoreError)):
File "/data3/jfang/.anaconda3/lib/python3.7/site-packages/pyrocko/parimap.py", line 136, in parimap
raise exc
OSError: /tmp/qssprun-xyaja8d6/receivers.ae not found.

It seems that the config file under $GF_path isn't the same as the input file in qssp2010 example. The former velocity model is only to a depth of 2892 km, but the latter one is up to the depth of 6371 km. I wonder whether this is the fatal problem.
Thank you!

@hvasbath
Copy link
Owner Author

hvasbath commented Dec 26, 2018

This was indeed a problem in the code. If QSSP is being used always the full velocity model needs to be specified from surface to centre of the earth. THis is fixed now in this commit: 9b54b73. Please update to the latest master
I tested it locally and it should also be working on your computer. Let me know in case you have problems! Good luck!

@fangjinSGG
Copy link

Thank you! It does work now.

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

No branches or pull requests

2 participants