Class EventMetadataLookup

java.lang.Object
nz.org.riskscape.oq.events.EventMetadataLookup
All Implemented Interfaces:
nz.org.riskscape.engine.data.SelfDescribingScalarData, nz.org.riskscape.engine.lookup.LookupTable

public class EventMetadataLookup extends Object implements nz.org.riskscape.engine.lookup.LookupTable

Lookup the event metadata associated with an OpenQuake quake (primarily for probabilistic modelling).

There are two datasets in the HDF5 file of interest here: - /events : we first need to lookup the event metadata, specifically the ID of the rupture associated with it. - /ruptures : this holds the details of the quake rupture that corresponds to the event. Specifically, we're interested in the number of occurrences ('nocc') and the rate of occurrence ('occurrencerate'). We can then use these details to eventually calculate the probability of the quake .

Each quake event has both a seismic source and a rupture. The source is the geographic location of the quake, whereas the rupture represents a quake of a given magnitude for a seismic source. The same source can correspond to many different ruptures (i.e. different magnitudes), and the same rupture can correspond to many different events (as we're modelling the uncertainty of a quake of any given magnitude). The number of occurrences of a given rupture is stored as 'nocc'. E.g. a rupture with nocc=5 will have 5 different events associated with it.

There are two different 'flavours' of sources. These are defined by the 'uncertaintyModel' in the OpenQuake job's input files (the 'uncertaintyModel' is defined in the 'sourcemodellogictreefile' XML file). - characteristicFaultSource: these have a fixed magnitude, and a fixed 'occurRates' (which maps directly to the 'occurrencerate' in the resulting HDF5 file). - pointSource: these have a range of magnitudes. With a large number of SES, each magnitude in the range ends up getting sampled by an event. In these cases, the 'occurrencerate' gets calculated by OpenQuake.

Note that these probability calculations are designed for a 'patched' version of OpenQuake where the 'n_occ' values can be overridden manually when generating the HDF5 file. This changes the model to be based on weighted events, rather than a straight SES event-based model.

  • Constructor Summary

    Constructors
    Constructor
    Description
    EventMetadataLookup(nz.org.riskscape.hdf5.cursor.H5FixedSizeCursor eventCursor, nz.org.riskscape.hdf5.H5CompoundMember ruptureMember, nz.org.riskscape.hdf5.cursor.H5FixedSizeCursor ruptureCursor, nz.org.riskscape.hdf5.H5CompoundMember sourceIdMember, nz.org.riskscape.hdf5.H5CompoundMember numberOccurencesMember, nz.org.riskscape.hdf5.H5CompoundMember occurenceRateMember, Function<ByteBuffer,String> readSourceId)
     
    EventMetadataLookup(nz.org.riskscape.hdf5.H5Dataset eventDataset, nz.org.riskscape.hdf5.H5Dataset ruptureDataset)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    nz.org.riskscape.engine.types.Type
     
    nz.org.riskscape.engine.types.Type
     
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface nz.org.riskscape.engine.lookup.LookupTable

    getLookupTableType, getScalarDataType
  • Constructor Details

    • EventMetadataLookup

      public EventMetadataLookup(nz.org.riskscape.hdf5.H5Dataset eventDataset, nz.org.riskscape.hdf5.H5Dataset ruptureDataset)
    • EventMetadataLookup

      public EventMetadataLookup(nz.org.riskscape.hdf5.cursor.H5FixedSizeCursor eventCursor, nz.org.riskscape.hdf5.H5CompoundMember ruptureMember, nz.org.riskscape.hdf5.cursor.H5FixedSizeCursor ruptureCursor, nz.org.riskscape.hdf5.H5CompoundMember sourceIdMember, nz.org.riskscape.hdf5.H5CompoundMember numberOccurencesMember, nz.org.riskscape.hdf5.H5CompoundMember occurenceRateMember, Function<ByteBuffer,String> readSourceId)
  • Method Details

    • lookup

      public Object lookup(Object key)
      Specified by:
      lookup in interface nz.org.riskscape.engine.lookup.LookupTable
    • getKeyType

      public nz.org.riskscape.engine.types.Type getKeyType()
      Specified by:
      getKeyType in interface nz.org.riskscape.engine.lookup.LookupTable
    • getValueType

      public nz.org.riskscape.engine.types.Type getValueType()
      Specified by:
      getValueType in interface nz.org.riskscape.engine.lookup.LookupTable