NHLIB: allow gmf calculation with GMPEs that provide only total standard deviation

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

Bug Description

Currently, the ground motion field calculator (https://github.com/gem/nhlib/blob/master/nhlib/calc/gmf.py#L26) requires GSIMs to provide both the inter and intra event standard deviations (see https://github.com/gem/nhlib/blob/master/nhlib/calc/gmf.py#L99).

However some GMPEs or IPEs may provide only total standard deviation (see https://github.com/gem/nhlib/blob/master/nhlib/gsim/sadigh_1997.py#L52).

We need to modify the workflow within the GMF calculator in order to cope with this situation.

So if a GSIM provides only total standard deviation then, the correlation model must be None (because it's not used) and we need to compute only mean and total standard deviation at the sites of interest, that is:

        mean, [stddev_total] = gsim.get_mean_and_stddevs(
            sctx, rctx, dctx, imt, [StdDev.TOTAL]
        )

we can then compute the total residual:

        total_residual = stddev_total * distribution.rvs(size=(len(sites),
                                                               realizations))

and then compute the gmf as:

        gmf = gsim.to_imt_unit_values(mean + total_residual)

In case of a gsim that provides both inter and intra event standard deviations the workflow remains unchanged.

Tags: hazard nhlibi
tags: added: hazard nhlibi
Changed in openquake:
assignee: nobody → Muharem Hrnjadovic (al-maisan)
milestone: none → 0.8.4
importance: Undecided → Medium
status: New → In Progress
Changed in openquake:
status: In Progress → Confirmed
assignee: Muharem Hrnjadovic (al-maisan) → nobody
Changed in openquake:
assignee: nobody → Lars Butler (lars-butler)
Revision history for this message
Lars Butler (lars-butler) wrote :
Changed in openquake:
status: Confirmed → In Progress
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.