Imported GMFs cannot be re-exported
Bug #1375788 reported by
Michele Simionato
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenQuake Engine |
Fix Released
|
Critical
|
Michele Simionato |
Bug Description
$ openquake --load-gmf gmf_scenario.xml
<some output ID>
$ openquake --eg <ID> /tmp
...
File "/home/
for gmf in gmf_set:
File "/home/
curs, output.gmf.id, imt, sa_period, sa_damping):
File "/home/
yield site_id, [gmv[r] for r in sorted(
KeyError: 10
Changed in oq-engine: | |
milestone: | none → 1.0.1 |
importance: | Undecided → Critical |
assignee: | nobody → Michele Simionato (michele-simionato) |
status: | New → In Progress |
Changed in oq-engine: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
This inconspicuous error is hiding a serious inconsistency in the importer and in the underlying table structure. The fix will:
- fix the ses_collection table; the field lt_model_id must not be NULL rupture, and the rupture ids rupture can be safely dropped risk/scenario/ case_1 can be removed (it was not covering the problem anyway)
- when importing a gmf_scenario file the whole table structure of the event based calculator must be populated
- fake ruptures must be generated and inserted in the tables ses_rupture and probabilistic_
in the gmf_data table must be the right ones
- the rupture tags as read from the file must enter in the ses_rupture table correctly
- the ScenarioExporter must be replaced by the EventBasedExporter
- the parameter investigationTime is not defined for scenario computations and must not be exported to the files
- the table ses_collection should point to the trt_model table, not to lt_source_model
- then the field trt_model_id in probabilistic_
- we need a nontrivial migration procedure to reshuffle the data: in particular new ses_collection records must be
created (one for each TRT) and the old records must be deleted
- the upgrade manager must be enhanced to improve the usability of Python upgrade scripts
- the procedure loading of the epsilons from the database must be fixed to work with several SES at the same time
- some export routines specific to the scenario case can be removed
- an import/export test must be added
- an old import test in a_tests/