Allow definition of spatially variable site parameters in OpenQuake

Bug #987827 reported by Damiano Monelli
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenQuake (deprecated)
Fix Released
High
Lars Butler

Bug Description

[et=20h]
[at=45.5h]

Currently, in the OpenQuake configuration file, site parameters:

REFERENCE_VS30_VALUE = 760.0
VS30_TYPE = measured
DEPTHTO1PT0KMPERSEC = 100.0
REFERENCE_DEPTH_TO_2PT5KM_PER_SEC_PARAM = 5.0

are defined and applied to all the sites considered in the calculation (see https://github.com/gem/oq-engine/blob/master/openquake/calculators/hazard/general.py#L258).

For all calculators, we need to give the possibility to compute hazard results on a set of sites having spatially variable site parameters.

The site parameter spatial distribution can be defined in a .csv file containing site coordinates and corresponding site parameters.

LON, LAT, VS30, VS30_TYPE, Z1Pt0,Z2Pt5
30.0,45.0,800.0,measured,100.0,5.0
....

For all the sites in the calculation (defined through REGION_VERTEX or SITES keys, or from the sites defined in the exposure file if the key COMPUTE_HAZARD_AT_ASSET_LOCATION = true), the site parameters need to be extracted from the site parameter spatial distribution (by extracting parameters from the closest site in the distribution). Once the site parameters for all sites are set calculations can be triggered.

Notes from Lars:

- The site parameter distribution model could be CSV (due to its simple nature), or it could be NRML to maintain consistency with our other inputs.
- This file could be specified as a SITE_MODEL parameter. In the config file, the param value would simply be a file path.
- The SITE_MODEL parameter would be optional. If it is not specified, the user can instead specify REFERENCE_VS30_VALUE, VS30_TYPE, DEPTHTO1PT0KMPERSEC, and REFERENCE_DEPTH_TO_2PT5KM_PER_SEC_PARAM which would apply to all sites in the calculation.
- Pre-calculation error checking: When the SITE_MODEL is read, generate a convex hull (polygon) from all of the points in the model. Then, make sure all calculation points of interest intersect with this polygon. If any points do not intersect, raise an error and abort the calculation.
- The SITE_MODEL should be stored in the database. This will allow us to do spatial queries with PostGIS.
- When we do a calculation on a given point/site of interest, do a spatial query to get the closest SITE_MODEL params. (We cannot assume that parameters will be available for _exactly_ the points of interest, so we just have to take the closest available data.)

Revision history for this message
Lars Butler (lars-butler) wrote :

The site parameter spatial distribution should probably be stored in the database. Then, workers can do spatial queries to get the parameters relevant for the site list in each task.

Changed in openquake:
assignee: nobody → Lars Butler (lars-butler)
milestone: none → 0.8.0
importance: Undecided → High
status: New → Confirmed
description: updated
description: updated
Changed in openquake:
status: Confirmed → In Progress
description: updated
Revision history for this message
Lars Butler (lars-butler) wrote :
Revision history for this message
Lars Butler (lars-butler) wrote :

Patch to nhlib: https://github.com/gem/nhlib/pull/35 (oq-engine needs this)

Revision history for this message
Lars Butler (lars-butler) wrote :
Revision history for this message
Lars Butler (lars-butler) wrote :
Revision history for this message
Lars Butler (lars-butler) wrote :
description: updated
Revision history for this message
Lars Butler (lars-butler) wrote :

This was the first branch submitted for oq-engine: https://github.com/gem/oq-engine/pull/763

Changed in openquake:
status: In Progress → Fix Committed
Changed in openquake:
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.