oq-engine
oq-engine copied to clipboard
Add check in job.ini for scenario calculations
If the user does not provide gsim or gmlt in a scenario calculation, the following error message appears:
File "/Users/cye/oq319/lib/python3.11/site-packages/openquake/calculators/event_based.py", line 229, in gen_event_based
yield event_based(proxies, cmaker, stations, dstore, monitor)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/cye/oq319/lib/python3.11/site-packages/openquake/calculators/event_based.py", line 284, in event_based
mean_stds = cmaker.get_mean_stds(
^^^^^^^^^^^^^^^^^^^^^
File "/Users/cye/oq319/lib/python3.11/site-packages/openquake/hazardlib/contexts.py", line 1253, in get_mean_stds
raise ValueError('Total StdDev is zero for %s' % gsim)
ValueError: Total StdDev is zero for [FromFile]
The check should be done at the beginning of the calculation.
To replicate the error, comment gsim
line in any demo calculation for scenarios.