gem / oq-engine

OpenQuake Engine: a software for Seismic Hazard and Risk Analysis
https://github.com/gem/oq-engine/#openquake-engine
GNU Affero General Public License v3.0
380 stars 273 forks source link

key-error if using CND model GMMs with Modifiable GMPE in a Hazard Scenario Calculation #9368

Closed CB-quakemodel closed 5 months ago

CB-quakemodel commented 8 months ago

A key error is obtained when using the Canada model versions of the NGAeast GMMs with the modifiable GMPE feature (here used to split the sigma within a hazard scenario calculation).

image

I have tested the original CND model logic tree within a hazard scenario calculation using the same rupture and the error is not observed.

I have also tested the GMM logic tree using ModifiableGMPE features within a classical PSHA calculation and this error is not observed.

Therefore the error so seem be isolated to specifically use of a rupture model within a hazard scenario calculation with ModifiableGMPE applied to the CND model GMMs. This is probably related to how the rupture magnitude is read in + formatted into an event-based wrapper rupture given the CND GMMs specifically require magnitudes as 2 decimal place strings for getting the model coefficients.

I attach the hazard scenario calculation input files required to generate this error. test.zip

micheles commented 8 months ago

The file gsim_lt.xml contains something like this:

                    <uncertaintyModel>
                        [ModifiableGMPE]
gmpe.CanadaSHM6_StableCrust_NGAEast={'submodel'= '01', 'gmpe_table'= 'C=\\Users\\Christopher Brooks\\oq-engine\\openquake\\hazardlib\\gsim\\can20\\NGA-East-13\\SHM6-trial_NGA-East_Model_01_AA13_sigma.vs3000.hdf5'}
add_between_within_stds.with_betw_ratio=1.5
                    </uncertaintyModel>

This a GRAVE ERROR, you have a reference to 'C=\Users\Christopher Brooks\...', while absolute pathnames should be forbidden, how did you produce the file gsim_lt.xml ?

CB-quakemodel commented 8 months ago

Ciao Michele, the xml is produced in a workflow I've made to read in a Mosaic model GMM xml and split sigma in GMMs which don't have it using mgmpe to enable GMF conditioning. I've fixed this by making the path relative now, but the error is still observed.

CB-quakemodel commented 8 months ago

Also I just ran an additional check with the original CND model gsim xml truncated to only the trt of the rupture in another scenario calc using the same rupture, sites and job file, and a similar error associated with the formatting of the magnitude as a 2 decimal place string is observed image