Skip to content

Commit

Permalink
Added test for disagg_by_src in Japan
Browse files Browse the repository at this point in the history
  • Loading branch information
micheles committed Sep 11, 2023
1 parent 6b799c2 commit 6212da8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
6 changes: 5 additions & 1 deletion openquake/calculators/tests/classical_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,11 @@ def test_case_27(self): # Nankai mutex model
tot_probs_occur = sum(len(po) for po in probs_occur)
self.assertEqual(tot_probs_occur, 4) # 2 x 2

# make sure the disaggregation works
# check mean_rates_by_src
[fname] = export(('mean_rates_by_src', 'csv'), self.calc.datastore)
self.assertEqualFiles("expected/mean_rates_by_src.csv", fname)

# make sure the disaggregation runs
hc_id = str(self.calc.datastore.calc_id)
self.run_calc(case_27.__file__, 'job.ini',
hazard_calculation_id=hc_id,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#,,,"generated_by='OpenQuake engine 3.18.0-git6b799c22df', start_date='2023-09-11T08:26:57', checksum=3388380710, lon=135.68, lat=35.68"
src_id,imt,iml,value
case_01,PGV,2.00000E+01,5.98084E-02
case_02,PGV,2.00000E+01,1.86467E-01
gs_PSE_CPCF_2_100,PGV,2.00000E+01,2.40458E-03
1 change: 1 addition & 0 deletions openquake/qa_tests_data/classical/case_27/job.ini
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ intensity_measure_types_and_levels = {"PGV": [20]}
# km
maximum_distance = 200.
truncation_level = 99.
disagg_by_src = true

0 comments on commit 6212da8

Please sign in to comment.