Check the consistency of tectonic region types between the gmpe_logic_tree file and the source model

Bug #1276055 reported by Michele Simionato
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenQuake Engine
Fix Released
Medium
Michele Simionato

Bug Description

An user of OATS had applyToTectonicRegionType="Continental Stable Crust" in the gmpe_logic_tree file and tectonicRegion="Stable Continental Crust" in the source model. This error should be flagged in the pre-execute phase, not during the computation.

Revision history for this message
Michele Simionato (michele-simionato) wrote :

This is the current traceback:

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/celery/execute/trace.py", line 47, in trace
    return cls(states.SUCCESS, retval=fun(*args, **kwargs))
  File "/usr/lib/python2.7/dist-packages/celery/app/task/__init__.py", line 247, in __call__
    return self.run(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/celery/app/__init__.py", line 175, in run
    return fun(*args, **kwargs)
  File "/home/ubuntu/oq-engine/openquake/engine/utils/tasks.py", line 130, in wrapped
    return task_func(*args)
  File "/home/ubuntu/oq-engine/openquake/engine/calculators/hazard/classical/core.py", line 78, in compute_hazard_curves
    gsim = gsims_by_rlz[rlz][rupture.tectonic_region_type]
KeyError: 'Stable Continental Crust'

Revision history for this message
Michele Simionato (michele-simionato) wrote :

Notice that due to recent changes the error above does not appear anymore. Instead, sources with a wrong tectonic region type are silently ignored, which may be even worse.

Revision history for this message
Michele Simionato (michele-simionato) wrote :

Due to other changes, now the error happens at the time when the realizations are generated,i.e. at the end of the computation. It must happen at the beginning instead. The fix is here: https://github.com/gem/oq-engine/pull/1476

Changed in oq-engine:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Michele Simionato (michele-simionato)
milestone: none → 1.0.1
Changed in oq-engine:
status: In Progress → Fix Committed
Changed in oq-engine:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.