User facing

Note that event and fault are used interchangeably through this document to refer to both observed historic events and fault scenarios being simulated, respectively.

"perturbed realisation" is also used to refer to the realisations with _RELXX in the name, even if the perturbations are only hypocentre and srf slip distribution, as per previous simulations. This is to differentiate from median 'unperturbed' realisations.

Median realisations

The primary focus of the set of pull requests mentioned here is to include an unperturbed median realisations for each fault in an automated simulation.

This allows for velocity model generation and Rrup calculations to be performed on the unperturbed realisation.

Previous behaviour is for these to be conducted on the first realisation regardless of the effect perturbations have on the realisation.

New behaviour is for VM generation to be done on the median realisation, and rrups to be done on the median, all, or only perturbed realisations, as per the task config settings.

Realisation file generation now places the median realisation file in the Srf with the perturbed realisation files and always have SRFs, info and stoch files generated, even if they are only used for VM generation. This will be rectified when SRF generation is incorporated into the automated workflow.

Fault selection file format

The fault selection file previously required a count to be set for each fault, with a trailing 'r' character.

These requirements have been removed.

The trailing r character is no longer required, however it is permitted for backwards compatibility.

For faults with either 0 specified or no count given, only the median realisation will be generated.

Faults with a count will have that many realisations made, plus a median realisation.

It is not possible to generate only realisations without a median realisation.

Comments and empty lines are now permitted. Any empty line or line with only white-space will be skipped. Any line where the first non-whitespace character is a '#' symbol will also be skipped.

When testing/debugging extra fault lines may be commented out by the use of this '#' symbol.

Previous pattern:

<fault> <count>r

New pattern:

<fault> [<count>[r]]

Task config file

The keywords used in the task config file have been changed to reflect the addition of median realisations.

The keywords ALL and NONE are unchanged.

The keyword ONCE has been replaced with the keyword MEDIAN, to reflect the original intention of the keyword ONCE. This should be used for tasks such as VM_CONFIG, VM_GEN, INSTALL_FAULT, RRUP, Empirical.

The keyword REL_ONLY has been added to run all realisations of a fault except for the median realisation. This would be used when the median simulation results are not required (e.g. EMOD3D and HF for CyberShake)

Custom patterns using either exact event names or with the SQL wildcard character '%' are still able to be used, as previously.

Previously available keys:

ALL, ONCE, NONE

New available keys:

ALL, MEDIAN, REL_ONLY, NONE

Example task config

The example task config files in $gmsim/workflow/workflow/examples have been updated to use the new keywords. In particular the example task_config_CS.yaml shows the power of the new keywords.

EMOD3D: ALL
HF: REL_ONLY
BB: REL_ONLY
IM_calc: REL_ONLY
clean_up: REL_ONLY
merge_ts: MEDIAN
plot_ts: MEDIAN
rrup: MEDIAN

In this example only the realisations have intensity measures generated, while only the median event has the LF animation generated.

The example below adds in LF animations for REL01 realisations as well as medians, using the ability of tasks to accept a list of events, keywords and SQL patterns.

EMOD3D: ALL
HF: REL_ONLY
BB: REL_ONLY
IM_calc: REL_ONLY
clean_up: REL_ONLY
merge_ts: 
    MEDIAN
    %_REL01
plot_ts: 
    MEDIAN
    %_REL01
rrup: MEDIAN

Back end changes

ProcessType enum

The order of the elements of the ProcessType has been changed to allow for dependent tasks to reference prior tasks. There is a slight difficulty in that the enum members are just tuples until the enum has finished initialising, however lazy evaluation of the Dependency class gets around this by converting to ProcessType enum members.

Dependecy, DependencyTarget, ComparisonOperator

These three classes have been added as helpers for ProcessType (Dependency and DependencyTarget) and running SQL commands (ComparisonOperator)

Fault selection file and task config loading

Fault selection file and task config loading have been refactored to only one loading function each, previously there were multiple versions of each function.


  • No labels