File "/opt/openquake/lib/python3/dist-packages/openquake/hazardlib/scalerel/wc1994.py", line 40, in get_median_area assert rake is None or -180 <= rake <= 180 AssertionError:

43 views
Skip to first unread message

Jian Ma

unread,
Jan 13, 2021, 12:55:30 AM1/13/21
to OpenQuake Users
Dear Developer,

When I do the classical PSHA on the development version of 3.11

There is a problem as follow:

Can you give me any suggestions to fix this problem?

[2021-01-13 02:08:51.98 #43 CRITICAL] Traceback (most recent call last):
  File "/opt/openquake/lib/python3/dist-packages/openquake/engine/engine.py", line 309, in run_calc
    calc.run(exports=exports, **kw)
  File "/opt/openquake/lib/python3/dist-packages/openquake/calculators/base.py", line 243, in run
    self.result = self.execute()
  File "/opt/openquake/lib/python3/dist-packages/openquake/calculators/classical.py", line 408, in execute
    acc = smap.reduce(self.agg_dicts, acc0)
  File "/opt/openquake/lib/python3/dist-packages/openquake/baselib/parallel.py", line 820, in reduce
    return self.submit_all().reduce(agg, acc)
  File "/opt/openquake/lib/python3/dist-packages/openquake/baselib/parallel.py", line 588, in reduce
    for result in self:
  File "/opt/openquake/lib/python3/dist-packages/openquake/baselib/parallel.py", line 577, in __iter__
    yield from self._iter()
  File "/opt/openquake/lib/python3/dist-packages/openquake/baselib/parallel.py", line 548, in _iter
    val = result.get()
  File "/opt/openquake/lib/python3/dist-packages/openquake/baselib/parallel.py", line 399, in get
    raise etype(msg)
AssertionError: 
  File "/opt/openquake/lib/python3/dist-packages/openquake/baselib/parallel.py", line 418, in new
    val = func(*args)
  File "/opt/openquake/lib/python3/dist-packages/openquake/baselib/parallel.py", line 486, in gen
    yield func(*args)
  File "/opt/openquake/lib/python3/dist-packages/openquake/calculators/classical.py", line 220, in classical
    return hazclassical(srcs, srcfilter, rlzs_by_gsim, params, monitor)
  File "/opt/openquake/lib/python3/dist-packages/openquake/hazardlib/calc/hazard_curve.py", line 113, in classical
    pmap, rup_data, calc_times = PmapMaker(cmaker, src_filter, group).make()
  File "/opt/openquake/lib/python3/dist-packages/openquake/hazardlib/contexts.py", line 650, in make
    pmap = self._make_src_indep()
  File "/opt/openquake/lib/python3/dist-packages/openquake/hazardlib/contexts.py", line 602, in _make_src_indep
    self._update_pmap(self._gen_ctxs(rups, sites, src.id))
  File "/opt/openquake/lib/python3/dist-packages/openquake/hazardlib/contexts.py", line 565, in _update_pmap
    ctxs, self.maxsites, lambda ctx: len(ctx.sids)):
  File "/opt/openquake/lib/python3/dist-packages/openquake/baselib/general.py", line 235, in block_splitter
    for item in sorted(items, key=weight, reverse=True) if sort else items:
  File "/opt/openquake/lib/python3/dist-packages/openquake/hazardlib/contexts.py", line 586, in _gen_ctxs
    for ctx in ctxs:
  File "/opt/openquake/lib/python3/dist-packages/openquake/hazardlib/contexts.py", line 396, in gen_ctxs
    for rup in ruptures:
  File "/opt/openquake/lib/python3/dist-packages/openquake/hazardlib/contexts.py", line 668, in _gen_rups
    for ar in src.avg_ruptures():
  File "/opt/openquake/lib/python3/dist-packages/openquake/hazardlib/source/point.py", line 237, in avg_ruptures
    surface, nhc = self._get_rupture_surface(mag, np, hc)
  File "/opt/openquake/lib/python3/dist-packages/openquake/hazardlib/source/point.py", line 288, in _get_rupture_surface
    self, mag, nodal_plane.rake, nodal_plane.dip)
  File "/opt/openquake/lib/python3/dist-packages/openquake/hazardlib/source/point.py", line 62, in _get_rupture_dimensions
    area = src.magnitude_scaling_relationship.get_median_area(mag, rake)
  File "/opt/openquake/lib/python3/dist-packages/openquake/hazardlib/scalerel/wc1994.py", line 40, in get_median_area
    assert rake is None or -180 <= rake <= 180
AssertionError: 


Michele Simionato

unread,
Jan 13, 2021, 8:32:08 AM1/13/21
to OpenQuake Users
Can you upgrade to the latest commit in master?
Then in the error message you will see the value of the rake angle.
I bet it is a rounding error and that you have a rake of 180.0000001 or
something like that.

                   Michele

bnum...@gmail.com

unread,
Jan 13, 2021, 8:39:43 AM1/13/21
to openqua...@googlegroups.com, OpenQuake Users
Thanks Michele.
I have a rake of 180.0
Jian MA
Ph.D Candidate
Academy of Disaster Reduction and Emergency Management, Ministry of Civil Affairs & Ministry of Education
Beijing Normal University
(86)188-1157-3353
mailto:albe...@bnu.mai.cn
mailto:bnum...@gmail.com
--
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/tocgSbNOzo0/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/f4dfec9d-79c4-4edb-86fc-d8c76e7a04e9n%40googlegroups.com.

Jian Ma

unread,
Jan 13, 2021, 8:41:38 AM1/13/21
to openqua...@googlegroups.com
Can you tell me how to upgrade to the latest commit in master  ?
Jian MA
Ph.D Candidate
Academy of Disaster Reduction and Emergency Management, Ministry of Emergency Management & Ministry of Education
Beijing Normal University
(86)188-1157-3353


Michele Simionato <mic...@openquake.org> 于2021年1月13日周三 下午9:32写道:

Michele Simionato

unread,
Jan 13, 2021, 9:47:12 AM1/13/21
to OpenQuake Users
Insid your clone just do a

$ git pull origin master

   Michele

Reply all
Reply to author
Forward
0 new messages