diff --git a/openquake/baselib/general.py b/openquake/baselib/general.py index 0f1383550fd0..3aa739090c80 100644 --- a/openquake/baselib/general.py +++ b/openquake/baselib/general.py @@ -1761,6 +1761,16 @@ def around(vec, value, delta): return (vec <= value + delta) & (vec >= value - delta) +def sum_records(array): + """ + :returns: the sums of the composite array + """ + res = numpy.zeros(1, array.dtype) + for name in array.dtype.names: + res[name] = array[name].sum(axis=0) + return res + + def compose_arrays(**kwarrays): """ Compose multiple 1D and 2D arrays into a single composite array. diff --git a/openquake/calculators/classical_damage.py b/openquake/calculators/classical_damage.py index e305ffaa949e..4cdab6662046 100644 --- a/openquake/calculators/classical_damage.py +++ b/openquake/calculators/classical_damage.py @@ -73,13 +73,11 @@ def post_execute(self, result): a dictionary asset_ordinal -> array(R, D) """ D = len(self.crmodel.damage_states) - damages = numpy.zeros((self.A, self.R, self.L, D), numpy.float32) + damages = numpy.zeros((1, self.A, self.R, self.L, D), numpy.float32) for a in result: - damages[a] = result[a] - self.datastore['damages-rlzs'] = damages + damages[0, a] = result[a] + self.datastore['damages-rlzs'] = self.crmodel.to_multi_damage(damages) stats.set_rlzs_stats(self.datastore, 'damages-rlzs', - assets=self.assetcol['id'], - loss_type=self.oqparam.loss_types, - dmg_state=self.crmodel.damage_states) + assets=self.assetcol['id']) dmg = views.view('portfolio_damage', self.datastore) logging.info('\n' + views.text_table(dmg, ext='org')) diff --git a/openquake/calculators/event_based_damage.py b/openquake/calculators/event_based_damage.py index 6b41ebb62e33..e9a0434958a0 100644 --- a/openquake/calculators/event_based_damage.py +++ b/openquake/calculators/event_based_damage.py @@ -43,7 +43,8 @@ def zero_dmgcsq(A, R, L, crmodel): """ dmg_csq = crmodel.get_dmg_csq() Dc = len(dmg_csq) + 1 # damages + consequences - return numpy.zeros((A, R, L, Dc), F32) + P = len(crmodel.perils) + return numpy.zeros((P, A, R, L, Dc), F32) def damage_from_gmfs(gmfslices, oqparam, dstore, monitor): @@ -83,7 +84,7 @@ def event_based_damage(df, oq, dstore, monitor): crmodel = monitor.read('crmodel') aggids = monitor.read('aggids') dmgcsq = zero_dmgcsq(len(assetcol), oq.R, oq.L, crmodel) - _A, R, L, Dc = dmgcsq.shape + P, _A, R, L, Dc = dmgcsq.shape D = len(crmodel.damage_states) rlzs = dstore['events']['rlz_id'] dddict = general.AccumDict(accum=numpy.zeros((L, Dc), F32)) # eid, kid @@ -93,6 +94,7 @@ def event_based_damage(df, oq, dstore, monitor): if len(gmf_df) == 0: continue eids = gmf_df.eid.to_numpy() + E = len(eids) if not oq.float_dmg_dist: rng = scientific.MultiEventRNG( oq.master_seed, numpy.unique(eids)) @@ -100,14 +102,24 @@ def event_based_damage(df, oq, dstore, monitor): rng = None for taxo, adf in asset_df.groupby('taxonomy'): aids = adf.index.to_numpy() + A = len(aids) with mon: rc = scientific.RiskComputer(crmodel, taxo) - dd4 = rc.get_dd4(adf, gmf_df, rng, Dc-D, crmodel) # (A, E, L, Dc) + dd5 = rc.get_dd5(adf, gmf_df, rng, Dc-D, crmodel) # (A, E, L, Dc) if R == 1: # possibly because of collect_rlzs - dmgcsq[aids, 0] += dd4.sum(axis=1) + dmgcsq[:, aids, 0] += dd5.sum(axis=2) else: for e, rlz in enumerate(rlzs[eids]): - dmgcsq[aids, rlz] += dd4[:, e] + dmgcsq[:, aids, rlz] += dd5[:, :, e] + if P > 1: + dd4 = numpy.empty(dd5.shape[1:]) + for li in range(L): + for a in range(A): + for e in range(E): + dd4[a, e, li, :D] = scientific.compose_dds(dd5[:, a, e, li, :D]) + dd4[a, e, li, D:] = dd5[:, a, e, li, D:].max(axis=0) + else: + dd4 = dd5[0] tot = dd4.sum(axis=0) # (E, L, Dc) for e, eid in enumerate(eids): dddict[eid, oq.K] += tot[e] @@ -204,7 +216,7 @@ def post_execute(self, dummy): """ oq = self.oqparam # no damage check, perhaps the sites where disjoint from gmf_data - if self.dmgcsq[:, :, :, 1:].sum() == 0: + if self.dmgcsq[:, :, :, :, 1:].sum() == 0: haz_sids = self.datastore['gmf_data/sid'][:] count = numpy.isin(haz_sids, self.sitecol.sids).sum() if count == 0: @@ -222,24 +234,21 @@ def post_execute(self, dummy): with prc.datastore: prc.run(exports='') - _A, _R, L, _Dc = self.dmgcsq.shape + P, _A, _R, L, _Dc = self.dmgcsq.shape D = len(self.crmodel.damage_states) # fix no_damage distribution for events with zero damage number = self.assetcol['value-number'] - for r in range(self.R): - self.dmgcsq[:, r] /= prc.num_events[r] - ndamaged = self.dmgcsq[:, r, :, 1:D].sum(axis=2) # shape (A, L) - for li in range(L): - # set no_damage - self.dmgcsq[:, r, li, 0] = number - ndamaged[:, li] + for p in range(P): + for r in range(self.R): + self.dmgcsq[p, :, r] /= prc.num_events[r] + ndamaged = self.dmgcsq[p, :, r, :, 1:D].sum(axis=2) # shape (A, L) + for li in range(L): + # set no_damage + self.dmgcsq[p, :, r, li, 0] = number - ndamaged[:, li] assert (self.dmgcsq >= 0).all() # sanity check - self.datastore['damages-rlzs'] = self.dmgcsq - set_rlzs_stats(self.datastore, - 'damages-rlzs', - asset_id=self.assetcol['id'], - loss_type=oq.loss_types, - dmg_state=['no_damage'] + self.crmodel.get_dmg_csq()) + self.datastore['damages-rlzs'] = self.crmodel.to_multi_damage(self.dmgcsq) + set_rlzs_stats(self.datastore, 'damages-rlzs', asset_id=self.assetcol['id']) if oq.infrastructure_connectivity_analysis: logging.info('Running connectivity analysis') diff --git a/openquake/calculators/export/risk.py b/openquake/calculators/export/risk.py index 12ee9f226ac5..6f5a79901cfe 100644 --- a/openquake/calculators/export/risk.py +++ b/openquake/calculators/export/risk.py @@ -30,9 +30,7 @@ from openquake.hazardlib import nrml from openquake.hazardlib.stats import compute_stats2 from openquake.risklib import scientific -from openquake.calculators.extract import ( - extract, build_damage_dt, build_csq_dt, build_damage_array, sanitize, - avglosses) +from openquake.calculators.extract import extract, sanitize, avglosses from openquake.calculators import post_risk from openquake.calculators.export import export, loss_curves from openquake.calculators.export.hazard import savez @@ -378,15 +376,22 @@ def export_loss_maps_npz(ekey, dstore): return [fname] -def modal_damage_array(data, damage_dt): +def modal_damage_array(data, dstates): # determine the damage state with the highest probability - A, _L, _D = data.shape - dmgstate = damage_dt['structural'].names - arr = numpy.zeros(A, [('modal-ds-' + lt, hdf5.vstr) - for lt in damage_dt.names]) - for li, loss_type in enumerate(damage_dt.names): - arr['modal-ds-' + loss_type] = [dmgstate[data[a, li].argmax()] - for a in range(A)] + acc = general.AccumDict(accum=[]) + for name in data.dtype.names: # peril-ltype-dstate + try: + peril, ltype, _dstate = name.split('-') + modal = f'modal-ds-{peril}~{ltype}' + except ValueError: + ltype, _dstate = name.split('-') + modal = 'modal-ds-' + ltype + if ltype != 'no_damage': + acc[modal].append(data[name]) + acc = {k: numpy.array(acc[k]).argmax(axis=0) for k in acc} + arr = numpy.zeros(len(data), [(key, object) for key in acc]) + for key in acc: + arr[key] = dstates[acc[key]] return arr @@ -394,10 +399,11 @@ def modal_damage_array(data, damage_dt): @export.add(('damages-rlzs', 'csv'), ('damages-stats', 'csv')) def export_damages_csv(ekey, dstore): oq = dstore['oqparam'] + dmgstates = numpy.concatenate( + [['no_damage'], dstore.getitem('crm').attrs['limit_states']]) ebd = oq.calculation_mode == 'event_based_damage' rlzs = dstore['full_lt'].get_realizations() - orig = dstore[ekey[0]][:] # shape (L, A, R, D) - dmg_dt = build_damage_dt(dstore) + orig = dstore[ekey[0]][:] # shape (A, R, L, D, P) writer = writers.CsvWriter(fmt='%.6E') assets = get_assets(dstore) md = dstore.metadata @@ -405,7 +411,6 @@ def export_damages_csv(ekey, dstore): rit = oq.risk_investigation_time or oq.investigation_time md.update(dict(investigation_time=oq.investigation_time, risk_investigation_time=rit)) - D = len(oq.limit_states) + 1 R = 1 if oq.collect_rlzs else len(rlzs) if ekey[0].endswith('stats'): rlzs_or_stats = oq.hazard_stats() @@ -414,27 +419,26 @@ def export_damages_csv(ekey, dstore): name = ekey[0].split('-')[0] if oq.calculation_mode != 'classical_damage': name = 'avg_' + name + csqs = tuple(dstore.getitem('crm').attrs['consequences']) for i, ros in enumerate(rlzs_or_stats): if ebd: # export only the consequences from damages-rlzs, i == 0 - rate = len(dstore['events']) * oq.time_ratio / len(rlzs) - data = orig[:, i] * rate - A, _L, Dc = data.shape - if Dc == D: # no consequences, export nothing + if len(csqs) == 0: # no consequences, export nothing return [] - csq_dt = build_csq_dt(dstore) - damages = numpy.zeros(A, [(lt, csq_dt) for lt in oq.loss_types]) - for a in range(A): - for li, lt in enumerate(oq.loss_types): - damages[lt][a] = tuple(data[a, li, D:Dc]) + rate = len(dstore['events']) * oq.time_ratio / len(rlzs) + data = orig[:, i] + dtlist = [(col, F32) for col in data.dtype.names if col.endswith(csqs)] + damages = numpy.zeros(len(data), dtlist) + for csq, _ in dtlist: + damages[csq] = data[csq] * rate fname = dstore.build_fname('avg_risk', ros, ekey[1]) else: # scenario_damage, classical_damage if oq.modal_damage_state: - damages = modal_damage_array(orig[:, i], dmg_dt) + damages = modal_damage_array(orig[:, i], dmgstates) else: - damages = build_damage_array(orig[:, i], dmg_dt) + damages = orig[:, i] fname = dstore.build_fname(name, ros, ekey[1]) - writer.save(compose_arrays(assets, damages), fname, - comment=md, renamedict=dict(id='asset_id')) + arr = compose_arrays(assets, damages) + writer.save(arr, fname, comment=md, renamedict=dict(id='asset_id')) return writer.getsaved() diff --git a/openquake/calculators/extract.py b/openquake/calculators/extract.py index 79ff07772351..2e977b3b659f 100644 --- a/openquake/calculators/extract.py +++ b/openquake/calculators/extract.py @@ -841,6 +841,21 @@ def extract_agg_losses(dstore, what): return _filter_agg(dstore['assetcol'], losses, tags, stats) +# TODO: extend to multiple perils +def _dmg_get(array, loss_type): + # array of shape (A, R) + out = [] + for name in array.dtype.names: + try: + ltype, _dstate = name.split('-') + except ValueError: + # ignore secondary perils + continue + if ltype == loss_type: + out.append(array[name]) + return numpy.array(out).transpose(1, 2, 0) # shape (A, R, Dc) + + @extract.add('agg_damages') def extract_agg_damages(dstore, what): """ @@ -859,9 +874,7 @@ def extract_agg_damages(dstore, what): loss_type = what tags = [] if 'damages-rlzs' in dstore: - oq = dstore['oqparam'] - li = oq.lti[loss_type] - damages = dstore['damages-rlzs'][:, :, li] + damages = _dmg_get(dstore['damages-rlzs'][:], loss_type) else: raise KeyError('No damages found in %s' % dstore) return _filter_agg(dstore['assetcol'], damages, tags) @@ -1045,53 +1058,28 @@ def build_damage_dt(dstore): """ oq = dstore['oqparam'] attrs = json.loads(dstore.get_attr('damages-rlzs', 'json')) + perils = attrs['peril'] limit_states = list(dstore.get_attr('crm', 'limit_states')) csqs = attrs['dmg_state'][len(limit_states) + 1:] # consequences - dt_list = [(ds, F32) for ds in ['no_damage'] + limit_states + csqs] + dt_list = [] + for peril in perils: + for ds in ['no_damage'] + limit_states + csqs: + dt_list.append((ds if peril == 'earthquake' else f'{peril}_{ds}', F32)) damage_dt = numpy.dtype(dt_list) loss_types = oq.loss_dt().names return numpy.dtype([(lt, damage_dt) for lt in loss_types]) -def build_csq_dt(dstore): - """ - :param dstore: a datastore instance - :returns: - a composite dtype (csq1, csq2, ...) - """ - attrs = json.loads(dstore.get_attr('damages-rlzs', 'json')) - limit_states = list(dstore.get_attr('crm', 'limit_states')) - csqs = attrs['dmg_state'][len(limit_states) + 1:] # consequences - dt = numpy.dtype([(csq, F32) for csq in csqs]) - return dt - - -def build_damage_array(data, damage_dt): - """ - :param data: an array of shape (A, L, D) - :param damage_dt: a damage composite data type loss_type -> states - :returns: a composite array of length N and dtype damage_dt - """ - A, _L, _D = data.shape - dmg = numpy.zeros(A, damage_dt) - for a in range(A): - for li, lt in enumerate(damage_dt.names): - dmg[lt][a] = tuple(data[a, li]) - return dmg - - @extract.add('damages-rlzs') def extract_damages_npz(dstore, what): oq = dstore['oqparam'] - damage_dt = build_damage_dt(dstore) R = dstore['full_lt'].get_num_paths() if oq.collect_rlzs: R = 1 data = dstore['damages-rlzs'] assets = util.get_assets(dstore) for r in range(R): - damages = build_damage_array(data[:, r], damage_dt) - yield 'rlz-%03d' % r, util.compose_arrays(assets, damages) + yield 'rlz-%03d' % r, util.compose_arrays(assets, data[:, r]) # tested on oq-risk-tests event_based/etna diff --git a/openquake/calculators/multi_risk.py b/openquake/calculators/multi_risk.py index bffb00f667b0..988ed0d75f56 100644 --- a/openquake/calculators/multi_risk.py +++ b/openquake/calculators/multi_risk.py @@ -60,8 +60,8 @@ def get_dmg_csq(crm, assets_by_site, gmf, time_event): number = assets['value-number'] for a, o in enumerate(assets['ordinal']): for li in range(L): - out[o, li, 0, :D] = number[a] * dd5[0, a, 0, li] - out[o, li, 0, [D]] = csq['losses', li][a] + out[o, li, :, :D] = number[a] * dd5[:, a, 0, li] + out[o, li, :, [D]] = csq['losses', li][:, a] return out diff --git a/openquake/calculators/tests/scenario_damage_test.py b/openquake/calculators/tests/scenario_damage_test.py index bf34d84ac6e0..3dfcf3b99e60 100644 --- a/openquake/calculators/tests/scenario_damage_test.py +++ b/openquake/calculators/tests/scenario_damage_test.py @@ -57,9 +57,10 @@ def test_case_1(self): # test agg_damages, 1 realization x 3 damage states # checking that passing a fake loss type works, # for compatibility with the past - [dmg] = extract(self.calc.datastore, - 'agg_damages/structural?taxonomy=RC&CRESTA=01.1') - aac([1482., 489., 29.], dmg, atol=1E-4) + dmg = extract(self.calc.datastore, + 'agg_damages/structural?taxonomy=RC&CRESTA=01.1') + aac([[1482., 489., 29.]], dmg, atol=1E-4) + # test no intersection dmg = extract(self.calc.datastore, 'agg_damages/structural?taxonomy=RM&CRESTA=01.1') self.assertEqual(dmg.shape, ()) @@ -80,7 +81,7 @@ def test_case_1c(self): [fname] = export(('damages-rlzs', 'csv'), self.calc.datastore) self.assertEqualFiles('expected/' + strip_calc_id(fname), fname) df = self.calc.datastore.read_df('damages-rlzs', 'asset_id') - self.assertEqual(list(df.columns), ['rlz', 'loss_type', 'dmg_state', 'value']) + self.assertEqual(list(df.columns), ['rlz', 'value']) # check risk_by_event [fname] = export(('risk_by_event', 'csv'), self.calc.datastore) @@ -114,13 +115,6 @@ def test_case_4b(self): self.assertEqualFiles('expected/' + strip_calc_id(fname), fname, delta=5E-4) - return # TODO: fix avg_losses - fnames = export(('avg_losses-rlzs', 'csv'), self.calc.datastore) - self.assertEqual(len(fnames), 2) # one per realization - for fname in fnames: - self.assertEqualFiles('expected/' + strip_calc_id(fname), fname, - delta=2E-4) - def test_wrong_gsim_lt(self): with self.assertRaises(InvalidFile) as ctx: self.run_calc(os.path.dirname(case_4b.__file__), 'job_err.ini') diff --git a/openquake/calculators/views.py b/openquake/calculators/views.py index faf9dbace8ce..d7d7e4f53185 100644 --- a/openquake/calculators/views.py +++ b/openquake/calculators/views.py @@ -32,8 +32,8 @@ from openquake.baselib.general import ( humansize, countby, AccumDict, CallableDict, - get_array, group_array, fast_agg) -from openquake.baselib.hdf5 import FLOAT, INT, get_shape_descr, vstr + get_array, group_array, fast_agg, sum_records) +from openquake.baselib.hdf5 import FLOAT, INT, vstr from openquake.baselib.performance import performance_view, Monitor from openquake.baselib.python3compat import encode, decode from openquake.hazardlib import logictree, calc, source, geo @@ -554,20 +554,18 @@ def view_portfolio_loss(token, dstore): # used in the oq-risk-tests @view.add('portfolio_dmgdist') -def portfolio_dmgdist(token, dstore): +def view_portfolio_dmgdist(token, dstore): """ The portfolio damages extracted from the first realization of damages-rlzs """ - oq = dstore['oqparam'] - dstates = ['no_damage'] + oq.limit_states - D = len(dstates) - arr = dstore['damages-rlzs'][:, 0, :, :D].sum(axis=0) # shape (L, D) - tbl = numpy.zeros(len(arr), dt(['loss_type', 'total'] + dstates)) - tbl['loss_type'] = oq.loss_types - tbl['total'] = arr.sum(axis=1) - for dsi, ds in enumerate(dstates): - tbl[ds] = arr[:, dsi] - return tbl + sums = sum_records(dstore['damages-rlzs'][:, 0]) + acc = AccumDict(accum=[]) + for name in sums.dtype.names: + ltype, dstate = name.split('-') + acc[dstate].append(sums[name][0]) + if dstate == 'no_damage': + acc['loss_type'].append(ltype) + return pandas.DataFrame(acc) @view.add('portfolio_damage') @@ -587,13 +585,10 @@ def view_portfolio_damage(token, dstore): return df.set_index('loss_type') # dimensions assets, stat, dmg_state if 'damages-stats' in dstore: - attrs = get_shape_descr(dstore['damages-stats'].attrs['json']) - arr = dstore.sel('damages-stats', stat='mean').sum(axis=(0, 1)) + arr = dstore.sel('damages-stats', stat='mean')[:, 0] else: - attrs = get_shape_descr(dstore['damages-rlzs'].attrs['json']) - arr = dstore.sel('damages-rlzs', rlz=0).sum(axis=(0, 1)) # shape D - rows = [(lt,) + tuple(row) for lt, row in zip(attrs['loss_type'], arr)] - return numpy.array(rows, dt(['loss_type'] + attrs['dmg_state'])) + arr = dstore.sel('damages-rlzs', rlz=0)[:, 0] + return sum_records(arr) def sum_table(records): diff --git a/openquake/qa_tests_data/classical_damage/case_1/expected/damage_continuous.csv b/openquake/qa_tests_data/classical_damage/case_1/expected/damage_continuous.csv index 632fd03a4343..22ef0b0a32d0 100644 --- a/openquake/qa_tests_data/classical_damage/case_1/expected/damage_continuous.csv +++ b/openquake/qa_tests_data/classical_damage/case_1/expected/damage_continuous.csv @@ -1,3 +1,3 @@ -#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git513b65764c', start_date='2024-11-07T07:49:08', checksum=2908959360, investigation_time=50.0, risk_investigation_time=100.0" -asset_id,taxonomy,lon,lat,structural~no_damage,structural~slight,structural~moderate,structural~extensive,structural~complete +#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git2d65903bd5', start_date='2024-11-18T08:52:05', checksum=2908959360, investigation_time=50.0, risk_investigation_time=100.0" +asset_id,taxonomy,lon,lat,structural-no_damage,structural-slight,structural-moderate,structural-extensive,structural-complete a1,W,83.31382,29.46117,5.834455E-01,1.166002E-01,1.639836E-01,6.452727E-02,7.144331E-02 diff --git a/openquake/qa_tests_data/classical_damage/case_1/expected/damage_discrete.csv b/openquake/qa_tests_data/classical_damage/case_1/expected/damage_discrete.csv index 508d5b04d36c..7cab16f9d13c 100644 --- a/openquake/qa_tests_data/classical_damage/case_1/expected/damage_discrete.csv +++ b/openquake/qa_tests_data/classical_damage/case_1/expected/damage_discrete.csv @@ -1,3 +1,3 @@ -#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git513b65764c', start_date='2024-11-07T07:49:08', checksum=1012445222, investigation_time=50.0, risk_investigation_time=100.0" -asset_id,taxonomy,lon,lat,structural~no_damage,structural~slight,structural~moderate,structural~extreme,structural~complete +#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git2d65903bd5', start_date='2024-11-18T08:52:05', checksum=1012445222, investigation_time=50.0, risk_investigation_time=100.0" +asset_id,taxonomy,lon,lat,structural-no_damage,structural-slight,structural-moderate,structural-extreme,structural-complete a1,W,83.31382,29.46117,8.674341E-01,2.186973E-02,3.319035E-02,2.689280E-02,5.061299E-02 diff --git a/openquake/qa_tests_data/classical_damage/case_1/expected/damage_interpolation.csv b/openquake/qa_tests_data/classical_damage/case_1/expected/damage_interpolation.csv index 116870926daf..a052ce89b9b8 100644 --- a/openquake/qa_tests_data/classical_damage/case_1/expected/damage_interpolation.csv +++ b/openquake/qa_tests_data/classical_damage/case_1/expected/damage_interpolation.csv @@ -1,3 +1,3 @@ -#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git513b65764c', start_date='2024-11-07T07:49:02', checksum=54240154, investigation_time=50.0, risk_investigation_time=100.0" -asset_id,taxonomy,lon,lat,structural~no_damage,structural~slight,structural~moderate,structural~extreme,structural~complete +#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git2d65903bd5', start_date='2024-11-18T08:52:05', checksum=54240154, investigation_time=50.0, risk_investigation_time=100.0" +asset_id,taxonomy,lon,lat,structural-no_damage,structural-slight,structural-moderate,structural-extreme,structural-complete a1,W,83.31382,29.46117,8.675371E-01,2.197995E-02,3.322709E-02,2.684605E-02,5.040986E-02 diff --git a/openquake/qa_tests_data/classical_damage/case_1a/expected/damages.csv b/openquake/qa_tests_data/classical_damage/case_1a/expected/damages.csv index a5fbe9d05fb6..0947f24c364f 100644 --- a/openquake/qa_tests_data/classical_damage/case_1a/expected/damages.csv +++ b/openquake/qa_tests_data/classical_damage/case_1a/expected/damages.csv @@ -1,3 +1,3 @@ -#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git513b65764c', start_date='2024-11-07T08:00:43', checksum=2787351543, investigation_time=1.0, risk_investigation_time=1.0" -asset_id,taxonomy,lon,lat,structural~no_damage,structural~slight,structural~moderate,structural~extreme,structural~complete +#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git2d65903bd5', start_date='2024-11-18T08:52:07', checksum=2787351543, investigation_time=1.0, risk_investigation_time=1.0" +asset_id,taxonomy,lon,lat,structural-no_damage,structural-slight,structural-moderate,structural-extreme,structural-complete a1,Wood,-122.00000,38.11300,9.719867E-01,3.889954E-03,6.113179E-03,4.996107E-03,1.301405E-02 diff --git a/openquake/qa_tests_data/classical_damage/case_1b/expected/damages.csv b/openquake/qa_tests_data/classical_damage/case_1b/expected/damages.csv index d92a3be90e79..8c1b07b0c7d8 100644 --- a/openquake/qa_tests_data/classical_damage/case_1b/expected/damages.csv +++ b/openquake/qa_tests_data/classical_damage/case_1b/expected/damages.csv @@ -1,3 +1,3 @@ -#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git513b65764c', start_date='2024-11-07T08:00:44', checksum=1448121310, investigation_time=1.0, risk_investigation_time=1.0" -asset_id,taxonomy,lon,lat,structural~no_damage,structural~slight,structural~moderate,structural~extreme,structural~complete +#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git2d65903bd5', start_date='2024-11-18T08:52:07', checksum=1448121310, investigation_time=1.0, risk_investigation_time=1.0" +asset_id,taxonomy,lon,lat,structural-no_damage,structural-slight,structural-moderate,structural-extreme,structural-complete a1,Wood,-122.00000,38.11300,9.848971E-01,1.023099E-03,2.435691E-03,2.696065E-03,8.948064E-03 diff --git a/openquake/qa_tests_data/classical_damage/case_1c/expected/damages.csv b/openquake/qa_tests_data/classical_damage/case_1c/expected/damages.csv index 3e31f59fd773..6621d383c7df 100644 --- a/openquake/qa_tests_data/classical_damage/case_1c/expected/damages.csv +++ b/openquake/qa_tests_data/classical_damage/case_1c/expected/damages.csv @@ -1,3 +1,3 @@ -#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git513b65764c', start_date='2024-11-07T08:00:45', checksum=3865287686, investigation_time=1.0, risk_investigation_time=1.0" -asset_id,taxonomy,lon,lat,structural~no_damage,structural~slight,structural~moderate,structural~extreme,structural~complete +#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git2d65903bd5', start_date='2024-11-18T08:52:08', checksum=3865287686, investigation_time=1.0, risk_investigation_time=1.0" +asset_id,taxonomy,lon,lat,structural-no_damage,structural-slight,structural-moderate,structural-extreme,structural-complete a1,Wood,-122.00000,38.11300,9.719827E-01,5.033605E-03,6.772837E-03,5.137749E-03,1.107308E-02 diff --git a/openquake/qa_tests_data/classical_damage/case_2/expected/damage_continuous.csv b/openquake/qa_tests_data/classical_damage/case_2/expected/damage_continuous.csv index b453ab9e7a75..261b5eb6040a 100644 --- a/openquake/qa_tests_data/classical_damage/case_2/expected/damage_continuous.csv +++ b/openquake/qa_tests_data/classical_damage/case_2/expected/damage_continuous.csv @@ -1,3 +1,3 @@ -#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git513b65764c', start_date='2024-11-07T07:49:03', checksum=2863431766, investigation_time=50.0, risk_investigation_time=100.0" -asset_id,taxonomy,lon,lat,structural~no_damage,structural~slight,structural~moderate,structural~extensive,structural~complete +#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git2d65903bd5', start_date='2024-11-18T08:52:06', checksum=2863431766, investigation_time=50.0, risk_investigation_time=100.0" +asset_id,taxonomy,lon,lat,structural-no_damage,structural-slight,structural-moderate,structural-extensive,structural-complete a1,W,83.31382,29.46117,5.834455E-01,1.166002E-01,1.639836E-01,6.452727E-02,7.144331E-02 diff --git a/openquake/qa_tests_data/classical_damage/case_2/expected/damage_discrete.csv b/openquake/qa_tests_data/classical_damage/case_2/expected/damage_discrete.csv index 41a0a2c50042..4b5b10d21737 100644 --- a/openquake/qa_tests_data/classical_damage/case_2/expected/damage_discrete.csv +++ b/openquake/qa_tests_data/classical_damage/case_2/expected/damage_discrete.csv @@ -1,3 +1,3 @@ -#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git513b65764c', start_date='2024-11-07T07:49:03', checksum=1756151109, investigation_time=50.0, risk_investigation_time=100.0" -asset_id,taxonomy,lon,lat,structural~no_damage,structural~slight,structural~moderate,structural~extreme,structural~complete +#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git2d65903bd5', start_date='2024-11-18T08:52:06', checksum=1756151109, investigation_time=50.0, risk_investigation_time=100.0" +asset_id,taxonomy,lon,lat,structural-no_damage,structural-slight,structural-moderate,structural-extreme,structural-complete a1,W,83.31382,29.46117,4.615197E-13,9.755043E-09,1.938715E-04,2.692314E-02,9.728830E-01 diff --git a/openquake/qa_tests_data/classical_damage/case_2/expected/damage_interpolation.csv b/openquake/qa_tests_data/classical_damage/case_2/expected/damage_interpolation.csv index 6bf85580a196..2b7ae9bc1b71 100644 --- a/openquake/qa_tests_data/classical_damage/case_2/expected/damage_interpolation.csv +++ b/openquake/qa_tests_data/classical_damage/case_2/expected/damage_interpolation.csv @@ -1,3 +1,3 @@ -#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git513b65764c', start_date='2024-11-07T07:49:03', checksum=3154813537, investigation_time=50.0, risk_investigation_time=100.0" -asset_id,taxonomy,lon,lat,structural~no_damage,structural~slight,structural~moderate,structural~extreme,structural~complete +#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git2d65903bd5', start_date='2024-11-18T08:52:06', checksum=3154813537, investigation_time=50.0, risk_investigation_time=100.0" +asset_id,taxonomy,lon,lat,structural-no_damage,structural-slight,structural-moderate,structural-extreme,structural-complete a1,W,83.31382,29.46117,8.675371E-01,2.197995E-02,3.322709E-02,2.684605E-02,5.040986E-02 diff --git a/openquake/qa_tests_data/classical_damage/case_2a/expected/damages.csv b/openquake/qa_tests_data/classical_damage/case_2a/expected/damages.csv index 679d23ffdbdf..dd033167f865 100644 --- a/openquake/qa_tests_data/classical_damage/case_2a/expected/damages.csv +++ b/openquake/qa_tests_data/classical_damage/case_2a/expected/damages.csv @@ -1,3 +1,3 @@ -#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git513b65764c', start_date='2024-11-07T08:00:45', checksum=50692424, investigation_time=1.0, risk_investigation_time=1.0" -asset_id,taxonomy,lon,lat,structural~no_damage,structural~slight,structural~moderate,structural~extreme,structural~complete +#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git2d65903bd5', start_date='2024-11-18T08:52:08', checksum=50692424, investigation_time=1.0, risk_investigation_time=1.0" +asset_id,taxonomy,lon,lat,structural-no_damage,structural-slight,structural-moderate,structural-extreme,structural-complete a1,Wood,-122.00000,38.11300,9.705028E-01,4.578634E-03,8.482290E-03,5.257597E-03,1.117870E-02 diff --git a/openquake/qa_tests_data/classical_damage/case_2b/expected/damages.csv b/openquake/qa_tests_data/classical_damage/case_2b/expected/damages.csv index e7319e8ab010..be44d634c0ef 100644 --- a/openquake/qa_tests_data/classical_damage/case_2b/expected/damages.csv +++ b/openquake/qa_tests_data/classical_damage/case_2b/expected/damages.csv @@ -1,3 +1,3 @@ -#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git513b65764c', start_date='2024-11-07T08:00:46', checksum=817135955, investigation_time=1.0, risk_investigation_time=1.0" -asset_id,taxonomy,lon,lat,structural~no_damage,structural~slight,structural~moderate,structural~extreme,structural~complete +#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git2d65903bd5', start_date='2024-11-18T08:52:09', checksum=817135955, investigation_time=1.0, risk_investigation_time=1.0" +asset_id,taxonomy,lon,lat,structural-no_damage,structural-slight,structural-moderate,structural-extreme,structural-complete a1,Wood,-122.00000,38.11300,9.705028E-01,4.578634E-03,8.482290E-03,5.257597E-03,1.117870E-02 diff --git a/openquake/qa_tests_data/classical_damage/case_3a/expected/damages.csv b/openquake/qa_tests_data/classical_damage/case_3a/expected/damages.csv index fc8d387d34a1..8aa7b77827b4 100644 --- a/openquake/qa_tests_data/classical_damage/case_3a/expected/damages.csv +++ b/openquake/qa_tests_data/classical_damage/case_3a/expected/damages.csv @@ -1,3 +1,3 @@ -#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git513b65764c', start_date='2024-11-07T08:00:46', checksum=2533487595, investigation_time=1.0, risk_investigation_time=1.0" -asset_id,taxonomy,lon,lat,structural~no_damage,structural~slight,structural~moderate,structural~extreme,structural~complete +#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git2d65903bd5', start_date='2024-11-18T08:52:09', checksum=2533487595, investigation_time=1.0, risk_investigation_time=1.0" +asset_id,taxonomy,lon,lat,structural-no_damage,structural-slight,structural-moderate,structural-extreme,structural-complete a1,Steel,-122.00000,38.11300,9.721903E-01,8.197780E-03,1.055095E-02,5.718032E-03,3.342958E-03 diff --git a/openquake/qa_tests_data/classical_damage/case_4a/expected/damages.csv b/openquake/qa_tests_data/classical_damage/case_4a/expected/damages.csv index 0a13cf2787fa..d54964f1bea2 100644 --- a/openquake/qa_tests_data/classical_damage/case_4a/expected/damages.csv +++ b/openquake/qa_tests_data/classical_damage/case_4a/expected/damages.csv @@ -1,3 +1,3 @@ -#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git513b65764c', start_date='2024-11-07T08:00:43', checksum=3004003239, investigation_time=50.0, risk_investigation_time=1.0" -asset_id,taxonomy,lon,lat,structural~no_damage,structural~slight,structural~moderate,structural~extreme,structural~complete +#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git2d65903bd5', start_date='2024-11-18T08:52:10', checksum=3004003239, investigation_time=50.0, risk_investigation_time=1.0" +asset_id,taxonomy,lon,lat,structural-no_damage,structural-slight,structural-moderate,structural-extreme,structural-complete a1,Wood,-122.00000,38.11300,9.705028E-01,4.578634E-03,8.482290E-03,5.257597E-03,1.117870E-02 diff --git a/openquake/qa_tests_data/classical_damage/case_4b/expected/damages.csv b/openquake/qa_tests_data/classical_damage/case_4b/expected/damages.csv index a4a41e439057..8e00610bbddc 100644 --- a/openquake/qa_tests_data/classical_damage/case_4b/expected/damages.csv +++ b/openquake/qa_tests_data/classical_damage/case_4b/expected/damages.csv @@ -1,3 +1,3 @@ -#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git513b65764c', start_date='2024-11-07T08:00:43', checksum=868578278, investigation_time=1.0, risk_investigation_time=75.0" -asset_id,taxonomy,lon,lat,structural~no_damage,structural~slight,structural~moderate,structural~extreme,structural~complete +#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git2d65903bd5', start_date='2024-11-18T08:52:10', checksum=868578278, investigation_time=1.0, risk_investigation_time=75.0" +asset_id,taxonomy,lon,lat,structural-no_damage,structural-slight,structural-moderate,structural-extreme,structural-complete a1,Wood,-122.00000,38.11300,1.058665E-01,4.481700E-02,1.378438E-01,1.418367E-01,5.696360E-01 diff --git a/openquake/qa_tests_data/classical_damage/case_4c/expected/damages.csv b/openquake/qa_tests_data/classical_damage/case_4c/expected/damages.csv index dfd783065ed3..1834a6682d82 100644 --- a/openquake/qa_tests_data/classical_damage/case_4c/expected/damages.csv +++ b/openquake/qa_tests_data/classical_damage/case_4c/expected/damages.csv @@ -1,3 +1,3 @@ -#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git513b65764c', start_date='2024-11-07T08:00:44', checksum=1227256811, investigation_time=50.0, risk_investigation_time=75.0" -asset_id,taxonomy,lon,lat,structural~no_damage,structural~slight,structural~moderate,structural~extreme,structural~complete +#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git2d65903bd5', start_date='2024-11-18T08:52:11', checksum=1227256811, investigation_time=50.0, risk_investigation_time=75.0" +asset_id,taxonomy,lon,lat,structural-no_damage,structural-slight,structural-moderate,structural-extreme,structural-complete a1,Wood,-122.00000,38.11300,1.058665E-01,4.481699E-02,1.378438E-01,1.418367E-01,5.696360E-01 diff --git a/openquake/qa_tests_data/classical_damage/case_5a/expected/damages.csv b/openquake/qa_tests_data/classical_damage/case_5a/expected/damages.csv index e72475e99afd..8bccfcc30998 100644 --- a/openquake/qa_tests_data/classical_damage/case_5a/expected/damages.csv +++ b/openquake/qa_tests_data/classical_damage/case_5a/expected/damages.csv @@ -1,3 +1,3 @@ -#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git513b65764c', start_date='2024-11-07T08:00:44', checksum=3215881130, investigation_time=1.0, risk_investigation_time=1.0" -asset_id,taxonomy,lon,lat,structural~no_damage,structural~slight,structural~moderate,structural~extreme,structural~complete +#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git2d65903bd5', start_date='2024-11-18T08:52:11', checksum=3215881130, investigation_time=1.0, risk_investigation_time=1.0" +asset_id,taxonomy,lon,lat,structural-no_damage,structural-slight,structural-moderate,structural-extreme,structural-complete a1,Wood,-122.00000,38.11300,4.852514E+00,2.289317E-02,4.241145E-02,2.628799E-02,5.589351E-02 diff --git a/openquake/qa_tests_data/classical_damage/case_6a/expected/damages.csv b/openquake/qa_tests_data/classical_damage/case_6a/expected/damages.csv index 00b6c8358851..d7bb89ada591 100644 --- a/openquake/qa_tests_data/classical_damage/case_6a/expected/damages.csv +++ b/openquake/qa_tests_data/classical_damage/case_6a/expected/damages.csv @@ -1,5 +1,5 @@ -#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git513b65764c', start_date='2024-11-07T08:00:45', checksum=2540150451, investigation_time=50.0, risk_investigation_time=100.0" -asset_id,taxonomy,lon,lat,structural~no_damage,structural~slight,structural~moderate,structural~extreme,structural~complete +#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git2d65903bd5', start_date='2024-11-18T09:02:18', checksum=2540150451, investigation_time=50.0, risk_investigation_time=100.0" +asset_id,taxonomy,lon,lat,structural-no_damage,structural-slight,structural-moderate,structural-extreme,structural-complete a3,Wood,-122.57000,38.11300,9.564650E-01,1.508102E-02,1.520534E-02,7.663342E-03,5.585310E-03 a2,Wood,-122.11400,38.11300,1.525715E-01,1.019327E-01,1.998341E-01,1.913907E-01,3.542711E-01 a5,Wood,-122.00000,37.91000,3.196702E-01,1.282338E-01,1.980873E-01,1.505969E-01,2.034118E-01 diff --git a/openquake/qa_tests_data/classical_damage/case_6b/expected/damages.csv b/openquake/qa_tests_data/classical_damage/case_6b/expected/damages.csv index 425e9acb97f3..939d846a70cc 100644 --- a/openquake/qa_tests_data/classical_damage/case_6b/expected/damages.csv +++ b/openquake/qa_tests_data/classical_damage/case_6b/expected/damages.csv @@ -1,5 +1,5 @@ -#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git513b65764c', start_date='2024-11-07T08:00:45', checksum=2953544648, investigation_time=50.0, risk_investigation_time=100.0" -asset_id,taxonomy,lon,lat,structural~no_damage,structural~slight,structural~moderate,structural~extreme,structural~complete +#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git2d65903bd5', start_date='2024-11-18T09:02:18', checksum=2953544648, investigation_time=50.0, risk_investigation_time=100.0" +asset_id,taxonomy,lon,lat,structural-no_damage,structural-slight,structural-moderate,structural-extreme,structural-complete a3,Wood,-122.57000,38.11300,9.528230E-01,2.352116E-02,1.851876E-02,3.419602E-03,1.717456E-03 a2,Wood,-122.11400,38.11300,1.324026E-01,9.220197E-02,2.503553E-01,1.857188E-01,3.393213E-01 a5,Wood,-122.00000,37.91000,2.877830E-01,1.337625E-01,2.581529E-01,1.369537E-01,1.833480E-01 diff --git a/openquake/qa_tests_data/classical_damage/case_7a/expected/damages.csv b/openquake/qa_tests_data/classical_damage/case_7a/expected/damages.csv index 6318140343a9..adc9d41091dc 100644 --- a/openquake/qa_tests_data/classical_damage/case_7a/expected/damages.csv +++ b/openquake/qa_tests_data/classical_damage/case_7a/expected/damages.csv @@ -1,5 +1,5 @@ -#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git513b65764c', start_date='2024-11-07T08:00:46', checksum=2498226504, investigation_time=50.0, risk_investigation_time=100.0" -asset_id,taxonomy,lon,lat,structural~no_damage,structural~slight,structural~moderate,structural~extreme,structural~complete +#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git2d65903bd5', start_date='2024-11-18T09:02:18', checksum=2498226504, investigation_time=50.0, risk_investigation_time=100.0" +asset_id,taxonomy,lon,lat,structural-no_damage,structural-slight,structural-moderate,structural-extreme,structural-complete a3,Concrete,-122.57000,38.11300,9.715460E-01,1.674465E-02,9.344452E-03,1.960580E-03,4.043083E-04 a2,Wood,-122.11400,38.11300,1.525715E-01,1.019327E-01,1.998341E-01,1.913907E-01,3.542711E-01 a5,Steel,-122.00000,37.91000,6.723406E-01,2.125659E-01,7.829046E-02,2.886303E-02,7.940013E-03 diff --git a/openquake/qa_tests_data/classical_damage/case_7b/expected/damages.csv b/openquake/qa_tests_data/classical_damage/case_7b/expected/damages.csv index f3e7abe63595..0128f238575b 100644 --- a/openquake/qa_tests_data/classical_damage/case_7b/expected/damages.csv +++ b/openquake/qa_tests_data/classical_damage/case_7b/expected/damages.csv @@ -1,5 +1,5 @@ -#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git513b65764c', start_date='2024-11-07T08:00:47', checksum=1854794373, investigation_time=50.0, risk_investigation_time=100.0" -asset_id,taxonomy,lon,lat,structural~no_damage,structural~slight,structural~moderate,structural~extreme,structural~complete +#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git2d65903bd5', start_date='2024-11-18T09:02:19', checksum=1854794373, investigation_time=50.0, risk_investigation_time=100.0" +asset_id,taxonomy,lon,lat,structural-no_damage,structural-slight,structural-moderate,structural-extreme,structural-complete a3,Concrete,-122.57000,38.11300,8.320150E-01,9.314736E-02,5.784500E-02,1.356662E-02,3.426057E-03 a2,Wood,-122.11400,38.11300,1.525715E-01,1.019327E-01,1.998341E-01,1.913907E-01,3.542711E-01 a5,Steel,-122.00000,37.91000,6.495011E-01,2.043248E-01,8.885578E-02,3.863911E-02,1.867928E-02 diff --git a/openquake/qa_tests_data/classical_damage/case_7c/expected/damages.csv b/openquake/qa_tests_data/classical_damage/case_7c/expected/damages.csv index 349ce81c63a6..93dc97f6360c 100644 --- a/openquake/qa_tests_data/classical_damage/case_7c/expected/damages.csv +++ b/openquake/qa_tests_data/classical_damage/case_7c/expected/damages.csv @@ -1,5 +1,5 @@ -#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git513b65764c', start_date='2024-11-07T08:00:42', checksum=600829777, investigation_time=50.0, risk_investigation_time=100.0" -asset_id,taxonomy,lon,lat,structural~no_damage,structural~slight,structural~moderate,structural~extreme,structural~complete +#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git2d65903bd5', start_date='2024-11-18T09:02:19', checksum=600829777, investigation_time=50.0, risk_investigation_time=100.0" +asset_id,taxonomy,lon,lat,structural-no_damage,structural-slight,structural-moderate,structural-extreme,structural-complete a3,Concrete,-122.57000,38.11300,9.258837E-01,4.052197E-02,2.525626E-02,6.404613E-03,1.933493E-03 a2,Wood,-122.11400,38.11300,1.155880E-01,9.698609E-02,2.055046E-01,2.054873E-01,3.764340E-01 a5,Steel,-122.00000,37.91000,8.366967E-01,1.024834E-01,3.921779E-02,1.597913E-02,5.623030E-03 diff --git a/openquake/qa_tests_data/classical_damage/case_8a/expected/damages-rlzs-AkkarBommer2010().csv b/openquake/qa_tests_data/classical_damage/case_8a/expected/damages-rlzs-AkkarBommer2010().csv index 45ed0d117ca6..4f0599fa95ca 100644 --- a/openquake/qa_tests_data/classical_damage/case_8a/expected/damages-rlzs-AkkarBommer2010().csv +++ b/openquake/qa_tests_data/classical_damage/case_8a/expected/damages-rlzs-AkkarBommer2010().csv @@ -1,3 +1,3 @@ -#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git513b65764c', start_date='2024-11-07T08:00:43', checksum=2451218011, investigation_time=1.0, risk_investigation_time=1.0" -asset_id,taxonomy,lon,lat,structural~no_damage,structural~slight,structural~moderate,structural~extreme,structural~complete +#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git2d65903bd5', start_date='2024-11-18T09:02:14', checksum=2451218011, investigation_time=1.0, risk_investigation_time=1.0" +asset_id,taxonomy,lon,lat,structural-no_damage,structural-slight,structural-moderate,structural-extreme,structural-complete a1,Wood,-122.00000,38.11300,9.735332E-01,5.609893E-03,7.101945E-03,4.977664E-03,8.777341E-03 diff --git a/openquake/qa_tests_data/classical_damage/case_8a/expected/damages-rlzs-SadighEtAl1997().csv b/openquake/qa_tests_data/classical_damage/case_8a/expected/damages-rlzs-SadighEtAl1997().csv index d62a7edf8bed..6e9d18331b32 100644 --- a/openquake/qa_tests_data/classical_damage/case_8a/expected/damages-rlzs-SadighEtAl1997().csv +++ b/openquake/qa_tests_data/classical_damage/case_8a/expected/damages-rlzs-SadighEtAl1997().csv @@ -1,3 +1,3 @@ -#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git513b65764c', start_date='2024-11-07T08:00:43', checksum=2451218011, investigation_time=1.0, risk_investigation_time=1.0" -asset_id,taxonomy,lon,lat,structural~no_damage,structural~slight,structural~moderate,structural~extreme,structural~complete +#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git2d65903bd5', start_date='2024-11-18T09:02:14', checksum=2451218011, investigation_time=1.0, risk_investigation_time=1.0" +asset_id,taxonomy,lon,lat,structural-no_damage,structural-slight,structural-moderate,structural-extreme,structural-complete a1,Wood,-122.00000,38.11300,9.719827E-01,5.033605E-03,6.772837E-03,5.137749E-03,1.107308E-02 diff --git a/openquake/qa_tests_data/classical_damage/case_8a/expected/damages-stats.csv b/openquake/qa_tests_data/classical_damage/case_8a/expected/damages-stats.csv index 4c80c3638ca5..98ae0de7a3fe 100644 --- a/openquake/qa_tests_data/classical_damage/case_8a/expected/damages-stats.csv +++ b/openquake/qa_tests_data/classical_damage/case_8a/expected/damages-stats.csv @@ -1,3 +1,3 @@ -#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git513b65764c', start_date='2024-11-07T08:00:43', checksum=2451218011, investigation_time=1.0, risk_investigation_time=1.0" -asset_id,taxonomy,lon,lat,structural~no_damage,structural~slight,structural~moderate,structural~extreme,structural~complete +#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git2d65903bd5', start_date='2024-11-18T09:02:14', checksum=2451218011, investigation_time=1.0, risk_investigation_time=1.0" +asset_id,taxonomy,lon,lat,structural-no_damage,structural-slight,structural-moderate,structural-extreme,structural-complete a1,Wood,-122.00000,38.11300,9.727579E-01,5.321749E-03,6.937391E-03,5.057706E-03,9.925210E-03 diff --git a/openquake/qa_tests_data/classical_damage/case_master/expected/damages-rlz-000.csv b/openquake/qa_tests_data/classical_damage/case_master/expected/damages-rlz-000.csv index be753579b5e9..dd163ba417fa 100644 --- a/openquake/qa_tests_data/classical_damage/case_master/expected/damages-rlz-000.csv +++ b/openquake/qa_tests_data/classical_damage/case_master/expected/damages-rlz-000.csv @@ -1,5 +1,5 @@ -#,,,,,,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git513b65764c', start_date='2024-11-07T08:00:44', checksum=3613274803, investigation_time=1.0, risk_investigation_time=1.0" -asset_id,taxonomy,lon,lat,nonstructural~no_damage,nonstructural~ds1,nonstructural~ds2,nonstructural~ds3,nonstructural~ds4,structural~no_damage,structural~ds1,structural~ds2,structural~ds3,structural~ds4 +#,,,,,,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git2d65903bd5', start_date='2024-11-18T09:02:20', checksum=3613274803, investigation_time=1.0, risk_investigation_time=1.0" +asset_id,taxonomy,lon,lat,nonstructural-no_damage,nonstructural-ds1,nonstructural-ds2,nonstructural-ds3,nonstructural-ds4,structural-no_damage,structural-ds1,structural-ds2,structural-ds3,structural-ds4 a3,tax1,-122.57000,38.11300,9.983076E-01,1.527232E-03,1.651152E-04,7.544838E-08,0.000000E+00,9.999696E-01,2.261184E-05,-1.226951E-05,-2.393570E-05,4.399191E-05 a2,tax2,-122.11400,38.11300,9.809822E-01,1.221998E-02,4.069914E-03,1.754149E-03,9.737471E-04,9.322674E-01,4.585588E-02,1.835168E-02,3.067535E-03,4.575377E-04 a5,tax1,-122.00000,37.91000,9.875183E-01,1.045591E-02,2.004337E-03,2.144953E-05,4.619409E-10,9.997233E-01,2.157100E-04,-7.729786E-05,-1.565156E-04,2.948542E-04 diff --git a/openquake/qa_tests_data/classical_damage/case_master/expected/damages-rlz-001.csv b/openquake/qa_tests_data/classical_damage/case_master/expected/damages-rlz-001.csv index 11a184c443fa..b44406f57b9d 100644 --- a/openquake/qa_tests_data/classical_damage/case_master/expected/damages-rlz-001.csv +++ b/openquake/qa_tests_data/classical_damage/case_master/expected/damages-rlz-001.csv @@ -1,5 +1,5 @@ -#,,,,,,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git513b65764c', start_date='2024-11-07T08:00:44', checksum=3613274803, investigation_time=1.0, risk_investigation_time=1.0" -asset_id,taxonomy,lon,lat,nonstructural~no_damage,nonstructural~ds1,nonstructural~ds2,nonstructural~ds3,nonstructural~ds4,structural~no_damage,structural~ds1,structural~ds2,structural~ds3,structural~ds4 +#,,,,,,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git2d65903bd5', start_date='2024-11-18T09:02:20', checksum=3613274803, investigation_time=1.0, risk_investigation_time=1.0" +asset_id,taxonomy,lon,lat,nonstructural-no_damage,nonstructural-ds1,nonstructural-ds2,nonstructural-ds3,nonstructural-ds4,structural-no_damage,structural-ds1,structural-ds2,structural-ds3,structural-ds4 a3,tax1,-122.57000,38.11300,9.983076E-01,1.527232E-03,1.651152E-04,7.544838E-08,0.000000E+00,9.999696E-01,2.261184E-05,-1.226951E-05,-2.393570E-05,4.399191E-05 a2,tax2,-122.11400,38.11300,9.916147E-01,5.358553E-03,1.792668E-03,7.825203E-04,4.515546E-04,9.533088E-01,3.180291E-02,1.251272E-02,2.067391E-03,3.082247E-04 a5,tax1,-122.00000,37.91000,9.895928E-01,8.501125E-03,1.884660E-03,2.144932E-05,4.619409E-10,9.997671E-01,1.831161E-04,-5.960704E-05,-1.220105E-04,2.314303E-04 diff --git a/openquake/qa_tests_data/classical_damage/case_master/expected/damages-rlz-002.csv b/openquake/qa_tests_data/classical_damage/case_master/expected/damages-rlz-002.csv index 31eaed3aec8e..a474691413f0 100644 --- a/openquake/qa_tests_data/classical_damage/case_master/expected/damages-rlz-002.csv +++ b/openquake/qa_tests_data/classical_damage/case_master/expected/damages-rlz-002.csv @@ -1,5 +1,5 @@ -#,,,,,,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git513b65764c', start_date='2024-11-07T08:00:44', checksum=3613274803, investigation_time=1.0, risk_investigation_time=1.0" -asset_id,taxonomy,lon,lat,nonstructural~no_damage,nonstructural~ds1,nonstructural~ds2,nonstructural~ds3,nonstructural~ds4,structural~no_damage,structural~ds1,structural~ds2,structural~ds3,structural~ds4 +#,,,,,,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git2d65903bd5', start_date='2024-11-18T09:02:20', checksum=3613274803, investigation_time=1.0, risk_investigation_time=1.0" +asset_id,taxonomy,lon,lat,nonstructural-no_damage,nonstructural-ds1,nonstructural-ds2,nonstructural-ds3,nonstructural-ds4,structural-no_damage,structural-ds1,structural-ds2,structural-ds3,structural-ds4 a3,tax1,-122.57000,38.11300,9.991991E-01,7.334561E-04,6.742248E-05,6.752652E-09,0.000000E+00,9.999850E-01,1.112310E-05,-6.036313E-06,-1.177593E-05,2.164294E-05 a2,tax2,-122.11400,38.11300,9.782484E-01,1.333818E-02,4.836492E-03,2.198229E-03,1.378694E-03,9.307349E-01,4.636396E-02,1.894894E-02,3.355900E-03,5.963054E-04 a5,tax1,-122.00000,37.91000,9.852112E-01,1.167905E-02,3.039333E-03,7.043164E-05,7.509417E-09,9.994944E-01,4.069995E-04,-7.434270E-05,-1.713099E-04,3.442393E-04 diff --git a/openquake/qa_tests_data/classical_damage/case_master/expected/damages-rlz-003.csv b/openquake/qa_tests_data/classical_damage/case_master/expected/damages-rlz-003.csv index b7239468b5c3..78953d99a3c5 100644 --- a/openquake/qa_tests_data/classical_damage/case_master/expected/damages-rlz-003.csv +++ b/openquake/qa_tests_data/classical_damage/case_master/expected/damages-rlz-003.csv @@ -1,5 +1,5 @@ -#,,,,,,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git513b65764c', start_date='2024-11-07T08:00:44', checksum=3613274803, investigation_time=1.0, risk_investigation_time=1.0" -asset_id,taxonomy,lon,lat,nonstructural~no_damage,nonstructural~ds1,nonstructural~ds2,nonstructural~ds3,nonstructural~ds4,structural~no_damage,structural~ds1,structural~ds2,structural~ds3,structural~ds4 +#,,,,,,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git2d65903bd5', start_date='2024-11-18T09:02:20', checksum=3613274803, investigation_time=1.0, risk_investigation_time=1.0" +asset_id,taxonomy,lon,lat,nonstructural-no_damage,nonstructural-ds1,nonstructural-ds2,nonstructural-ds3,nonstructural-ds4,structural-no_damage,structural-ds1,structural-ds2,structural-ds3,structural-ds4 a3,tax1,-122.57000,38.11300,9.991991E-01,7.334561E-04,6.742248E-05,6.752652E-09,0.000000E+00,9.999850E-01,1.112310E-05,-6.036313E-06,-1.177593E-05,2.164294E-05 a2,tax2,-122.11400,38.11300,9.888512E-01,6.500258E-03,2.564109E-03,1.227661E-03,8.567129E-04,9.517417E-01,3.233826E-02,1.311680E-02,2.356229E-03,4.470131E-04 a5,tax1,-122.00000,37.91000,9.872808E-01,9.728986E-03,2.919785E-03,7.043143E-05,7.509417E-09,9.995382E-01,3.744152E-04,-5.665246E-05,-1.368070E-04,2.808186E-04 diff --git a/openquake/qa_tests_data/classical_damage/case_master/expected/damages-rlz-004.csv b/openquake/qa_tests_data/classical_damage/case_master/expected/damages-rlz-004.csv index bca25438e2a8..9d1fec0a38dd 100644 --- a/openquake/qa_tests_data/classical_damage/case_master/expected/damages-rlz-004.csv +++ b/openquake/qa_tests_data/classical_damage/case_master/expected/damages-rlz-004.csv @@ -1,5 +1,5 @@ -#,,,,,,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git513b65764c', start_date='2024-11-07T08:00:44', checksum=3613274803, investigation_time=1.0, risk_investigation_time=1.0" -asset_id,taxonomy,lon,lat,nonstructural~no_damage,nonstructural~ds1,nonstructural~ds2,nonstructural~ds3,nonstructural~ds4,structural~no_damage,structural~ds1,structural~ds2,structural~ds3,structural~ds4 +#,,,,,,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git2d65903bd5', start_date='2024-11-18T09:02:20', checksum=3613274803, investigation_time=1.0, risk_investigation_time=1.0" +asset_id,taxonomy,lon,lat,nonstructural-no_damage,nonstructural-ds1,nonstructural-ds2,nonstructural-ds3,nonstructural-ds4,structural-no_damage,structural-ds1,structural-ds2,structural-ds3,structural-ds4 a3,tax1,-122.57000,38.11300,9.963378E-01,2.934118E-03,7.117256E-04,1.636213E-05,2.802008E-10,9.998759E-01,1.001978E-04,-1.900840E-05,-4.311249E-05,8.599729E-05 a2,tax2,-122.11400,38.11300,9.946490E-01,2.543827E-03,1.334802E-03,7.458194E-04,7.265416E-04,9.935337E-01,3.635901E-03,1.967967E-03,6.055560E-04,2.568487E-04 a5,tax1,-122.00000,37.91000,9.864895E-01,9.644997E-03,3.386594E-03,4.690023E-04,9.957131E-06,9.982929E-01,1.166614E-03,1.155449E-04,-9.807565E-05,5.230483E-04 diff --git a/openquake/qa_tests_data/classical_damage/case_master/expected/damages-rlz-005.csv b/openquake/qa_tests_data/classical_damage/case_master/expected/damages-rlz-005.csv index 47918ae30815..98c93ec0acce 100644 --- a/openquake/qa_tests_data/classical_damage/case_master/expected/damages-rlz-005.csv +++ b/openquake/qa_tests_data/classical_damage/case_master/expected/damages-rlz-005.csv @@ -1,5 +1,5 @@ -#,,,,,,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git513b65764c', start_date='2024-11-07T08:00:44', checksum=3613274803, investigation_time=1.0, risk_investigation_time=1.0" -asset_id,taxonomy,lon,lat,nonstructural~no_damage,nonstructural~ds1,nonstructural~ds2,nonstructural~ds3,nonstructural~ds4,structural~no_damage,structural~ds1,structural~ds2,structural~ds3,structural~ds4 +#,,,,,,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git2d65903bd5', start_date='2024-11-18T09:02:20', checksum=3613274803, investigation_time=1.0, risk_investigation_time=1.0" +asset_id,taxonomy,lon,lat,nonstructural-no_damage,nonstructural-ds1,nonstructural-ds2,nonstructural-ds3,nonstructural-ds4,structural-no_damage,structural-ds1,structural-ds2,structural-ds3,structural-ds4 a3,tax1,-122.57000,38.11300,9.961314E-01,3.077408E-03,7.802437E-04,1.099757E-05,7.240875E-12,9.999031E-01,7.803310E-05,-2.176010E-05,-4.462452E-05,8.526585E-05 a2,tax2,-122.11400,38.11300,9.944187E-01,2.591671E-03,1.403924E-03,7.974521E-04,7.881921E-04,9.930049E-01,3.725733E-03,2.151848E-03,7.463385E-04,3.712521E-04 a5,tax1,-122.00000,37.91000,9.864172E-01,9.650618E-03,3.516001E-03,4.124024E-04,3.772452E-06,9.982938E-01,1.252433E-03,8.353237E-05,-1.134513E-04,4.836516E-04 diff --git a/openquake/qa_tests_data/classical_damage/case_master/expected/damages-rlz-006.csv b/openquake/qa_tests_data/classical_damage/case_master/expected/damages-rlz-006.csv index 7406e292cdee..41d9692e0a8b 100644 --- a/openquake/qa_tests_data/classical_damage/case_master/expected/damages-rlz-006.csv +++ b/openquake/qa_tests_data/classical_damage/case_master/expected/damages-rlz-006.csv @@ -1,5 +1,5 @@ -#,,,,,,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git513b65764c', start_date='2024-11-07T08:00:44', checksum=3613274803, investigation_time=1.0, risk_investigation_time=1.0" -asset_id,taxonomy,lon,lat,nonstructural~no_damage,nonstructural~ds1,nonstructural~ds2,nonstructural~ds3,nonstructural~ds4,structural~no_damage,structural~ds1,structural~ds2,structural~ds3,structural~ds4 +#,,,,,,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git2d65903bd5', start_date='2024-11-18T09:02:20', checksum=3613274803, investigation_time=1.0, risk_investigation_time=1.0" +asset_id,taxonomy,lon,lat,nonstructural-no_damage,nonstructural-ds1,nonstructural-ds2,nonstructural-ds3,nonstructural-ds4,structural-no_damage,structural-ds1,structural-ds2,structural-ds3,structural-ds4 a3,tax1,-122.57000,38.11300,9.972275E-01,2.142046E-03,6.140879E-04,1.629344E-05,2.802008E-10,9.998913E-01,8.871040E-05,-1.277537E-05,-3.095343E-05,6.364926E-05 a2,tax2,-122.11400,38.11300,9.918771E-01,3.693631E-03,2.106803E-03,1.190868E-03,1.131588E-03,9.919006E-01,4.224747E-03,2.584032E-03,8.950350E-04,3.956442E-04 a5,tax1,-122.00000,37.91000,9.841847E-01,1.086774E-02,4.419613E-03,5.179620E-04,9.964177E-06,9.980643E-01,1.357594E-03,1.184920E-04,-1.128686E-04,5.724221E-04 diff --git a/openquake/qa_tests_data/classical_damage/case_master/expected/damages-rlz-007.csv b/openquake/qa_tests_data/classical_damage/case_master/expected/damages-rlz-007.csv index fa13584d7c02..14b8ced6f5b2 100644 --- a/openquake/qa_tests_data/classical_damage/case_master/expected/damages-rlz-007.csv +++ b/openquake/qa_tests_data/classical_damage/case_master/expected/damages-rlz-007.csv @@ -1,5 +1,5 @@ -#,,,,,,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git513b65764c', start_date='2024-11-07T08:00:44', checksum=3613274803, investigation_time=1.0, risk_investigation_time=1.0" -asset_id,taxonomy,lon,lat,nonstructural~no_damage,nonstructural~ds1,nonstructural~ds2,nonstructural~ds3,nonstructural~ds4,structural~no_damage,structural~ds1,structural~ds2,structural~ds3,structural~ds4 +#,,,,,,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git2d65903bd5', start_date='2024-11-18T09:02:20', checksum=3613274803, investigation_time=1.0, risk_investigation_time=1.0" +asset_id,taxonomy,lon,lat,nonstructural-no_damage,nonstructural-ds1,nonstructural-ds2,nonstructural-ds3,nonstructural-ds4,structural-no_damage,structural-ds1,structural-ds2,structural-ds3,structural-ds4 a3,tax1,-122.57000,38.11300,9.970210E-01,2.285514E-03,6.826122E-04,1.092887E-05,7.240875E-12,9.999185E-01,6.654534E-05,-1.552706E-05,-3.246546E-05,6.291780E-05 a2,tax2,-122.11400,38.11300,9.916475E-01,3.741130E-03,2.175724E-03,1.242429E-03,1.193214E-03,9.913725E-01,4.314169E-03,2.767563E-03,1.035724E-03,5.100318E-04 a5,tax1,-122.00000,37.91000,9.841127E-01,1.087326E-02,4.548945E-03,4.613652E-04,3.779499E-06,9.980654E-01,1.443410E-03,8.648081E-05,-1.282443E-04,5.330274E-04 diff --git a/openquake/qa_tests_data/event_based_damage/case_11/expected/avg_risk-rlz-000.csv b/openquake/qa_tests_data/event_based_damage/case_11/expected/avg_risk-rlz-000.csv index 664e36770703..6b44a8b20471 100644 --- a/openquake/qa_tests_data/event_based_damage/case_11/expected/avg_risk-rlz-000.csv +++ b/openquake/qa_tests_data/event_based_damage/case_11/expected/avg_risk-rlz-000.csv @@ -1,5 +1,5 @@ -#,,,,,,,,,"generated_by='OpenQuake engine 3.22.0-gitdf92f4b764', start_date='2024-11-07T06:26:15', checksum=1238170924, investigation_time=1.0, risk_investigation_time=1.0" -asset_id,city,county,state,taxonomy,tract,zip,lon,lat,structural~losses +#,,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git6e6623ae9e', start_date='2024-11-18T09:37:05', checksum=3040345284, investigation_time=1.0, risk_investigation_time=1.0" +asset_id,city,county,state,taxonomy,tract,zip,lon,lat,structural-losses a3,Novato,Marin,California,tax1,102203,94945,-122.57000,38.11300,1.882223E+01 a2,Benicia,Solano,California,tax2,252102,94510,-122.11400,38.11300,1.776466E+01 a5,Walnut Creek,Contra Costa,California,tax1,338302,94598,-122.00000,37.91000,1.882223E+01 diff --git a/openquake/qa_tests_data/event_based_damage/case_15/expected/avg_risk-mean.csv b/openquake/qa_tests_data/event_based_damage/case_15/expected/avg_risk-mean.csv index ca2586541ffd..018c054e2b04 100644 --- a/openquake/qa_tests_data/event_based_damage/case_15/expected/avg_risk-mean.csv +++ b/openquake/qa_tests_data/event_based_damage/case_15/expected/avg_risk-mean.csv @@ -1,5 +1,5 @@ -#,,,,,,,,,"generated_by='OpenQuake engine 3.22.0-gitdf92f4b764', start_date='2024-11-07T06:35:21', checksum=4005254018, investigation_time=1.0, risk_investigation_time=1.0" -asset_id,NAME_1,NAME_2,NAME_3,NAME_4,taxonomy,lon,lat,structural~fatalities,structural~losses +#,,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git6e6623ae9e', start_date='2024-11-18T09:37:16', checksum=3380695847, investigation_time=1.0, risk_investigation_time=1.0" +asset_id,NAME_1,NAME_2,NAME_3,NAME_4,taxonomy,lon,lat,structural-fatalities,structural-losses a2568,Mid-Western,Bheri,Bardiya,Royal Bardiya Nation,Adobe,81.51382,28.41117,2.581785E-01,9.995212E+02 a4540,Mid-Western,Karnali,Humla,Limi,Stone-Masonry,81.51382,30.28617,1.444690E-02,5.851295E+01 a7243,Mid-Western,Karnali,Humla,Limi,Unreinforced-Brick-Masonry,81.66382,30.36117,1.647232E-01,8.762142E+02 diff --git a/openquake/qa_tests_data/event_based_damage/case_16/dmgdist.txt b/openquake/qa_tests_data/event_based_damage/case_16/dmgdist.txt index bbee63f5b39a..bb7f747480d2 100644 --- a/openquake/qa_tests_data/event_based_damage/case_16/dmgdist.txt +++ b/openquake/qa_tests_data/event_based_damage/case_16/dmgdist.txt @@ -1,5 +1,5 @@ -| loss_type | total | no_damage | ds1 | ds2 | ds3 | ds4 | -|---------------+---------+-----------+--------+--------+--------+--------| -| contents | 28.0000 | 23.8496 | 1.8935 | 1.1520 | 0.7675 | 0.3374 | -| nonstructural | 28.0000 | 23.7033 | 3.0987 | 1.0226 | 0.1310 | 0.0444 | -| structural | 28.0000 | 26.4545 | 0.9210 | 0.3491 | 0.0631 | 0.2122 | \ No newline at end of file +| no_damage | loss_type | ds1 | ds2 | ds3 | ds4 | losses | +|-----------+---------------+--------+--------+--------+--------+--------| +| 23.8496 | contents | 1.8935 | 1.1520 | 0.7675 | 0.3374 | 0.0 | +| 23.7033 | nonstructural | 3.0987 | 1.0226 | 0.1310 | 0.0444 | 0.0 | +| 26.4545 | structural | 0.9210 | 0.3491 | 0.0631 | 0.2122 | 9_089 | \ No newline at end of file diff --git a/openquake/qa_tests_data/scenario_damage/case_11/expected/avg_damages1.csv b/openquake/qa_tests_data/scenario_damage/case_11/expected/avg_damages1.csv index d0ad2bc6bab0..2bf88e1e25f9 100644 --- a/openquake/qa_tests_data/scenario_damage/case_11/expected/avg_damages1.csv +++ b/openquake/qa_tests_data/scenario_damage/case_11/expected/avg_damages1.csv @@ -1,5 +1,5 @@ -#,,,,,,"generated_by='OpenQuake engine 3.22.0-git513b65764c', start_date='2024-11-07T08:01:13', checksum=3809191584" -asset_id,taxonomy,lon,lat,structural~no_damage,structural~moderate,structural~complete +#,,,,,,"generated_by='OpenQuake engine 3.22.0-git6e6623ae9e', start_date='2024-11-18T09:23:44', checksum=3809191584" +asset_id,taxonomy,lon,lat,structural-no_damage,structural-moderate,structural-complete a0,A,0.00000,0.00000,6.409512E-01,2.162399E+00,7.196651E+00 a1,B,0.00000,1.00000,8.722662E+00,6.244274E+00,5.033065E+00 a2,A,0.00000,2.00000,1.482586E+01,7.888979E+00,7.285164E+00 diff --git a/openquake/qa_tests_data/scenario_damage/case_17/expected/avg_damages-rlz-000_no_time_event.csv b/openquake/qa_tests_data/scenario_damage/case_17/expected/avg_damages-rlz-000_no_time_event.csv index 343fd8686bfc..574c803ebf85 100644 --- a/openquake/qa_tests_data/scenario_damage/case_17/expected/avg_damages-rlz-000_no_time_event.csv +++ b/openquake/qa_tests_data/scenario_damage/case_17/expected/avg_damages-rlz-000_no_time_event.csv @@ -1,5 +1,5 @@ -#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git513b65764c', start_date='2024-11-07T08:01:12', checksum=2581085371" -asset_id,taxonomy,lon,lat,structural~no_damage,structural~uninhabitable,structural~collapsed,structural~fatalities,structural~homeless +#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git6e6623ae9e', start_date='2024-11-18T09:23:44', checksum=2581085371" +asset_id,taxonomy,lon,lat,structural-no_damage,structural-uninhabitable,structural-collapsed,structural-fatalities,structural-homeless NO DAMAGE,ND,-116.94505,32.51463,1.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00 UNINHABITABLE,UH,-116.94505,32.51463,0.000000E+00,1.000000E+00,0.000000E+00,0.000000E+00,1.000000E+02 COLLAPSED,CP,-116.94505,32.51463,0.000000E+00,0.000000E+00,1.000000E+00,5.666667E+01,0.000000E+00 diff --git a/openquake/qa_tests_data/scenario_damage/case_17/expected/avg_damages-rlz-000_time_event_day.csv b/openquake/qa_tests_data/scenario_damage/case_17/expected/avg_damages-rlz-000_time_event_day.csv index f1927803ca46..130b53ff2bb0 100644 --- a/openquake/qa_tests_data/scenario_damage/case_17/expected/avg_damages-rlz-000_time_event_day.csv +++ b/openquake/qa_tests_data/scenario_damage/case_17/expected/avg_damages-rlz-000_time_event_day.csv @@ -1,5 +1,5 @@ -#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git513b65764c', start_date='2024-11-07T08:01:13', checksum=1354447992" -asset_id,taxonomy,lon,lat,structural~no_damage,structural~uninhabitable,structural~collapsed,structural~fatalities,structural~homeless +#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git6e6623ae9e', start_date='2024-11-18T09:23:44', checksum=1354447992" +asset_id,taxonomy,lon,lat,structural-no_damage,structural-uninhabitable,structural-collapsed,structural-fatalities,structural-homeless NO DAMAGE,ND,-116.94505,32.51463,1.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00 UNINHABITABLE,UH,-116.94505,32.51463,0.000000E+00,1.000000E+00,0.000000E+00,0.000000E+00,1.000000E+02 COLLAPSED,CP,-116.94505,32.51463,0.000000E+00,0.000000E+00,1.000000E+00,6.000000E+01,0.000000E+00 diff --git a/openquake/qa_tests_data/scenario_damage/case_2/expected/dmg_by_asset.csv b/openquake/qa_tests_data/scenario_damage/case_2/expected/dmg_by_asset.csv index e905bfc1284f..6e631ece4929 100644 --- a/openquake/qa_tests_data/scenario_damage/case_2/expected/dmg_by_asset.csv +++ b/openquake/qa_tests_data/scenario_damage/case_2/expected/dmg_by_asset.csv @@ -1,5 +1,5 @@ -#,,,,,,"generated_by='OpenQuake engine 3.22.0-gitdf92f4b764', start_date='2024-11-07T06:47:51', checksum=1759997895" -asset_id,taxonomy,lon,lat,structural~no_damage,structural~LS1,structural~LS2 +#,,,,,,"generated_by='OpenQuake engine 3.22.0-git6e6623ae9e', start_date='2024-11-18T09:23:44', checksum=1720217140" +asset_id,taxonomy,lon,lat,structural-no_damage,structural-LS1,structural-LS2 a1,RM,15.48000,38.09000,1.252400E+03,1.160500E+03,5.871000E+02 a3,RM,15.48000,38.25000,1.274000E+02,3.635000E+02,5.091000E+02 a2,RC,15.56000,38.17000,6.723000E+02,9.649000E+02,3.628000E+02 diff --git a/openquake/qa_tests_data/scenario_damage/case_22/expected/dmg.csv b/openquake/qa_tests_data/scenario_damage/case_22/expected/dmg.csv index e8f48ec88e1d..d2187da93917 100644 --- a/openquake/qa_tests_data/scenario_damage/case_22/expected/dmg.csv +++ b/openquake/qa_tests_data/scenario_damage/case_22/expected/dmg.csv @@ -1,17 +1,17 @@ -#,,,,,,,,,,"generated_by='OpenQuake engine 3.22.0-gitdf92f4b764', start_date='2024-11-07T06:47:53', checksum=1254831794" -asset_id,NAME_1,taxonomy,lon,lat,structural~no_damage,structural~slight,structural~moderate,structural~extreme,structural~complete,structural~losses -a1,a,Wood1,83.31382,29.46117,7.801411E-01,1.301565E-01,7.167403E-02,1.495041E-02,3.078026E-03,4.476292E+02 -a2,a,Wood1,83.31382,29.23617,7.971102E-01,1.201108E-01,6.614210E-02,1.379650E-02,2.840465E-03,4.130804E+02 -a3,a,Wood1,83.53882,29.08617,6.995793E-01,1.664932E-01,1.008736E-01,2.538038E-02,7.673490E-03,6.898380E+02 -a4,a,Wood1,80.68882,28.93617,1.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00 -a5,a,Wood1,83.53882,29.01117,5.816740E-01,2.215957E-01,1.431113E-01,3.980681E-02,1.381211E-02,1.031084E+03 -a6,a,Wood1,81.13882,28.78617,1.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00 -a7,a,Wood1,83.98882,28.48617,2.732201E-01,2.542852E-01,2.626550E-01,1.192409E-01,9.059871E-02,2.763948E+03 -a8,a,Concrete1,83.23882,29.38617,4.304808E-01,2.356633E-02,3.248136E-02,2.912861E-02,4.843429E-01,3.547600E+03 -a9,a,Concrete1,83.01382,29.08617,3.883127E-01,3.027743E-02,4.171199E-02,3.736362E-02,5.023342E-01,3.339751E+03 -a10,a,Concrete1,83.31382,28.71117,1.177844E-01,2.779621E-02,3.839571E-02,3.461971E-02,7.814040E-01,6.332979E+03 -a11,a,Concrete1,86.91382,27.73617,5.506500E-01,2.571168E-02,3.542192E-02,3.172928E-02,3.564871E-01,2.155821E+03 -a12,a,Concrete1,83.16382,29.31117,4.493183E-01,3.425396E-02,4.719029E-02,4.227083E-02,4.269666E-01,2.653371E+03 -a13,a,Concrete1,80.61382,28.93617,1.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00 -a14,a,Concrete1,83.91382,29.01117,3.962755E-02,1.441644E-02,2.011603E-02,1.858578E-02,9.072542E-01,8.394333E+03 -a15,a,Concrete1,82.03882,30.28617,1.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00 +#,,,,,,,,,,,,,,,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git6e6623ae9e', start_date='2024-11-18T09:23:44', checksum=1254831794" +asset_id,NAME_1,taxonomy,lon,lat,structural-no_damage,structural-slight,structural-moderate,structural-extreme,structural-complete,structural-losses,landslide-structural-no_damage,landslide-structural-slight,landslide-structural-moderate,landslide-structural-extreme,landslide-structural-complete,landslide-structural-losses,liquefaction-structural-no_damage,liquefaction-structural-slight,liquefaction-structural-moderate,liquefaction-structural-extreme,liquefaction-structural-complete,liquefaction-structural-losses +a1,a,Wood1,83.31382,29.46117,7.801411E-01,1.301565E-01,7.167402E-02,1.495041E-02,3.078025E-03,4.476292E+02,1.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,1.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00 +a2,a,Wood1,83.31382,29.23617,7.971102E-01,1.201108E-01,6.614208E-02,1.379651E-02,2.840458E-03,4.130804E+02,1.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,1.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00 +a3,a,Wood1,83.53882,29.08617,6.995794E-01,1.664932E-01,1.008736E-01,2.538038E-02,7.673483E-03,6.898380E+02,1.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,1.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00 +a4,a,Wood1,80.68882,28.93617,1.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,1.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,1.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00 +a5,a,Wood1,83.53882,29.01117,5.816740E-01,2.215957E-01,1.431113E-01,3.980681E-02,1.381211E-02,1.031084E+03,1.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,1.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00 +a6,a,Wood1,81.13882,28.78617,1.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,1.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,1.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00 +a7,a,Wood1,83.98882,28.48617,2.739951E-01,2.570021E-01,2.691001E-01,1.246736E-01,7.522905E-02,2.763948E+03,9.888303E-01,0.000000E+00,0.000000E+00,0.000000E+00,1.116969E-02,1.266643E+02,9.888303E-01,0.000000E+00,0.000000E+00,0.000000E+00,1.116969E-02,1.266643E+02 +a8,a,Concrete1,83.23882,29.38617,6.892671E-01,6.743748E-02,9.585159E-02,9.240495E-02,5.503887E-02,1.620410E+03,6.871605E-01,0.000000E+00,0.000000E+00,0.000000E+00,3.128395E-01,3.547600E+03,6.871605E-01,0.000000E+00,0.000000E+00,0.000000E+00,3.128395E-01,3.547600E+03 +a9,a,Concrete1,83.01382,29.08617,6.859808E-01,7.491829E-02,1.032119E-01,9.245236E-02,4.343667E-02,1.518432E+03,7.054893E-01,0.000000E+00,0.000000E+00,0.000000E+00,2.945107E-01,3.339751E+03,7.054893E-01,0.000000E+00,0.000000E+00,0.000000E+00,2.945107E-01,3.339751E+03 +a10,a,Concrete1,83.31382,28.71117,3.848248E-01,1.341326E-01,1.903469E-01,1.828537E-01,1.078420E-01,3.197053E+03,4.415364E-01,0.000000E+00,0.000000E+00,0.000000E+00,5.584636E-01,6.332979E+03,4.415364E-01,0.000000E+00,0.000000E+00,0.000000E+00,5.584636E-01,6.332979E+03 +a11,a,Concrete1,86.91382,27.73617,8.228767E-01,4.225784E-02,5.821691E-02,5.214797E-02,2.450056E-02,8.564750E+02,8.098924E-01,0.000000E+00,0.000000E+00,0.000000E+00,1.901076E-01,2.155821E+03,8.098924E-01,0.000000E+00,0.000000E+00,0.000000E+00,1.901076E-01,2.155821E+03 +a12,a,Concrete1,83.16382,29.31117,7.353302E-01,6.314456E-02,8.699171E-02,7.792307E-02,3.661041E-02,1.279803E+03,7.660167E-01,0.000000E+00,0.000000E+00,0.000000E+00,2.339834E-01,2.653371E+03,7.660167E-01,0.000000E+00,0.000000E+00,0.000000E+00,2.339834E-01,2.653371E+03 +a13,a,Concrete1,80.61382,28.93617,1.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,1.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,1.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00 +a14,a,Concrete1,83.91382,29.01117,2.192764E-01,1.407803E-01,2.123408E-01,2.326716E-01,1.949310E-01,4.603935E+03,2.597590E-01,0.000000E+00,0.000000E+00,0.000000E+00,7.402410E-01,8.394333E+03,2.597590E-01,0.000000E+00,0.000000E+00,0.000000E+00,7.402410E-01,8.394333E+03 +a15,a,Concrete1,82.03882,30.28617,1.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,1.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,1.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00 diff --git a/openquake/qa_tests_data/scenario_damage/case_3/expected/dmg_by_asset.csv b/openquake/qa_tests_data/scenario_damage/case_3/expected/dmg_by_asset.csv index e4a0e94f18f1..eb87b52dbe38 100644 --- a/openquake/qa_tests_data/scenario_damage/case_3/expected/dmg_by_asset.csv +++ b/openquake/qa_tests_data/scenario_damage/case_3/expected/dmg_by_asset.csv @@ -1,3 +1,3 @@ -#,,,,,,"generated_by='OpenQuake engine 3.22.0-gitdf92f4b764', start_date='2024-11-07T06:47:53', checksum=122140578" -asset_id,taxonomy,lon,lat,structural~no_damage,structural~LS1,structural~LS2 +#,,,,,,"generated_by='OpenQuake engine 3.22.0-git6e6623ae9e', start_date='2024-11-18T09:23:45', checksum=1356641807" +asset_id,taxonomy,lon,lat,structural-no_damage,structural-LS1,structural-LS2 a2,RC,15.56000,38.17000,9.912000E+02,7.359000E+02,2.729000E+02 diff --git a/openquake/qa_tests_data/scenario_damage/case_4/expected/dmg_by_asset.csv b/openquake/qa_tests_data/scenario_damage/case_4/expected/dmg_by_asset.csv index 59f1858f880a..eb19dd41963e 100644 --- a/openquake/qa_tests_data/scenario_damage/case_4/expected/dmg_by_asset.csv +++ b/openquake/qa_tests_data/scenario_damage/case_4/expected/dmg_by_asset.csv @@ -1,5 +1,5 @@ -#,,,,,,"generated_by='OpenQuake engine 3.22.0-gitdf92f4b764', start_date='2024-11-07T06:47:53', checksum=786821515" -asset_id,taxonomy,lon,lat,structural~no_damage,structural~LS1,structural~LS2 +#,,,,,,"generated_by='OpenQuake engine 3.22.0-git6e6623ae9e', start_date='2024-11-18T09:23:44', checksum=786821515" +asset_id,taxonomy,lon,lat,structural-no_damage,structural-LS1,structural-LS2 a1,RM,81.29850,29.10980,2.933000E+03,6.700000E+01,0.000000E+00 a2,RC,83.08230,27.90060,2.494000E+02,3.096000E+02,4.410000E+02 a3,W,85.74770,27.90150,1.708000E+02,8.776000E+02,9.516000E+02 diff --git a/openquake/qa_tests_data/scenario_damage/case_5/expected/dmg_by_asset.csv b/openquake/qa_tests_data/scenario_damage/case_5/expected/dmg_by_asset.csv index 891272ad09e6..a358a9290018 100644 --- a/openquake/qa_tests_data/scenario_damage/case_5/expected/dmg_by_asset.csv +++ b/openquake/qa_tests_data/scenario_damage/case_5/expected/dmg_by_asset.csv @@ -1,5 +1,5 @@ -#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-gitdf92f4b764', start_date='2024-11-07T06:47:54', checksum=3886816654" -asset_id,taxonomy,lon,lat,structural~no_damage,structural~slight,structural~moderate,structural~extreme,structural~complete +#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git6e6623ae9e', start_date='2024-11-18T09:23:47', checksum=3886816654" +asset_id,taxonomy,lon,lat,structural-no_damage,structural-slight,structural-moderate,structural-extreme,structural-complete a4351,A,81.13882,28.41117,3.662000E+03,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00 a395,W,81.21382,28.71117,1.800000E+01,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00 a7180,UFB,81.21382,29.98617,3.900000E+01,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00 diff --git a/openquake/qa_tests_data/scenario_damage/case_5a/expected/damages-mean.csv b/openquake/qa_tests_data/scenario_damage/case_5a/expected/damages-mean.csv index 78f5eec101d1..5a249e31bb67 100644 --- a/openquake/qa_tests_data/scenario_damage/case_5a/expected/damages-mean.csv +++ b/openquake/qa_tests_data/scenario_damage/case_5a/expected/damages-mean.csv @@ -1,3 +1,3 @@ -#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-gitdf92f4b764', start_date='2024-11-07T06:47:54', checksum=45496700" -asset_id,taxonomy,lon,lat,structural~no_damage,structural~slight,structural~moderate,structural~extreme,structural~complete +#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git6e6623ae9e', start_date='2024-11-18T09:23:45', checksum=45496700" +asset_id,taxonomy,lon,lat,structural-no_damage,structural-slight,structural-moderate,structural-extreme,structural-complete a1,Wood,-122.00000,38.11300,3.598934E-01,3.131250E-01,1.489449E-01,7.427035E-02,1.037664E-01 diff --git a/openquake/qa_tests_data/scenario_damage/case_6/expected/dmg_by_asset.csv b/openquake/qa_tests_data/scenario_damage/case_6/expected/dmg_by_asset.csv index 31be7917a3fe..ec76f677db45 100644 --- a/openquake/qa_tests_data/scenario_damage/case_6/expected/dmg_by_asset.csv +++ b/openquake/qa_tests_data/scenario_damage/case_6/expected/dmg_by_asset.csv @@ -1,5 +1,5 @@ -#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-gitdf92f4b764', start_date='2024-11-07T06:48:54', checksum=3172484047" -asset_id,taxonomy,lon,lat,structural~no_damage,structural~Slight,structural~Moderate,structural~Extensive,structural~Collapse +#,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git6e6623ae9e', start_date='2024-11-18T09:23:44', checksum=3172484047" +asset_id,taxonomy,lon,lat,structural-no_damage,structural-Slight,structural-Moderate,structural-Extensive,structural-Collapse ant_13_S1,MUR/LWAL/HEX:1,-75.07679,6.90913,2.129000E+03,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00 ant_13_S2,MUR/LWAL/HEX:2,-75.07679,6.90913,4.600000E+02,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00 ant_13_S3,MUR/LWAL/HEX:3,-75.07679,6.90913,7.700000E+01,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00 diff --git a/openquake/qa_tests_data/scenario_damage/case_6/expected/dmg_by_taxon.csv b/openquake/qa_tests_data/scenario_damage/case_6/expected/dmg_by_taxon.csv index 1e14cc9e032e..9027477d4819 100644 --- a/openquake/qa_tests_data/scenario_damage/case_6/expected/dmg_by_taxon.csv +++ b/openquake/qa_tests_data/scenario_damage/case_6/expected/dmg_by_taxon.csv @@ -1,5 +1,5 @@ 2.12900E+03 0.00000E+00 0.00000E+00 0.00000E+00 0.00000E+00 4.60000E+02 0.00000E+00 0.00000E+00 0.00000E+00 0.00000E+00 7.70000E+01 0.00000E+00 0.00000E+00 0.00000E+00 0.00000E+00 -1.49952E+01 4.67994E-03 0.00000E+00 1.22784E-04 0.00000E+00 -9.99717E-01 0.00000E+00 2.38825E-04 4.37652E-05 7.49690E-09 +1.49952E+01 4.68052E-03 0.00000E+00 1.22802E-04 0.00000E+00 +9.99717E-01 0.00000E+00 2.38853E-04 4.37713E-05 7.49877E-09 diff --git a/openquake/qa_tests_data/scenario_damage/case_7/expected/dmg_by_asset.csv b/openquake/qa_tests_data/scenario_damage/case_7/expected/dmg_by_asset.csv index c6c51704b5db..4bd610671dbd 100644 --- a/openquake/qa_tests_data/scenario_damage/case_7/expected/dmg_by_asset.csv +++ b/openquake/qa_tests_data/scenario_damage/case_7/expected/dmg_by_asset.csv @@ -1,3 +1,3 @@ -#,,,,,,,,,,,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git79b7622d51', start_date='2024-11-07T07:22:17', checksum=3817907442" -asset_id,taxonomy,lon,lat,contents~no_damage,contents~ds1,contents~ds2,contents~ds3,contents~ds4,nonstructural~no_damage,nonstructural~ds1,nonstructural~ds2,nonstructural~ds3,nonstructural~ds4,structural~no_damage,structural~ds1,structural~ds2,structural~ds3,structural~ds4 +#,,,,,,,,,,,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git6e6623ae9e', start_date='2024-11-18T09:23:44', checksum=3817907442" +asset_id,taxonomy,lon,lat,contents-no_damage,contents-ds1,contents-ds2,contents-ds3,contents-ds4,nonstructural-no_damage,nonstructural-ds1,nonstructural-ds2,nonstructural-ds3,nonstructural-ds4,structural-no_damage,structural-ds1,structural-ds2,structural-ds3,structural-ds4 a1,tax1,-122.00000,38.11300,1.600000E-01,1.700000E-01,1.200000E-01,2.700000E-01,2.800000E-01,1.400000E-01,2.700000E-01,3.900000E-01,2.000000E-01,0.000000E+00,3.500000E-01,2.800000E-01,1.800000E-01,8.000000E-02,1.100000E-01 diff --git a/openquake/qa_tests_data/scenario_damage/case_9/expected/damages.csv b/openquake/qa_tests_data/scenario_damage/case_9/expected/damages.csv index cdcd7ddc03fa..d56be2e8b613 100644 --- a/openquake/qa_tests_data/scenario_damage/case_9/expected/damages.csv +++ b/openquake/qa_tests_data/scenario_damage/case_9/expected/damages.csv @@ -1,5 +1,5 @@ -#,,,,,,,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git513b65764c', start_date='2024-11-07T08:01:20', checksum=1630009135" -asset_id,Material,Municipio,Provincia,Region,taxonomy,lon,lat,structural~no_damage,structural~slight,structural~moderate,structural~extensive,structural~complete,structural~collapsed,structural~losses +#,,,,,,,,,,,,,,"generated_by='OpenQuake engine 3.22.0-git6e6623ae9e', start_date='2024-11-18T09:23:47', checksum=1630009135" +asset_id,Material,Municipio,Provincia,Region,taxonomy,lon,lat,structural-no_damage,structural-slight,structural-moderate,structural-extensive,structural-complete,structural-collapsed,structural-losses asset_4291,Masonry with reinforcement,PEPILLO SALCEDO,MONTE CRISTI,REGIÓN CIBAO NOROESTE,MCF_LWAL-DNO_H3,-71.65401,19.66566,8.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00 asset_8638,Masonry with reinforcement,SAN JUAN,SAN JUAN,REGIÓN EL VALLE,MR_LWAL-DNO_H1,-71.32667,18.96847,2.289250E+01,1.067500E-01,7.500000E-04,0.000000E+00,0.000000E+00,0.000000E+00,1.989000E+02 asset_7469,Wood,LA CIÉNAGA,BARAHONA,REGIÓN ENRIQUILLO,W-WWD_LWAL-DNO_H1,-71.12000,18.11139,4.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00 diff --git a/openquake/risklib/riskmodels.py b/openquake/risklib/riskmodels.py index 16fb17914048..aab6388fb608 100644 --- a/openquake/risklib/riskmodels.py +++ b/openquake/risklib/riskmodels.py @@ -515,17 +515,6 @@ class ValidationError(Exception): pass -def _cdict(fractions, coeffs, df, lt, perils): - # fractions[P, A, E, D] - # returns peril -> coeffs[A, E] - cdict = {} - for pi, peril in enumerate(perils): - for per, risk_id, weight in zip(df.peril, df.risk_id, df.weight): - if per == peril or per == '*': - cdict[peril] = fractions[pi] @ coeffs[risk_id][peril][lt] * weight - return cdict - - class CompositeRiskModel(collections.abc.Mapping): """ A container (riskid, kind) -> riskmodel @@ -664,10 +653,10 @@ def compute_csq(self, assets, dd5, tmap_df, oq): :param dd5: distribution functions of shape (P, A, E, L, D) :param tmap_df: DataFrame corresponding to the given taxonomy :param oq: OqParam instance with .loss_types and .time_event - :returns: a dict consequence_name, loss_type -> array[A, E] + :returns: a dict consequence_name, loss_type -> array[P, A, E] """ - _P, A, E, _L, _D = dd5.shape - csq = AccumDict(accum=numpy.zeros((A, E))) + P, A, E, _L, _D = dd5.shape + csq = AccumDict(accum=numpy.zeros((P, A, E))) for byname, coeffs in self.consdict.items(): # ex. byname = "losses_by_taxonomy" if len(coeffs): @@ -675,11 +664,17 @@ def compute_csq(self, assets, dd5, tmap_df, oq): # by construction all assets have the same taxonomy for risk_id, df in tmap_df.groupby('risk_id'): for li, lt in enumerate(oq.loss_types): - # dict loss_type -> peril -> coeffs for the given loss type - cdict = _cdict(dd5[:, :, :, li, 1:], - coeffs, df, lt, self.perils) - csq[consequence, li] += scientific.consequence( - consequence, assets, cdict, lt, oq.time_event) + # dict loss_type -> coeffs for the given loss type + for pi, peril in enumerate(self.perils): + if len(df) == 1: + [w] = df.weight + else: # assume one weigth per peril + [w] = df[df.peril == peril].weight + coeff = (dd5[pi, :, :, li, 1:] @ + coeffs[risk_id][peril][lt] * w) + cAE = scientific.consequence( + consequence, assets, coeff, lt, oq.time_event) + csq[consequence, li][pi] += cAE return csq def init(self): @@ -792,6 +787,39 @@ def get_dmg_csq(self): dmgs = ['dmg_%d' % d for d in range(1, D)] return dmgs + self.get_consequences() + def multi_damage_dt(self): + """ + :returns: composite datatype with fields peril-loss_type-damage_state + """ + dcs = self.damage_states + self.get_consequences() + lst = [] + for peril in self.perils: + for ltype in self.oqparam.loss_types: + for dc in dcs: + if peril == 'earthquake': + field = f'{ltype}-{dc}' + else: + field = f'{peril}-{ltype}-{dc}' + lst.append((field, F32)) + return numpy.dtype(lst) + + def to_multi_damage(self, array5d): + """ + :param array5d: array of shape (P, A, R, L, Dc) + :returns: array of shape (A, R) of dtype multi_damage_dt + """ + P, A, R, L, Dc = array5d.shape + arr = numpy.zeros((A, R), self.multi_damage_dt()) + for a in range(A): + for r in range(R): + lst = [] + for pi in range(P): + for li in range(L): + for di in range(Dc): + lst.append(array5d[pi, a, r, li, di]) + arr[a, r] = tuple(lst) + return arr + def make_curve_params(self): # the CurveParams are used only in classical_risk, classical_bcr # NB: populate the inner lists .loss_types too diff --git a/openquake/risklib/scientific.py b/openquake/risklib/scientific.py index 017a503cfb9e..ad05d5c4b73d 100644 --- a/openquake/risklib/scientific.py +++ b/openquake/risklib/scientific.py @@ -1709,7 +1709,7 @@ def output(self, asset_df, haz, sec_losses=(), rndgen=None): update_losses(asset_df, out) yield out - def get_dd4(self, adf, gmf_df, rng=None, C=0, crm=None): + def get_dd5(self, adf, gmf_df, rng=None, C=0, crm=None): """ :param adf: DataFrame of assets on the given site with the same taxonomy @@ -1720,7 +1720,7 @@ def get_dd4(self, adf, gmf_df, rng=None, C=0, crm=None): :param C: Number of consequences :returns: - damage distribution of shape (A, E, L, D+C) + damage distribution of shape (P, A, E, L, D+C) """ A = len(adf) E = len(gmf_df) @@ -1746,23 +1746,14 @@ def get_dd4(self, adf, gmf_df, rng=None, C=0, crm=None): dd5[p, :, :, li, :D] = rng.discrete_dmg_dist( gmf_df.eid, fractions, number) - # compose damage distributions - if self.P > 1: - dd4 = numpy.empty(dd5.shape[1:]) - for li in range(L): - for a in range(A): - for e in range(E): - dd4[a, e, li, :D] = compose_dds(dd5[:, a, e, li, :D]) - else: - dd4 = dd5[0] if crm: csqs = crm.get_consequences() df = crm.tmap_df[crm.tmap_df.taxi == assets[0]['taxonomy']] csq = crm.compute_csq(assets, dd5[:, :, :, :, :D], df, crm.oqparam) csqidx = {dc: i for i, dc in enumerate(csqs, D)} for (cons, li), values in csq.items(): - dd4[:, :, li, csqidx[cons]] = values - return dd4 + dd5[:, :, :, li, csqidx[cons]] = values # (P, A, E) + return dd5 def todict(self): """ @@ -1792,20 +1783,12 @@ def pprint(self): # ####################### Consequences ##################################### # -def _max(coeffs): - perils = list(coeffs) - if len(perils) == 1: - res = coeffs[perils[0]] - else: - res = numpy.array([coeffs[peril] for peril in perils]).max(axis=0) - return res - -def consequence(consequence, assets, cdict, loss_type, time_event): +def consequence(consequence, assets, coeff, loss_type, time_event): """ :param consequence: kind of consequence :param assets: asset array (shape A) - :param cdict: peril -> composite array of coefficients of shape (A, E) + :param coeff: composite array of coefficients of shape (A, E) :param time_event: time event string :returns: array of shape (A, E) """ @@ -1813,17 +1796,17 @@ def consequence(consequence, assets, cdict, loss_type, time_event): raise NotImplementedError(consequence) if consequence.startswith('losses'): res = (assets['value-' + loss_type].reshape(-1, 1) * - _max(cdict)) / assets['value-number'].reshape(-1, 1) + coeff) / assets['value-number'].reshape(-1, 1) return res elif consequence in ['collapsed', 'non_operational']: - return _max(cdict) + return coeff elif consequence in ['injured', 'fatalities']: # NOTE: time_event default is 'avg' values = assets[f'occupants_{time_event}'] / assets['value-number'] - return values.reshape(-1, 1) * _max(cdict) + return values.reshape(-1, 1) * coeff elif consequence == 'homeless': values = assets['value-residents'] / assets['value-number'] - return values.reshape(-1, 1) * _max(cdict) + return values.reshape(-1, 1) * coeff else: raise NotImplementedError(consequence) diff --git a/openquake/risklib/tests/scientific_test.py b/openquake/risklib/tests/scientific_test.py index 4c62e4c03f63..1cd29f3caad6 100644 --- a/openquake/risklib/tests/scientific_test.py +++ b/openquake/risklib/tests/scientific_test.py @@ -788,15 +788,15 @@ def test_5(self): 'sid': [0, 0], 'gmv_0': [.098234, .165975], 'DispProb': [.335, .335]}) - dd4 = rc.get_dd4(asset_df, gmf_df) # (A, E, L, D) - dd0 = dd4[0, 0, 0, 1:] - dd1 = dd4[0, 1, 0, 1:] + dd5 = rc.get_dd5(asset_df, gmf_df) # (P, A, E, L, D) + dd0 = dd5[0, 0, 0, 0, 1:] + dd1 = dd5[0, 0, 1, 0, 1:] aac(dd0, [14.538632, 8.006071, 1.669978, 0.343819], atol=1e-6) aac(dd1, [24.564302, 13.526962, 2.821575, 0.580912], atol=1e-6) rng = scientific.MultiEventRNG(master_seed=42, eids=gmf_df.eid) - dd4 = rc.get_dd4(asset_df, gmf_df, rng) # (A, E, L, D) - dd0 = dd4[0, 0, 0, 1:] - dd1 = dd4[0, 1, 0, 1:] + dd5 = rc.get_dd5(asset_df, gmf_df, rng) # (A, E, L, D) + dd0 = dd5[0, 0, 0, 0, 1:] + dd1 = dd5[0, 0, 1, 0, 1:] aac(dd0, [10, 8, 4, 0]) aac(dd1, [31, 14, 3, 0], atol=1e-8)