The v18p6 version of CS will use the new IM_calculations code. The output is now in the form of text files containing the IMs per station for each simulation. In order to use the hazard code that was developed, we need to change it.

Steps

  • Create a code to aggregate the IM files per simulation into a single per fault one (This was done by Viktor).
  • Identify the regions of the hazard code that rely on the DB.
  • Change the code by getting rid of the DB access and supposing we use an input file as described here: Hazard Calculations for CyberShake.
  • Calculate IMs for v18p5 (as we have the waveforms on Hypocentre and we have the DB).
  • Aggregate the IMs for v18p5.
  • Calculate some hazard curves for random sites using (1) the DB and (2) the text aggregated files.
  • Compare results of (1) and (2), which should be identical.

Results

Here are some sample hazard curves for PGV created with (1) and (2):

DBAggregated text

Then some other random stations for pSA(5.0):

DBAggregated text

 

Performance

On my computer, the DB based hazard calculation seems to be 25-30% faster than the one based on the text CSV files.

Notes

  • The code has improved a lot by getting rid of what was basically a hack.
  • Names of files have changed
  • There is no backward compatibility with the file formats, as they have changed (warning). For example the hazard file looks a little different and is separated by commas now.
  • The test that I made only has faults on the North Island.
  • Currently the new code is located on the 'removing_DB' branch of the seisfinder2 repo. The code will be merged to master at some point. Master will go to a 'legacy' branch to preserve the backward compatibility lost
  • No labels