14. Driving the OpenQuake Engine


Fig. 14.1 Dialog to run the OpenQuake Engine server

The plugin enables to drive the OpenQuake Engine, submitting new jobs, watching calculation progress, retrieving and visualizing results, seamlessly within the QGIS interface. This is made possible by leveraging the OpenQuake Engine Server’s HTTP RESTful API. The connection with a running OQ-Engine Server has to be properly set up as described in IRMT settings. The server can run locally in the same computer where QGIS is running, or remotely. For instance, it is possible to connect to a remote cluster, to perform jobs that are highly demanding in terms of computational resources.

14.1. Run a calculation

When the Run Calculation button is pressed, a file explorer is opened, enabling to select the input files needed to run the job (or a zip archive containing them), including the job.ini file. By pressing Open to confirm, the job is submitted. The interface keeps querying the server asynchronously, and displaying the status of the calculation.

14.2. Watch the console log

It is possible to watch the log of a calculation, by pressing the Console button in the corresponding row. The log will be displayed in a tab of the QGIS Log Message Panel.

14.3. Download outputs

If a calculation was completed successfully, an Outputs button is provided. When it is clicked, the list of available outputs is shown, which depends on the type of artifacts generated by the calculation. Outputs can be downloaded in one of the available formats, by clicking the corresponding button. In some cases, they can also be loaded as QGIS layers, and a default styling is applied, based on parameters chosen by the user.

14.4. Run a risk calculation on top of hazard

To run a risk-only calculation on top of a previous hazard run you have to click the Run Risk button on the corresponding hazard calculation and select the zip file containing the risk job.ini and the related inputs.

14.5. Remove a calculation

To hide a calculation from the list press the Remove button.

The calculation is removed from the calculations list, but it is not actually removed from the database nor from the datastore.

14.6. Calculation status

The Status column of the List of calculations indicates the current status of a calculation, which can be one of the following: created, executing, complete, failed.

The reason behind a failed calculation can be inspected by watching the console log, by means of the Console button.