Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into webmercator
Browse files Browse the repository at this point in the history
  • Loading branch information
ptormene committed Jan 22, 2025
2 parents 96ec1bd + ac696ff commit 16dac2c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion openquake/calculators/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1380,7 +1380,7 @@ def import_sites_hdf5(dstore, fnames):
"""
Import site collections by merging them.
:returns: a list of dictionaries local_sid->global_sid for each sitecol
:returns: a list of dictionaries local_sid->global_sid for each sitecol
"""
if len(fnames) == 1:
with hdf5.File(fnames[0], 'r') as f:
Expand Down Expand Up @@ -1623,6 +1623,7 @@ def store_gmfs_from_shakemap(calc, haz_sitecol, assetcol):
if len(discarded):
calc.datastore['discarded'] = discarded
assetcol.reduce_also(sitecol)
calc.datastore['assetcol'] = assetcol
logging.info('Extracted %d assets', len(assetcol))

# assemble dictionary to decide on the calculation method for the gmfs
Expand Down
2 changes: 1 addition & 1 deletion openquake/calculators/export/risk.py
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ def convert_df_to_vulnerability(loss_type, df):
root.append(vfunc)
return root


def export_vulnerability_xml(dstore, edir):
fnames = []
for loss_type, df in dstore.read_df('crm').groupby('loss_type'):
Expand Down
2 changes: 1 addition & 1 deletion openquake/commonlib/oqvalidation.py
Original file line number Diff line number Diff line change
Expand Up @@ -1896,7 +1896,7 @@ def aristotle(self):
exposures = self.inputs.get('exposure', [])
yes = exposures and exposures[0].endswith('.hdf5')
if yes:
self.avg_losses = False
# self.avg_losses = False
self.aggregate_by = [['ID_1', 'OCCUPANCY']]
return yes

Expand Down

0 comments on commit 16dac2c

Please sign in to comment.