oq-engine icon indicating copy to clipboard operation
oq-engine copied to clipboard

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

Open CB-quakemodel opened this issue 1 year ago • 3 comments

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

CB-quakemodel avatar Jan 19 '24 09:01 CB-quakemodel

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 ?

micheles avatar Jan 30 '24 08:01 micheles

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 avatar Jan 30 '24 09:01 CB-quakemodel

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

CB-quakemodel avatar Jan 30 '24 09:01 CB-quakemodel