Occurrence Rates Error

25 views
Skip to first unread message

francisj...@gmail.com

unread,
Jan 19, 2021, 9:35:47 AMJan 19
to OpenQuake Users
Good day, OQ Community!

I would like to ask for your help in trying to find out what exactly is causing the error here. 

For some reason, it raises the error for negative occurrence rates in the MFDs but the minMag and maxMag seem to be fine,

Below is the traceback log:

Traceback (most recent call last):

File "c:\program files\openquake engine\python3.6\lib\site-packages\openquake\engine\engine.py", line 346, in run_calc

calc.run(exports=exports, **kw)

File "c:\program files\openquake engine\python3.6\lib\site-packages\openquake\calculators\base.py", line 252, in run

self.result = self.execute()

File "c:\program files\openquake engine\python3.6\lib\site-packages\openquake\calculators\classical.py", line 373, in execute

acc = smap.reduce(self.agg_dicts, acc0)

File "c:\program files\openquake engine\python3.6\lib\site-packages\openquake\baselib\parallel.py", line 825, in reduce

return self.submit_all().reduce(agg, acc)

File "c:\program files\openquake engine\python3.6\lib\site-packages\openquake\baselib\parallel.py", line 588, in reduce

for result in self:

File "c:\program files\openquake engine\python3.6\lib\site-packages\openquake\baselib\parallel.py", line 577, in __iter__

yield from self._iter()

File "c:\program files\openquake engine\python3.6\lib\site-packages\openquake\baselib\parallel.py", line 548, in _iter

val = result.get()

File "c:\program files\openquake engine\python3.6\lib\site-packages\openquake\baselib\parallel.py", line 399, in get

raise etype(msg)

ValueError:

File "c:\program files\openquake engine\python3.6\lib\site-packages\openquake\baselib\parallel.py", line 418, in new

val = func(*args)

File "c:\program files\openquake engine\python3.6\lib\site-packages\openquake\calculators\classical.py", line 122, in classical_split_filter

yield classical(blocks[-1], srcfilter, gsims, params, monitor)

File "c:\program files\openquake engine\python3.6\lib\site-packages\openquake\hazardlib\calc\hazard_curve.py", line 112, in classical

cmaker, src_filter, group).make()

File "c:\program files\openquake engine\python3.6\lib\site-packages\openquake\hazardlib\contexts.py", line 619, in make

pmap = self._make_src_indep()

File "c:\program files\openquake engine\python3.6\lib\site-packages\openquake\hazardlib\contexts.py", line 565, in _make_src_indep

rups = self._get_rups(srcs, sites)

File "c:\program files\openquake engine\python3.6\lib\site-packages\openquake\hazardlib\contexts.py", line 684, in _get_rups

_add(self._ruptures(src), sites)

File "c:\program files\openquake engine\python3.6\lib\site-packages\openquake\hazardlib\contexts.py", line 539, in _ruptures

shift_hypo=self.shift_hypo, mag=filtermag))

File "c:\program files\openquake engine\python3.6\lib\site-packages\openquake\hazardlib\source\point.py", line 178, in iter_ruptures

self.temporal_occurrence_model)

File "c:\program files\openquake engine\python3.6\lib\site-packages\openquake\hazardlib\source\rupture.py", line 348, in __init__

raise ValueError('occurrence rate must be positive')

ValueError: occurrence rate must be positive


Attached is the source model and logic tree for my sample run.

Your help and feedback will be greatly appreciated.

Best regards,

Francis
Source_Model_01.xml
sourcelogic.xml

Marco Pagani

unread,
Jan 19, 2021, 2:31:14 PMJan 19
to OpenQuake Users

Look at line 578 of your source model.
Marco


--
You received this message because you are subscribed to the Google Groups "OpenQuake Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openquake-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openquake-users/64750be3-52bf-4ba4-9f15-eb8a67498c1en%40googlegroups.com.

MARCO PAGANI | Seismic Hazard Team Lead | Skype mm.pagani | +39-0382-5169863
GLOBAL EARTHQUAKE MODEL | working together to assess risk

Peter Pažák

unread,
Jan 20, 2021, 12:45:38 AMJan 20
to OpenQuake Users
I thought the brances with zero probability would be just skipped, but it turns out you need to remove them, otherwise multiplying by 0 gives rate of 0.
So none of the rates is negative, but even 0 causes execution to stop...

Dátum: utorok 19. januára 2021, čas: 20:31:14 UTC+1, odosielateľ: Marco Pagani

Michele Simionato

unread,
Jan 20, 2021, 3:43:23 AMJan 20
to OpenQuake Users
I just made a fix: in future versions of the engine you will get an early error when reading the source model, see https://github.com/gem/oq-engine/issues/6475

      Michele

Francis Jenner Bernales

unread,
Jan 20, 2021, 4:14:42 AMJan 20
to openqua...@googlegroups.com
Thanks Marco for the advice.

I also have the same intuition, Peter. My thinking whenever there's a zero probability is it will be neglected during calc. So does this extend to logic tree branches as well, i.e. we should remove the branch instead of assigning zero weights? I usually do the latter just to avoid confusion and preserve continuity in the models we're using.

Thanks Michele for the fix. This would be great, because on my desktop PC, it takes about 5 mins before it raises the Occurrence Rates ValueError.

I hope you all stay safe and healthy.

Best regards,

Francis



You received this message because you are subscribed to a topic in the Google Groups "OpenQuake Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openquake-users/NE3uUIlKFbM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openquake-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openquake-users/e6f2a89a-d417-41bd-9627-744d179365d3n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages