Skip to contents

Turns the on/off switches of the six displacement models of a project into the named weights of the active models. The flexible model comes in two fits for two populations: BM17, Bray, Macedo and Travasarou (2018), for subduction interface earthquakes, and BM19, Bray and Macedo (2019), for shallow crustal ones; both are declared with the same switch and the regime keeps the one fitted for it.

Usage

selectDisplacementModels(switches, subduction)

Arguments

switches

Named switches, each 0 or 1, of distinct models among AM88, JB07, BT07, SR08, BM17 and BM19, with BM17 and BM19 declared together and alike. A non-binary value would change the ensemble mean and quantiles without any product recording it, so it is rejected.

subduction

One logical: TRUE keeps BM17, FALSE keeps BM19.

Value

The named weights (all 1) of the active models, in the order of switches. A message reports which half of the flexible pair the regime switched off.

Examples

selectDisplacementModels(switches = c(AM88 = 1, JB07 = 1, BT07 = 1, SR08 = 1, BM17 = 1, BM19 = 1),
                         subduction = FALSE)
#> Dn models: subduction = FALSE -> BM17 off, BM19 on
#> AM88 JB07 BT07 SR08 BM19 
#>    1    1    1    1    1