GeoscienceAustralia / eqrm

Automatically exported from code.google.com/p/eqrm
Other
5 stars 4 forks source link

errors in computing bridge damage when multiple GMPEs are selected #147

Open dynaryu opened 7 years ago

dynaryu commented 7 years ago

I found a couple of errors in computing bridge damage when multiple GMPEs are used.

  1. _structural_damage.txt is not created even save_prob_structural_damage is set True. The output file is only generated when num_ppseudo_events is 1, which is not the case with multiple GMPEs.
  2. Spectral values collapsed over multiple GMPEs are not correctly input to bridge damage calculation. The spectral values used in the computation is not collapsed spectral values.
dynaryu commented 7 years ago

The error was found to be incorrect handling of dimension of numpy array, which is an input to bridge damage function.

dunkgray commented 7 years ago

Hyeuk, could you correct this if it is wrong. When the SA array has a GMPE length of 1 it works. When the SA array has a GMPE length greater than 1 the values of the GMPE dimension are used when the values of the period dimension should be used. A work-around for this is to collapse the SA array so the GMDE dimension is always 1, but this is not fixing the bug.