From 178548c5b561df77ea3ae4641d43c4955640855c Mon Sep 17 00:00:00 2001 From: Jake Faulkner Date: Wed, 17 Dec 2025 11:04:36 +1300 Subject: [PATCH 01/17] refactor(rupture_velocity): unify rupture velocity parameters --- tests/test_realisation.py | 5 ++- .../default_parameters/develop/defaults.yaml | 9 +++-- .../develop/root_defaults.yaml | 38 ------------------- .../v24_2_2_1/defaults.yaml | 9 +++-- .../v24_2_2_1/root_defaults.yaml | 38 ------------------- .../v24_2_2_2/defaults.yaml | 9 +++-- .../v24_2_2_2/root_defaults.yaml | 38 ------------------- .../v24_2_2_4/defaults.yaml | 9 +++-- .../v24_2_2_4/root_defaults.yaml | 38 ------------------- workflow/realisations.py | 23 +++++++---- workflow/schemas.py | 21 +++++++--- workflow/scripts/hf_sim.py | 17 ++++++++- workflow/scripts/realisation_to_srf.py | 15 +++++++- 13 files changed, 83 insertions(+), 186 deletions(-) delete mode 100644 workflow/default_parameters/develop/root_defaults.yaml delete mode 100644 workflow/default_parameters/v24_2_2_1/root_defaults.yaml delete mode 100644 workflow/default_parameters/v24_2_2_2/root_defaults.yaml delete mode 100644 workflow/default_parameters/v24_2_2_4/root_defaults.yaml diff --git a/tests/test_realisation.py b/tests/test_realisation.py index 5f45398f..dbc1a4ea 100644 --- a/tests/test_realisation.py +++ b/tests/test_realisation.py @@ -127,7 +127,7 @@ def test_srf_config_example(tmp_path: Path) -> None: top_taper=0.0, alpha_rough=0.0, gwid=[], - rvfac_seg=[], + rvfrac_seg=[], seg_delay=False, slip_sigma=1.0, risetime_coef=1.6, @@ -168,7 +168,7 @@ def test_srf_config_example(tmp_path: Path) -> None: "slip_sigma": 1.0, "risetime_coef": 1.6, "gwid": [], - "rvfac_seg": [], + "rvfrac_seg": [], "seg_delay": False, "ymag_exp": None, "xmag_exp": None, @@ -748,6 +748,7 @@ def test_sources(tmp_path: Path) -> None: realisations.IntensityMeasureCalculationParameters, realisations.HFVelocityModel1D, realisations.Resolution, + realisations.RuptureVelocity, ], ) @pytest.mark.parametrize("defaults_version", list(defaults.DefaultsVersion)) diff --git a/workflow/default_parameters/develop/defaults.yaml b/workflow/default_parameters/develop/defaults.yaml index 7bb2a73c..851b7e61 100644 --- a/workflow/default_parameters/develop/defaults.yaml +++ b/workflow/default_parameters/develop/defaults.yaml @@ -81,9 +81,6 @@ hf: fmax: 10.0 kappa: 0.045 qfexp: 0.6 - rvfac: 0.8 - rvfac_shal: 0.7 - rvfac_deep: 0.7 czero: 2.1 calpha: -99.0 mom: null @@ -100,13 +97,17 @@ hf: stress_parameter_adjustment_fault_area: null stoch_dx: 2.0 stoch_dy: 2.0 +rupture_velocity: + rvfrac: 0.8 + rvfrac_shal: 0.7 + rvfrac_deep: 0.7 srf: side_taper: 0.02 bot_taper: 0.02 top_taper: 0.0 alpha_rough: 0.0 gwid: [] - rvfac_seg: [] + rvfrac_seg: [] seg_delay: false ymag_exp: null xmag_exp: null diff --git a/workflow/default_parameters/develop/root_defaults.yaml b/workflow/default_parameters/develop/root_defaults.yaml deleted file mode 100644 index 392b30ce..00000000 --- a/workflow/default_parameters/develop/root_defaults.yaml +++ /dev/null @@ -1,38 +0,0 @@ -hf: - version: 6.0.3.2 - dt: 0.005 - rvfac: 0.8 - sdrop: 50 - path_dur: 11 - kappa: 0.045 - rvfac_shal: 0.6 - rvfac_deep: 0.6 - czero: 2.0 - rayset: 1 -bb: - fmin: 0.2 - fmidbot: 0.5 -emod3d: - emod3d_version: 3.0.8 -ims: - extended_period: False - component: - - "000" - - "090" - - ver - - geom - - rotd50 - - rotd100_50 - pSA_periods: [0.01, 0.02, 0.03, 0.04, 0.05, 0.075, 0.1, 0.12, 0.15, 0.17, 0.2, 0.25, 0.3, 0.4, 0.5, 0.6, 0.7, 0.75, 0.8, 0.9, 1.0, 1.25, 1.5, 2.0, 2.5, 3.0, 4.0, 5.0, 6.0, 7.5, 10.0] -flo: 1.0 -dt: 0.005 -VM: - hh: 0.1 - VM_Version: 2.06 - VM_Topo: SQUASHED_TAPERED - PGV_Threshold: -1 - Ds_Multiplier: 1.2 -v_1d_mod: Cant1D_v3-midQ_OneRay.1d -advanced_IM: - models: [ATC_Steel_SCBF_3Story, SAC_Steel_MF_3Story] - match_obs_stations: null diff --git a/workflow/default_parameters/v24_2_2_1/defaults.yaml b/workflow/default_parameters/v24_2_2_1/defaults.yaml index 8e73bf58..77e71dfb 100644 --- a/workflow/default_parameters/v24_2_2_1/defaults.yaml +++ b/workflow/default_parameters/v24_2_2_1/defaults.yaml @@ -81,9 +81,6 @@ hf: fmax: 10.0 kappa: 0.045 qfexp: 0.6 - rvfac: 0.8 - rvfac_shal: 0.7 - rvfac_deep: 0.7 czero: 2.1 calpha: -99.0 mom: null @@ -100,13 +97,17 @@ hf: stress_parameter_adjustment_fault_area: null stoch_dx: 2.0 stoch_dy: 2.0 +rupture_velocity: + rvfrac: 0.8 + rvfrac_shal: 0.7 + rvfrac_deep: 0.7 srf: side_taper: 0.02 bot_taper: 0.02 top_taper: 0.0 alpha_rough: 0.0 gwid: [] - rvfac_seg: [] + rvfrac_seg: [] seg_delay: false ymag_exp: null xmag_exp: null diff --git a/workflow/default_parameters/v24_2_2_1/root_defaults.yaml b/workflow/default_parameters/v24_2_2_1/root_defaults.yaml deleted file mode 100644 index 392b30ce..00000000 --- a/workflow/default_parameters/v24_2_2_1/root_defaults.yaml +++ /dev/null @@ -1,38 +0,0 @@ -hf: - version: 6.0.3.2 - dt: 0.005 - rvfac: 0.8 - sdrop: 50 - path_dur: 11 - kappa: 0.045 - rvfac_shal: 0.6 - rvfac_deep: 0.6 - czero: 2.0 - rayset: 1 -bb: - fmin: 0.2 - fmidbot: 0.5 -emod3d: - emod3d_version: 3.0.8 -ims: - extended_period: False - component: - - "000" - - "090" - - ver - - geom - - rotd50 - - rotd100_50 - pSA_periods: [0.01, 0.02, 0.03, 0.04, 0.05, 0.075, 0.1, 0.12, 0.15, 0.17, 0.2, 0.25, 0.3, 0.4, 0.5, 0.6, 0.7, 0.75, 0.8, 0.9, 1.0, 1.25, 1.5, 2.0, 2.5, 3.0, 4.0, 5.0, 6.0, 7.5, 10.0] -flo: 1.0 -dt: 0.005 -VM: - hh: 0.1 - VM_Version: 2.06 - VM_Topo: SQUASHED_TAPERED - PGV_Threshold: -1 - Ds_Multiplier: 1.2 -v_1d_mod: Cant1D_v3-midQ_OneRay.1d -advanced_IM: - models: [ATC_Steel_SCBF_3Story, SAC_Steel_MF_3Story] - match_obs_stations: null diff --git a/workflow/default_parameters/v24_2_2_2/defaults.yaml b/workflow/default_parameters/v24_2_2_2/defaults.yaml index 75289db9..c1d624c8 100644 --- a/workflow/default_parameters/v24_2_2_2/defaults.yaml +++ b/workflow/default_parameters/v24_2_2_2/defaults.yaml @@ -81,9 +81,6 @@ hf: fmax: 10.0 kappa: 0.045 qfexp: 0.6 - rvfac: 0.8 - rvfac_shal: 0.7 - rvfac_deep: 0.7 czero: 2.1 calpha: -99.0 mom: null @@ -100,13 +97,17 @@ hf: stress_parameter_adjustment_fault_area: null stoch_dx: 2.0 stoch_dy: 2.0 +rupture_velocity: + rvfrac: 0.8 + rvfrac_shal: 0.7 + rvfrac_deep: 0.7 srf: side_taper: 0.02 bot_taper: 0.02 top_taper: 0.0 alpha_rough: 0.0 gwid: [] - rvfac_seg: [] + rvfrac_seg: [] seg_delay: false ymag_exp: null xmag_exp: null diff --git a/workflow/default_parameters/v24_2_2_2/root_defaults.yaml b/workflow/default_parameters/v24_2_2_2/root_defaults.yaml deleted file mode 100644 index 392b30ce..00000000 --- a/workflow/default_parameters/v24_2_2_2/root_defaults.yaml +++ /dev/null @@ -1,38 +0,0 @@ -hf: - version: 6.0.3.2 - dt: 0.005 - rvfac: 0.8 - sdrop: 50 - path_dur: 11 - kappa: 0.045 - rvfac_shal: 0.6 - rvfac_deep: 0.6 - czero: 2.0 - rayset: 1 -bb: - fmin: 0.2 - fmidbot: 0.5 -emod3d: - emod3d_version: 3.0.8 -ims: - extended_period: False - component: - - "000" - - "090" - - ver - - geom - - rotd50 - - rotd100_50 - pSA_periods: [0.01, 0.02, 0.03, 0.04, 0.05, 0.075, 0.1, 0.12, 0.15, 0.17, 0.2, 0.25, 0.3, 0.4, 0.5, 0.6, 0.7, 0.75, 0.8, 0.9, 1.0, 1.25, 1.5, 2.0, 2.5, 3.0, 4.0, 5.0, 6.0, 7.5, 10.0] -flo: 1.0 -dt: 0.005 -VM: - hh: 0.1 - VM_Version: 2.06 - VM_Topo: SQUASHED_TAPERED - PGV_Threshold: -1 - Ds_Multiplier: 1.2 -v_1d_mod: Cant1D_v3-midQ_OneRay.1d -advanced_IM: - models: [ATC_Steel_SCBF_3Story, SAC_Steel_MF_3Story] - match_obs_stations: null diff --git a/workflow/default_parameters/v24_2_2_4/defaults.yaml b/workflow/default_parameters/v24_2_2_4/defaults.yaml index 7bb2a73c..851b7e61 100644 --- a/workflow/default_parameters/v24_2_2_4/defaults.yaml +++ b/workflow/default_parameters/v24_2_2_4/defaults.yaml @@ -81,9 +81,6 @@ hf: fmax: 10.0 kappa: 0.045 qfexp: 0.6 - rvfac: 0.8 - rvfac_shal: 0.7 - rvfac_deep: 0.7 czero: 2.1 calpha: -99.0 mom: null @@ -100,13 +97,17 @@ hf: stress_parameter_adjustment_fault_area: null stoch_dx: 2.0 stoch_dy: 2.0 +rupture_velocity: + rvfrac: 0.8 + rvfrac_shal: 0.7 + rvfrac_deep: 0.7 srf: side_taper: 0.02 bot_taper: 0.02 top_taper: 0.0 alpha_rough: 0.0 gwid: [] - rvfac_seg: [] + rvfrac_seg: [] seg_delay: false ymag_exp: null xmag_exp: null diff --git a/workflow/default_parameters/v24_2_2_4/root_defaults.yaml b/workflow/default_parameters/v24_2_2_4/root_defaults.yaml deleted file mode 100644 index 392b30ce..00000000 --- a/workflow/default_parameters/v24_2_2_4/root_defaults.yaml +++ /dev/null @@ -1,38 +0,0 @@ -hf: - version: 6.0.3.2 - dt: 0.005 - rvfac: 0.8 - sdrop: 50 - path_dur: 11 - kappa: 0.045 - rvfac_shal: 0.6 - rvfac_deep: 0.6 - czero: 2.0 - rayset: 1 -bb: - fmin: 0.2 - fmidbot: 0.5 -emod3d: - emod3d_version: 3.0.8 -ims: - extended_period: False - component: - - "000" - - "090" - - ver - - geom - - rotd50 - - rotd100_50 - pSA_periods: [0.01, 0.02, 0.03, 0.04, 0.05, 0.075, 0.1, 0.12, 0.15, 0.17, 0.2, 0.25, 0.3, 0.4, 0.5, 0.6, 0.7, 0.75, 0.8, 0.9, 1.0, 1.25, 1.5, 2.0, 2.5, 3.0, 4.0, 5.0, 6.0, 7.5, 10.0] -flo: 1.0 -dt: 0.005 -VM: - hh: 0.1 - VM_Version: 2.06 - VM_Topo: SQUASHED_TAPERED - PGV_Threshold: -1 - Ds_Multiplier: 1.2 -v_1d_mod: Cant1D_v3-midQ_OneRay.1d -advanced_IM: - models: [ATC_Steel_SCBF_3Story, SAC_Steel_MF_3Story] - match_obs_stations: null diff --git a/workflow/realisations.py b/workflow/realisations.py index 24b3d838..bc47f785 100644 --- a/workflow/realisations.py +++ b/workflow/realisations.py @@ -388,7 +388,7 @@ class SRFConfig(RealisationConfiguration): gwid: list[float] """Width of delay zone around segment boundaries""" - rvfac_seg: list[float] + rvfrac_seg: list[float] """Rupture speed reduction (proportion) at segment boundaries.""" seg_delay: bool """If true, delay rupture across slip boundaries according to specifications of rvfac_seg and gwid.""" @@ -723,6 +723,21 @@ class RealisationMetadata(RealisationConfiguration): category of the realisation (e.g. NSHM, GCMT or custom).""" +@dataclasses.dataclass +class RuptureVelocity(RealisationConfiguration): + """Rupture velocities for source and high-frequency simulation.""" + + _config_key: ClassVar[str] = "rupture_velocity" + _schema: ClassVar[Schema] = schemas.RUPTURE_VELOCITY_SCHEMA + + rvfrac: float + """Rupture velocity factor (rupture : Vs)""" + rvfrac_shal: float + """Rupture velocity at shallow depths""" + rvfrac_deep: float + """Rupture velocity at depth""" + + @dataclasses.dataclass class HFConfig(RealisationConfiguration): """High frequency simulation configuration.""" @@ -766,12 +781,6 @@ class HFConfig(RealisationConfiguration): """Unknown!""" qfexp: float """Q frequency exponent""" - rvfac: float - """Rupture velocity factor (rupture : Vs)""" - rvfac_shal: float - """rvfac shallow fault multiplier""" - rvfac_deep: float - """rvfac deep fault multiplier""" czero: float """C0 coefficient""" calpha: float diff --git a/workflow/schemas.py b/workflow/schemas.py index d0b6bc41..41ea14da 100644 --- a/workflow/schemas.py +++ b/workflow/schemas.py @@ -378,6 +378,20 @@ def _corners_to_array(corners_spec: list[dict[str, float]]) -> np.ndarray: ) ) +RUPTURE_VELOCITY_SCHEMA = Schema( + { + Literal("rvfrac", description="Rupture velocity factor (rupture : Vs)"): And( + NUMBER, _is_positive + ), + Literal("rvfrac_shal", description="Rupture velocity at shallow depths"): And( + NUMBER, _is_positive + ), + Literal("rvfrac_deep", description="Rupture velocity at depth"): And( + NUMBER, _is_positive + ), + } +) + SRF_SCHEMA = Schema( { Literal( @@ -410,7 +424,7 @@ def _corners_to_array(corners_spec: list[dict[str, float]]) -> np.ndarray: description="Width of delay zone around segment boundaries", ): [And(NUMBER, _is_positive)], Literal( - "rvfac_seg", + "rvfrac_seg", description="Rupture speed reduction (proportion) at segment boundaries.", ): [And(NUMBER, _is_proportion)], Literal( @@ -601,11 +615,6 @@ def _corners_to_array(corners_spec: list[dict[str, float]]) -> np.ndarray: ), Literal("kappa", description="Unknown!"): NUMBER, Literal("qfexp", description="Q frequency exponent"): NUMBER, - Literal("rvfac", description="Rupture velocity factor (rupture : Vs)"): And( - NUMBER, _is_non_negative - ), - Literal("rvfac_shal", description="rvfac shallow fault multiplier"): NUMBER, - Literal("rvfac_deep", description="rvfac deep fault multiplier"): NUMBER, Literal("czero", description="C0 coefficient"): NUMBER, Literal("calpha", description="Ca coefficient"): NUMBER, Literal("mom", description="Seimic moment (or null, to infer value)"): Or( diff --git a/workflow/scripts/hf_sim.py b/workflow/scripts/hf_sim.py index 7e8727fa..bde5e489 100644 --- a/workflow/scripts/hf_sim.py +++ b/workflow/scripts/hf_sim.py @@ -53,6 +53,7 @@ HFVelocityModel1D, RealisationMetadata, Resolution, + RuptureVelocity, Seeds, ) @@ -64,6 +65,7 @@ def build_hf_input( velocity_model: Path, resolution: Resolution, hf_config: HFConfig, + rupture_velocity: RuptureVelocity, seeds: Seeds, domain_parameters: DomainParameters, ) -> str: @@ -79,6 +81,8 @@ def build_hf_input( HF simulation resolution. hf_config : HFConfig The high-frequency config. + rupture_velocity : RuptureVelocity + The rupture velocity settings. seeds : Seeds The seeds. domain_parameters : DomainParameters @@ -103,7 +107,7 @@ def build_hf_input( "{seed}", 1, # one station in the input f"{domain_parameters.duration} {resolution.dt} {hf_config.fmax} {hf_config.kappa} {hf_config.qfexp}", - f"{hf_config.rvfac} {hf_config.rvfac_shal} {hf_config.rvfac_deep} {hf_config.czero} {hf_config.calpha}", + f"{rupture_velocity.rvfrac} {rupture_velocity.rvfrac_shal} {rupture_velocity.rvfrac_deep} {hf_config.czero} {hf_config.calpha}", f"{hf_config.mom or -1} {hf_config.rupv or -1}", stoch_ffp, velocity_model, @@ -293,6 +297,9 @@ def run_hf( hf_config = HFConfig.read_from_realisation_or_defaults( realisation_ffp, metadata.defaults_version ) + rupture_velocity = RuptureVelocity.read_from_realisation_or_defaults( + realisation_ffp, metadata.defaults_version + ) resolution = Resolution.read_from_realisation_or_defaults( realisation_ffp, metadata.defaults_version ) @@ -319,7 +326,13 @@ def run_hf( waveform = np.empty((3, len(stations), nt), dtype=np.float32) hf_input_template = build_hf_input( - stoch_ffp, velocity_model_path, resolution, hf_config, seeds, domain_parameters + stoch_ffp, + velocity_model_path, + resolution, + hf_config, + rupture_velocity, + seeds, + domain_parameters, ) stations["epicentre_distance"] = np.nan diff --git a/workflow/scripts/realisation_to_srf.py b/workflow/scripts/realisation_to_srf.py index c4569ee9..03adaea0 100644 --- a/workflow/scripts/realisation_to_srf.py +++ b/workflow/scripts/realisation_to_srf.py @@ -63,6 +63,7 @@ RealisationMetadata, Resolution, RupturePropagationConfig, + RuptureVelocity, Seeds, SourceConfig, SRFConfig, @@ -368,6 +369,8 @@ class SRFRealisationContext: """The 1D velocity model to use for SRF generation""" srf_config: SRFConfig """SRF configuration options to apply""" + rupture_velocity: RuptureVelocity + """Rupture velocity configuration""" @dataclasses.dataclass @@ -411,6 +414,7 @@ def _build_genslip_command( magnitude: float, dt: float, srf_config: SRFConfig, + rupture_velocity: RuptureVelocity, ) -> list[str]: """Build a genslip command to run. @@ -438,7 +442,8 @@ def _build_genslip_command( Time resolution for SVFs. srf_config : SRFConfig Parameters for SRF generation. - + rupture_velocity : RuptureVelocity + Parameters for rupture velocity config. Returns ------- @@ -466,6 +471,9 @@ def _build_genslip_command( f"dhypo={dhypo}", f"mag={magnitude}", f"dt={dt}", + f"rvfrac={rupture_velocity.rvfrac}", + f"shal_vrup={rupture_velocity.rvfrac_shal}", + f"deep_vrup={rupture_velocity.rvfrac_deep}", ] skipped_fields = {"point_source_params"} for field in dataclasses.fields(srf_config): @@ -541,6 +549,7 @@ def generate_fault_srf( magnitude=params.magnitudes.magnitudes[name], dt=params.resolution.dt, srf_config=params.srf_config, + rupture_velocity=params.rupture_velocity, ) srf_file_path = environment.srf_directory / (normalise_name(name) + ".srf") @@ -757,6 +766,9 @@ def generate_srf( resolution = Resolution.read_from_realisation_or_defaults( realisation_ffp, metadata.defaults_version ) + rupture_velocity = RuptureVelocity.read_from_realisation_or_defaults( + realisation_ffp, metadata.defaults_version + ) params = SRFRealisationContext( resolution=resolution, @@ -766,6 +778,7 @@ def generate_srf( rakes=rakes, velocity_model_1d=velocity_model_1d, srf_config=srf_config, + rupture_velocity=rupture_velocity, ) environment = SRFEnvironmentContext( From 090f0037eb005457813fd230d4f493c41eeb1e49 Mon Sep 17 00:00:00 2001 From: Jake Faulkner Date: Wed, 17 Dec 2025 11:58:52 +1300 Subject: [PATCH 02/17] tests(hf-sim): refactor hf_sim to add tests --- pyproject.toml | 5 +- tests/test_hf.py | 168 +++++++++++++++++++++++++++++++++++++ workflow/scripts/hf_sim.py | 156 ++++++++++++++++++++++++++-------- 3 files changed, 292 insertions(+), 37 deletions(-) create mode 100644 tests/test_hf.py diff --git a/pyproject.toml b/pyproject.toml index 07f1a298..e2002fda 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,7 +48,10 @@ dependencies = [ ] [project.optional-dependencies] -test = ["pytest"] +test = [ + "hypothesis>=6.148.3", + "pytest", +] types = ["pandas-stubs", "types-geopandas", "types-requests", "scipy-stubs"] dev = ["ruff", "deptry", "ty", "numpydoc"] diff --git a/tests/test_hf.py b/tests/test_hf.py new file mode 100644 index 00000000..fd625787 --- /dev/null +++ b/tests/test_hf.py @@ -0,0 +1,168 @@ +from pathlib import Path +from types import SimpleNamespace + +import numpy as np +import pytest +from hypothesis import given +from hypothesis import strategies as st + +from workflow.realisations import ( + HFConfig, + Resolution, + RuptureVelocity, +) +from workflow.scripts import hf_sim + + +def test_build_hf_input_serialisation() -> None: + stoch_ffp = Path("/path/to/stoch") + velocity_model = Path("/path/to/vmodel") + + hf_config = HFConfig( + sdrop=50.0, + rayset=[1, 2], + no_siteamp=False, + nbu=1, + ift=0, + flo=0.1, + fhi=10.0, + fmax=20.0, + kappa=0.045, + qfexp=0.6, + czero=2.5, + calpha=0.0, + mom=None, + rupv=1.2, + vs_moho=3.5, + nl_skip=0, + vp_sig=0.1, + vsh_sig=0.1, + rho_sig=0.1, + qs_sig=0.1, + ic_flag=True, + velocity_name="test_vel", + fa_sig1=0.2, + fa_sig2=0.2, + rv_sig1=0.1, + path_dur=11, + t_sec=0.0, + site_specific=False, + dpath_pert=0, + stoch_dx=2.0, + stoch_dy=2.0, + stress_parameter_adjustment_fault_area=None, + stress_parameter_adjustment_target_magnitude=None, + stress_parameter_adjustment_tect_type=0, + ) + + res = Resolution(resolution=0.1) + rv = RuptureVelocity(rvfrac=0.8, rvfrac_shal=0.7, rvfrac_deep=0.9) + # Rather than create DomainParameters with a bounding box, we simplify with a mock object + domain = SimpleNamespace(duration=100.0) + + result = hf_sim.build_hf_input( + stoch_ffp, + velocity_model, + res, + hf_config, + rv, + domain, # type: ignore[invalid-argument-type] + ) + + lines = result.split("\n") + + assert lines[1] == "50.0" # sdrop + assert lines[2] == "{station_input_file}" # placeholder for station file + assert lines[3] == "{output_file}" # placehoder for output file + assert lines[4] == "2 1 2" # rayset count + rays + assert lines[5] == "1" # int(not no_siteamp) -> int(not False) -> 1 + assert lines[7] == "{seed}" # seed placeholder + assert lines[9] == "100.0 0.005 20.0 0.045 0.6" # Domain and resolution parameters + assert lines[11] == "-1 1.2" # mom (None -> -1) and rupv + assert lines[12] == str(stoch_ffp) # Stoch file path + assert lines[15] == "0 0.1 0.1 0.1 0.1 1" # Sigs and ic_flag (True -> 1) + assert lines[20] == "-1 -1 -1" # Optional stress parameters + + +STATION_STRATEGY = st.text( + min_size=0, max_size=8, alphabet=st.characters(codec="ascii") +) + + +@given(station=STATION_STRATEGY) +def test_stable_hash(station: str) -> None: + # Check that stable_hash output is always a valid 32-bit integer + assert -(1 << 31) <= hf_sim.stable_hash(station) < (1 << 31) - 1 + + +def test_station_seeds() -> None: + seed = hf_sim.station_seeds(0, ["station"]) + assert seed.dtype == np.int32 + assert seed.shape == (1,) + # Seeds should be referentially transparent: i.e. depend only on the seed and station na + seed_1 = hf_sim.station_seeds(0, ["station"]) + assert seed.item() == seed_1.item() + + +@given( + seed=st.integers(min_value=-(1 << 31), max_value=(1 << 31) - 1), + stations=st.lists(STATION_STRATEGY, min_size=1, unique=True), +) +def test_station_seeds_on_name_only(seed: int, stations: list[str]) -> None: + station_seeds = hf_sim.station_seeds(seed, stations) + + # check that station hashes depend on name only and not the order that the stations are supplied in + reordered_station_seeds = hf_sim.station_seeds(seed, stations[::-1]) + assert (reordered_station_seeds[::-1] == station_seeds).all() + + # Check the subset property: If we hash the station seed on its own, the station seed remains the same. + # Note a station seed that was derived from stations order in a + # sorted list of stations would pass the first test, but not this + # one. + for station, expected_seed in zip(stations, station_seeds): + assert hf_sim.station_seeds(seed, [station]).item() == expected_seed + + +def test_create_hf_dataset_structure() -> None: + # 1. Setup Mock Data + n_stations = 2 + n_components = 3 # Fixed by function logic + n_time = 100 + + names = ["station_a", "station_b"] + waveform = np.random.rand(n_components, n_stations, n_time).astype(np.float32) + lat = np.array([-43.5, -43.6]) + lon = np.array([172.6, 172.7]) + dist = np.array([10.5, 20.1]) + seeds = np.array([123, 456]) + vrefs = np.array([300.0, 350.0]) + dt = 0.02 + start_sec = 0.0 + + ds = hf_sim.create_hf_dataset( + waveform=waveform, + latitude=lat, + longitude=lon, + names=names, + epicentre_distance=dist, + seed=seeds, + vref=vrefs, + dt=dt, + start_sec=start_sec, + ) + + assert ds.sizes == {"component": 3, "station": 2, "time": 100} + + np.testing.assert_array_equal(ds.station.values, names) + np.testing.assert_array_equal(ds.component.values, ["x", "y", "z"]) + assert ds.time.values[1] == pytest.approx(0.02) + assert ds.lat.dims == ("station",) + assert ds.lon.dims == ("station",) + + assert "waveform" in ds.data_vars + assert ds.waveform.dims == ("component", "station", "time") + np.testing.assert_allclose(ds.waveform.values, waveform) + + assert ds.attrs["dt"] == dt + assert ds.attrs["nt"] == n_time + assert ds.attrs["units"] == "cm/s^2" diff --git a/workflow/scripts/hf_sim.py b/workflow/scripts/hf_sim.py index bde5e489..ce780c8a 100644 --- a/workflow/scripts/hf_sim.py +++ b/workflow/scripts/hf_sim.py @@ -36,11 +36,13 @@ import hashlib import subprocess import tempfile +from collections.abc import Iterable from concurrent.futures.thread import ThreadPoolExecutor from pathlib import Path from typing import Annotated import numpy as np +import numpy.typing as npt import pandas as pd import typer import xarray as xr @@ -66,7 +68,6 @@ def build_hf_input( resolution: Resolution, hf_config: HFConfig, rupture_velocity: RuptureVelocity, - seeds: Seeds, domain_parameters: DomainParameters, ) -> str: """Build a high-frequency input template string. @@ -83,8 +84,6 @@ def build_hf_input( The high-frequency config. rupture_velocity : RuptureVelocity The rupture velocity settings. - seeds : Seeds - The seeds. domain_parameters : DomainParameters The simulation domain parameters. @@ -240,6 +239,111 @@ def stable_hash(station: str) -> int: ) +def station_seeds(seed: int, stations: Iterable[str]) -> npt.NDArray[np.int32]: + """Create a list of per-station seeds in an order-invariant fashion with a root seed. + + Parameters + ---------- + seed : int + The root seed. + stations : Sequence[str] + The sequence of stations to seed. The order and number of stations + should not matter. The station seeds are based on their name + only. + + Returns + ------- + npt.NDArray[np.int32] + A list of station seeds. + """ + station_hashes = np.array([stable_hash(name) for name in stations], dtype=np.int32) + # Rather than add (which could overflow and cause annoying numpy + # warnings), we just xor the hf seed with the station hashes. + # Since this is invertible, we ensure that the same hf seed gives + # the same station seeds. + return np.int32(seed) ^ station_hashes + + +def create_hf_dataset( + # array-like used here to reduce the number of times we have to + # change the types if the downstream function inputs change. + waveform: npt.ArrayLike, + latitude: npt.ArrayLike, + longitude: npt.ArrayLike, + names: npt.ArrayLike, + epicentre_distance: npt.ArrayLike, + seed: npt.ArrayLike, + vref: npt.ArrayLike, + dt: float, + start_sec: float, +) -> xr.Dataset: + """ + Create a structured xarray Dataset for HF simulation data. + + Parameters + ---------- + waveform : ArrayLike + The waveform data. Expected shape is (3, n_stations, nt), + representing the three components (x, y, z). + latitude : ArrayLike + Latitude coordinates for each station. Shape (n_stations,). + longitude : ArrayLike + Longitude coordinates for each station. Shape (n_stations,). + names : ArrayLike + Names/IDs for each station. Shape (n_stations,). Used as the + primary index for the 'station' dimension. + epicentre_distance : ArrayLike + Distance from the station to the epicentre. Shape (n_stations,). + seed : ArrayLike + Random seed values associated with each station. Shape (n_stations,). + vref : ArrayLike + Reference velocity (Vs30 or similar) for each station. Shape (n_stations,). + dt : float + Time step increment in seconds. + start_sec : float + The start time of the simulation in seconds. + + Returns + ------- + xr.Dataset + A dataset containing the waveforms and associated station metadata, + indexed by station, component, and time. + + Notes + ----- + The dataset follows specific dimensional mapping: + * **waveform**: mapped to (component, station, time). + * **coordinates**: 'lat' and 'lon' are non-index coordinates tied to + the 'station' dimension. + * **attributes**: global metadata includes 'units' (fixed to cm/s^2), + 'nt', and 'dt'. + """ + waveform = np.asanyarray(waveform) + nt = waveform.shape[-1] + time = np.arange(nt) * dt + return xr.Dataset( + { + "waveform": (["component", "station", "time"], waveform), + "epicentre_distance": (["station"], epicentre_distance), + "seed": (["station"], seed), + "vref": (["station"], vref), + }, + coords={ + "station": ("station", names), + "component": ("component", ["x", "y", "z"]), + "time": ("time", time), + "lat": (["station"], latitude), + "lon": (["station"], longitude), + }, + attrs={ + "start_sec": start_sec, + "nt": nt, + "dt": dt, + "units": "cm/s^2", + }, + ) + + @cli.from_docstring(app) @log_utils.log_call() def run_hf( @@ -310,14 +414,7 @@ def run_hf( header=None, names=["longitude", "latitude", "name"], # type: ignore[invalid-argument-type] ).set_index("name") - station_hashes = np.array( - [stable_hash(name) for name in stations.index], dtype=np.int32 - ) - # Rather than add (which could overflow and cause annoying numpy - # warnings), we just xor the hf seed with the station hashes. - # Since this is invertible, we ensure that the same hf seed gives - # the same station seeds. - stations["seed"] = np.int32(seeds.hf_seed) ^ station_hashes + stations["seed"] = station_seeds(seeds.hf_seed, stations.index) velocity_model_path = work_directory / "velocity_model" velocity_model.write_velocity_model(velocity_model_path) nt = int( @@ -331,10 +428,8 @@ def run_hf( resolution, hf_config, rupture_velocity, - seeds, domain_parameters, ) - stations["epicentre_distance"] = np.nan with ThreadPoolExecutor(max_workers=utils.get_available_cores()) as executor: @@ -362,27 +457,16 @@ def run_hf( vs = velocity_model.model["Vs"].iloc[0] * 1000 stations["vs"] = vs - start_sec = 0.0 - time = start_sec + np.arange(nt) * resolution.dt - xr.Dataset( - { - "waveform": (["component", "station", "time"], waveform), - "epicentre_distance": (["station"], stations["epicentre_distance"]), - "seed": (["station"], stations["seed"]), - "vref": (["station"], stations["vs"]), - }, - coords={ - "station": ("station", stations.index.values), - "component": ("component", ["x", "y", "z"]), - "time": ("time", time), - "lat": (["station"], stations["latitude"]), - "lon": (["station"], stations["longitude"]), - }, - attrs={ - "start_sec": start_sec, - "nt": nt, - "dt": resolution.dt, - "units": "cm/s^2", - }, - ).to_netcdf(out_file, engine="h5netcdf") + ds = create_hf_dataset( + waveform=waveform, + latitude=stations["latitude"], + longitude=stations["longitude"], + names=stations.index, + epicentre_distance=stations["epicentre_distance"], + seed=stations["seed"], + vref=stations["vs"], + dt=resolution.dt, + start_sec=hf_config.t_sec, + ) + ds.to_netcdf(out_file, engine="h5netcdf") realisations.append_log_entry(realisation_ffp) From 6a12617b752f06e79ceb97cfe349a261fc2868f0 Mon Sep 17 00:00:00 2001 From: Jake Faulkner Date: Wed, 17 Dec 2025 12:02:19 +1300 Subject: [PATCH 03/17] docs(hf_sim): correct stations documentation --- workflow/scripts/hf_sim.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/workflow/scripts/hf_sim.py b/workflow/scripts/hf_sim.py index ce780c8a..35128dcf 100644 --- a/workflow/scripts/hf_sim.py +++ b/workflow/scripts/hf_sim.py @@ -246,10 +246,9 @@ def station_seeds(seed: int, stations: Iterable[str]) -> npt.NDArray[np.int32]: ---------- seed : int The root seed. - stations : Sequence[str] - The sequence of stations to seed. The order and number of stations - should not matter. The station seeds are based on their name - only. + stations : Iterable[str] + The stations to seed. The order and number of stations should + not matter. The station seeds are based on their name only. Returns ------- @@ -318,7 +317,7 @@ def create_hf_dataset( * **attributes**: global metadata includes 'units' (fixed to cm/s^2), 'nt', and 'dt'. """ - waveform = np.asanyarray(waveform) + waveform = np.asarray(waveform) nt = waveform.shape[-1] time = np.arange(nt) * dt return xr.Dataset( From f0613efec1ca67529eb18e0cd4ef6fc291451bb6 Mon Sep 17 00:00:00 2001 From: Jake Faulkner Date: Wed, 17 Dec 2025 13:18:43 +1300 Subject: [PATCH 04/17] fix: add types dev dependency group to deptry --- .github/workflows/deptry.yml | 2 +- pyproject.toml | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deptry.yml b/.github/workflows/deptry.yml index d3e63efa..835c3155 100644 --- a/.github/workflows/deptry.yml +++ b/.github/workflows/deptry.yml @@ -17,4 +17,4 @@ jobs: - run: uv venv - run: uv sync --all-extras --dev # Run deptry to check that all dependencies are present. - - run: uv run deptry . -ddg test,dev,types + - run: uv run deptry . diff --git a/pyproject.toml b/pyproject.toml index e2002fda..02d6b802 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,15 +48,12 @@ dependencies = [ ] [project.optional-dependencies] -test = [ - "hypothesis>=6.148.3", - "pytest", -] +test = ["hypothesis>=6.148.3", "pytest"] types = ["pandas-stubs", "types-geopandas", "types-requests", "scipy-stubs"] dev = ["ruff", "deptry", "ty", "numpydoc"] [tool.deptry] -pep621_dev_dependency_groups = ["test", "dev"] +pep621_dev_dependency_groups = ["test", "dev", "types"] [project.scripts] nshm2022-to-realisation = "workflow.scripts.nshm2022_to_realisation:app" From 4ad24df5073bdb9bf46197405d01b7ee9ed7bd7b Mon Sep 17 00:00:00 2001 From: Jake Faulkner Date: Wed, 17 Dec 2025 13:42:59 +1300 Subject: [PATCH 05/17] fix(hf-sim): check boundary condition on stable hash Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- tests/test_hf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_hf.py b/tests/test_hf.py index fd625787..f6700840 100644 --- a/tests/test_hf.py +++ b/tests/test_hf.py @@ -92,7 +92,7 @@ def test_build_hf_input_serialisation() -> None: @given(station=STATION_STRATEGY) def test_stable_hash(station: str) -> None: # Check that stable_hash output is always a valid 32-bit integer - assert -(1 << 31) <= hf_sim.stable_hash(station) < (1 << 31) - 1 + assert -(1 << 31) <= hf_sim.stable_hash(station) <= (1 << 31) - 1 def test_station_seeds() -> None: From 50dae3e83315b3118e6c7ecce7b6e25c1e382c1f Mon Sep 17 00:00:00 2001 From: Jake Faulkner Date: Thu, 18 Dec 2025 09:25:48 +1300 Subject: [PATCH 06/17] test: fix typos and add assertion for rupture velocity parameters in HF input test - Correct typo in comment for output file placeholder - Add assertion for rupture velocity parameters line - Fix typo in comment regarding referential transparency in station seeds test --- tests/test_hf.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_hf.py b/tests/test_hf.py index f6700840..2845b6b8 100644 --- a/tests/test_hf.py +++ b/tests/test_hf.py @@ -73,11 +73,12 @@ def test_build_hf_input_serialisation() -> None: assert lines[1] == "50.0" # sdrop assert lines[2] == "{station_input_file}" # placeholder for station file - assert lines[3] == "{output_file}" # placehoder for output file + assert lines[3] == "{output_file}" # placeholder for output file assert lines[4] == "2 1 2" # rayset count + rays assert lines[5] == "1" # int(not no_siteamp) -> int(not False) -> 1 assert lines[7] == "{seed}" # seed placeholder assert lines[9] == "100.0 0.005 20.0 0.045 0.6" # Domain and resolution parameters + assert lines[10] == "0.8 0.7 0.9 2.5 0.0" assert lines[11] == "-1 1.2" # mom (None -> -1) and rupv assert lines[12] == str(stoch_ffp) # Stoch file path assert lines[15] == "0 0.1 0.1 0.1 0.1 1" # Sigs and ic_flag (True -> 1) @@ -99,7 +100,7 @@ def test_station_seeds() -> None: seed = hf_sim.station_seeds(0, ["station"]) assert seed.dtype == np.int32 assert seed.shape == (1,) - # Seeds should be referentially transparent: i.e. depend only on the seed and station na + # Seeds should be referentially transparent: i.e. depend only on the seed and station name seed_1 = hf_sim.station_seeds(0, ["station"]) assert seed.item() == seed_1.item() From 5040463ee3f6252453557e407f6a4806186fdc70 Mon Sep 17 00:00:00 2001 From: Jake Faulkner Date: Mon, 5 Jan 2026 16:32:57 +1300 Subject: [PATCH 07/17] refactor(defaults): extract common defaults --- workflow/default_parameters/README.md | 47 -- .../default_parameters/develop/defaults.yaml | 4 + workflow/default_parameters/root/__init__.py | 0 .../default_parameters/root/defaults.yaml | 688 ++++++++++++++++++ .../v24_2_2_1/defaults.yaml | 683 ----------------- .../v24_2_2_2/defaults.yaml | 684 ----------------- .../v24_2_2_4/defaults.yaml | 683 ----------------- workflow/defaults.py | 33 +- workflow/realisations.py | 8 + workflow/schemas.py | 16 + workflow/scripts/realisation_to_srf.py | 4 + 11 files changed, 752 insertions(+), 2098 deletions(-) delete mode 100644 workflow/default_parameters/README.md create mode 100644 workflow/default_parameters/root/__init__.py create mode 100644 workflow/default_parameters/root/defaults.yaml diff --git a/workflow/default_parameters/README.md b/workflow/default_parameters/README.md deleted file mode 100644 index 22cc6876..00000000 --- a/workflow/default_parameters/README.md +++ /dev/null @@ -1,47 +0,0 @@ -The ground motion simulation versions found here are available in a larger format here: https://wiki.canterbury.ac.nz/display/QuakeCore/Simulation -The final suffix of .4, .2 or .1 denotes the grid spacing used of 400m, 200m or 100m - -#Version 16.1 - - HF: v5.4.5 - - path_dur: 1 - - fmin: 0.2 - - fmidbot: 0.5 - - lsvsref: 500.0 - -#Version 18.5.3 -#####Similar to 16.1 - - HF: v5.4.5.1 - - path_dur: 11 - - fmin: 0.5 - - fmidbot: 1.0 - - no-lf-amp: True - -#Version 18.5.4 -#####Similar to 18.5.3 - - HF: v5.4.5.2 - -#Version 20.1.1 -#####Similar to 18.5.3 - - HF: v5.4.6.1 - -#Version 20.1.2 -#####Similar to 18.5.4 - - HF: v5.4.6.2 - -#Version 20.4.1.4 -#####Similar to 18.5.3 - - hb_high version = 5.4.5.3_new_gnu - - czero = 2.0 - - rvfac_shal = 0.6 - - rvfac_deep = 0.6 - - emod3d version = 3.0.8 - - rayset 1 - - Added pSA periods, default in this version is now 31 periods - -#Version 20.4.1.2 -#####Similar to 20.4.1.4 - - flo: 0.5 - - dt: 0.01 - - fmin: 0.25 - - fmidbot: 0.5 - diff --git a/workflow/default_parameters/develop/defaults.yaml b/workflow/default_parameters/develop/defaults.yaml index 851b7e61..89aa55e4 100644 --- a/workflow/default_parameters/develop/defaults.yaml +++ b/workflow/default_parameters/develop/defaults.yaml @@ -101,6 +101,10 @@ rupture_velocity: rvfrac: 0.8 rvfrac_shal: 0.7 rvfrac_deep: 0.7 + shallow_depth: 5.0 + deep_depth: 20.0 + shallow_transition_range: 5.0 + deep_transition_range: 5.0 srf: side_taper: 0.02 bot_taper: 0.02 diff --git a/workflow/default_parameters/root/__init__.py b/workflow/default_parameters/root/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/workflow/default_parameters/root/defaults.yaml b/workflow/default_parameters/root/defaults.yaml new file mode 100644 index 00000000..6d55c3bd --- /dev/null +++ b/workflow/default_parameters/root/defaults.yaml @@ -0,0 +1,688 @@ +--- +emod3d: + all_in_one: 1 + bfilt: 4 + bforce: 0 + dampwidth: 0 + dblcpl: 0 + dmodfile: rho3dfile.d + dtts: 20 + dump_itinc: 4000 + dxout: 1 + dxts: 5 + dyout: 1 + dyts: 5 + dzout: 1 + dzts: 1 + elas_only: 0 + enable_output_dump: 1 + enable_restart: 1 + ffault: 2 + fhi: 0.0 + fmax: 25.0 + fmin: 0.01 + freesurf: 1 + geoproj: 1 + intmem: 1 + ix_ts: 99 + ix_ys: 100 + ix_zs: 100 + iy_ts: 2 + iy_xs: 60 + iy_zs: 50 + iz_ts: 1 + iz_xs: 1 + iz_ys: 1 + lonlat_out: 1 + maxmem: 1500 + model_style: 1 + nseis: 1 + order: 4 + pmodfile: vp3dfile.p + pointmt: 0 + qbndmax: 100.0 + qpfrac: 100.0 + qpqs_factor: 2.0 + qsfrac: 50.0 + read_restart: 0 + report: 100 + scale: 1 + smodfile: vs3dfile.s + span: 1 + stype: 2tri-p10-h20 + swap_bytes: 0 + ts_xy: 1 + ts_xz: 0 + ts_yz: 0 + tzero: 0.6 + vmodel_swapb: 0 + xseis: 0 + yseis: 0 + zseis: 0 + pertbfile: none.pertb +hf: + nbu: 4 + ift: 0 + flo: 0.02 + fhi: 19.9 + nl_skip: -99 + vp_sig: 0.0 + vsh_sig: 0.0 + rho_sig: 0.0 + qs_sig: 0.0 + ic_flag: true + velocity_name: "-1" + t_sec: 0.0 + sdrop: 50.0 + rayset: [1] + no_siteamp: false + fmax: 10.0 + kappa: 0.045 + qfexp: 0.6 + czero: 2.1 + calpha: -99.0 + mom: null + rupv: null + site_specific: false + vs_moho: 999.9 + fa_sig1: 0.0 + fa_sig2: 0.0 + rv_sig1: 0.1 + path_dur: 11 + dpath_pert: 0.0 + stress_parameter_adjustment_tect_type: 0 + stress_parameter_adjustment_target_magnitude: null + stress_parameter_adjustment_fault_area: null + stoch_dx: 2.0 + stoch_dy: 2.0 +rupture_velocity: + rvfrac: 0.8 + rvfrac_shal: 0.7 + rvfrac_deep: 0.7 + shallow_depth: 5.0 + deep_depth: 20.0 + shallow_transition_range: 5.0 + deep_transition_range: 5.0 +srf: + side_taper: 0.02 + bot_taper: 0.02 + top_taper: 0.0 + alpha_rough: 0.0 + gwid: [] + rvfrac_seg: [] + seg_delay: false + ymag_exp: null + xmag_exp: null + kx_corner: null + ky_corner: null + resolution: 0.1 + slip_sigma: 0.75 + risetime_coef: 1.6 + # The following parameters are only used for the point source approximation. + point_source_params: + # Valid options for the slip time function (stype) are: + # esg2006, urs, ucsb, ucsb2, ucsb-T, ucsb-varT1, cos, and seki + stype: "cos" + risetime: 0.5 + risetimefac: 1.0 + risetimedep: 0.0 + inittime: 0.0 +velocity_model: + min_vs: 0.5 + ds_multiplier: 1.2 + version: "2.07" + topo_type: "SQUASHED_TAPERED" + vs30: 500.0 + s_wave_velocity: 3500.0 + pgv_interpolants: [[3.5, 1.0], [8., 1.0]] +velocity_model_1d: + model: + - thickness: 0.0500 + Vp: 1.8000 + Vs: 0.3800 + rho: 1.8100 + Qp: 38.00 + Qs: 19.00 + - thickness: 0.0500 + Vp: 1.8000 + Vs: 0.4800 + rho: 1.8100 + Qp: 48.00 + Qs: 24.00 + - thickness: 0.0500 + Vp: 1.8000 + Vs: 0.5800 + rho: 1.8100 + Qp: 58.00 + Qs: 29.00 + - thickness: 0.0500 + Vp: 1.8000 + Vs: 0.6800 + rho: 1.8100 + Qp: 68.00 + Qs: 34.00 + - thickness: 0.1000 + Vp: 1.8000 + Vs: 0.7500 + rho: 1.8100 + Qp: 75.00 + Qs: 37.50 + - thickness: 0.1000 + Vp: 1.8000 + Vs: 0.8300 + rho: 1.8100 + Qp: 83.00 + Qs: 41.50 + - thickness: 0.2000 + Vp: 1.9000 + Vs: 0.9000 + rho: 1.8600 + Qp: 90.00 + Qs: 45.00 + - thickness: 0.2000 + Vp: 2.0300 + Vs: 1.0000 + rho: 1.9200 + Qp: 100.00 + Qs: 50.00 + - thickness: 0.2000 + Vp: 2.1400 + Vs: 1.0500 + rho: 1.9700 + Qp: 105.00 + Qs: 52.50 + - thickness: 0.2000 + Vp: 2.2000 + Vs: 1.1000 + rho: 1.9900 + Qp: 110.00 + Qs: 55.00 + - thickness: 0.2000 + Vp: 2.4000 + Vs: 1.1500 + rho: 2.0600 + Qp: 115.00 + Qs: 57.50 + - thickness: 0.2000 + Vp: 2.7000 + Vs: 1.2000 + rho: 2.1500 + Qp: 120.00 + Qs: 60.00 + - thickness: 0.2000 + Vp: 3.0000 + Vs: 1.4300 + rho: 2.2200 + Qp: 143.00 + Qs: 71.50 + - thickness: 0.2000 + Vp: 3.2700 + Vs: 1.6400 + rho: 2.2800 + Qp: 164.00 + Qs: 82.00 + - thickness: 0.2000 + Vp: 3.5300 + Vs: 1.8600 + rho: 2.3200 + Qp: 186.00 + Qs: 93.00 + - thickness: 0.2000 + Vp: 3.8000 + Vs: 2.0700 + rho: 2.3600 + Qp: 207.00 + Qs: 103.50 + - thickness: 0.2000 + Vp: 4.0700 + Vs: 2.2800 + rho: 2.4000 + Qp: 228.00 + Qs: 114.00 + - thickness: 0.2000 + Vp: 4.3300 + Vs: 2.4900 + rho: 2.4400 + Qp: 249.00 + Qs: 124.50 + - thickness: 0.2000 + Vp: 4.6000 + Vs: 2.7000 + rho: 2.4800 + Qp: 270.00 + Qs: 135.00 + - thickness: 0.2000 + Vp: 4.7100 + Vs: 2.7700 + rho: 2.4900 + Qp: 277.00 + Qs: 138.50 + - thickness: 0.2000 + Vp: 4.8200 + Vs: 2.8400 + rho: 2.5100 + Qp: 284.00 + Qs: 142.00 + - thickness: 0.2000 + Vp: 4.9300 + Vs: 2.9100 + rho: 2.5200 + Qp: 291.00 + Qs: 145.50 + - thickness: 0.2000 + Vp: 5.0400 + Vs: 2.9800 + rho: 2.5400 + Qp: 298.00 + Qs: 149.00 + - thickness: 0.2000 + Vp: 5.1500 + Vs: 3.0500 + rho: 2.5600 + Qp: 305.00 + Qs: 152.50 + - thickness: 0.2000 + Vp: 5.2600 + Vs: 3.1200 + rho: 2.5800 + Qp: 312.00 + Qs: 156.00 + - thickness: 0.2000 + Vp: 5.3700 + Vs: 3.1900 + rho: 2.6000 + Qp: 319.00 + Qs: 159.50 + - thickness: 0.2000 + Vp: 5.4800 + Vs: 3.2600 + rho: 2.6100 + Qp: 326.00 + Qs: 163.00 + - thickness: 0.2000 + Vp: 5.5900 + Vs: 3.3300 + rho: 2.6300 + Qp: 333.00 + Qs: 166.50 + - thickness: 0.2000 + Vp: 5.7000 + Vs: 3.4000 + rho: 2.6600 + Qp: 340.00 + Qs: 170.00 + - thickness: 3.0000 + Vp: 6.0000 + Vs: 3.6000 + rho: 2.7200 + Qp: 360.00 + Qs: 180.00 + - thickness: 4.0000 + Vp: 6.0000 + Vs: 3.6000 + rho: 2.7200 + Qp: 360.00 + Qs: 180.00 + - thickness: 15.0000 + Vp: 6.5000 + Vs: 3.7000 + rho: 2.8300 + Qp: 370.00 + Qs: 185.00 + - thickness: 12.0000 + Vp: 7.5000 + Vs: 4.3000 + rho: 3.1200 + Qp: 430.00 + Qs: 215.00 + - thickness: 999.0000 + Vp: 8.1000 + Vs: 4.6000 + rho: 3.3300 + Qp: 460.00 + Qs: 230.00 +im: + ims: ["PGA", "PGV", "CAV", "AI", "Ds575", "Ds595", "pSA", "FAS"] + valid_periods: + [ + 0.01, + 0.02, + 0.03, + 0.04, + 0.05, + 0.075, + 0.1, + 0.12, + 0.15, + 0.17, + 0.2, + 0.25, + 0.3, + 0.4, + 0.5, + 0.6, + 0.7, + 0.75, + 0.8, + 0.9, + 1.0, + 1.25, + 1.5, + 2.0, + 2.5, + 3.0, + 4.0, + 5.0, + 6.0, + 7.5, + 10.0, + ] + fas_frequencies: + [ + 0.1, + 0.10722672, + 0.1149757, + 0.12328467, + 0.13219411, + 0.14174742, + 0.15199111, + 0.16297508, + 0.17475284, + 0.18738174, + 0.2009233, + 0.21544347, + 0.23101297, + 0.24770764, + 0.26560878, + 0.28480359, + 0.30538555, + 0.32745492, + 0.35111917, + 0.37649358, + 0.40370173, + 0.43287613, + 0.46415888, + 0.49770236, + 0.53366992, + 0.57223677, + 0.61359073, + 0.65793322, + 0.70548023, + 0.75646333, + 0.81113083, + 0.869749, + 0.93260335, + 1.0, + 1.07226722, + 1.149757, + 1.23284674, + 1.32194115, + 1.41747416, + 1.51991108, + 1.62975083, + 1.7475284, + 1.87381742, + 2.009233, + 2.15443469, + 2.3101297, + 2.47707636, + 2.65608778, + 2.84803587, + 3.05385551, + 3.27454916, + 3.51119173, + 3.76493581, + 4.03701726, + 4.32876128, + 4.64158883, + 4.97702356, + 5.33669923, + 5.72236766, + 6.13590727, + 6.57933225, + 7.05480231, + 7.56463328, + 8.11130831, + 8.69749003, + 9.32603347, + 10.0, + 10.72267222, + 11.49756995, + 12.32846739, + 13.21941148, + 14.17474163, + 15.19911083, + 16.29750835, + 17.475284, + 18.73817423, + 20.09233003, + 21.5443469, + 23.101297, + 24.77076356, + 26.56087783, + 28.48035868, + 30.53855509, + 32.74549163, + 35.11191734, + 37.64935807, + 40.37017259, + 43.28761281, + 46.41588834, + 49.77023564, + 53.36699231, + 57.22367659, + 61.35907273, + 65.79332247, + 70.54802311, + 75.64633276, + 81.11308308, + 86.97490026, + 93.26033469, + 100.0, + ] +hf_velocity_model_1d: + model: + - thickness: 0.050 + Vp: 1.80 + Vs: 0.50 + rho: 1.81 + Qp: 116.00 + Qs: 58.00 + - thickness: 0.050 + Vp: 1.80 + Vs: 0.50 + rho: 1.81 + Qp: 116.00 + Qs: 58.00 + - thickness: 0.050 + Vp: 1.80 + Vs: 0.58 + rho: 1.81 + Qp: 121.44 + Qs: 60.72 + - thickness: 0.050 + Vp: 1.80 + Vs: 0.68 + rho: 1.81 + Qp: 128.24 + Qs: 64.12 + - thickness: 0.100 + Vp: 1.80 + Vs: 0.75 + rho: 1.81 + Qp: 133.00 + Qs: 66.50 + - thickness: 0.100 + Vp: 1.80 + Vs: 0.83 + rho: 1.81 + Qp: 138.44 + Qs: 69.22 + - thickness: 0.200 + Vp: 1.90 + Vs: 0.90 + rho: 1.86 + Qp: 143.20 + Qs: 71.60 + - thickness: 0.200 + Vp: 2.03 + Vs: 1.00 + rho: 1.92 + Qp: 150.00 + Qs: 75.00 + - thickness: 0.200 + Vp: 2.14 + Vs: 1.05 + rho: 1.97 + Qp: 153.40 + Qs: 76.70 + - thickness: 0.200 + Vp: 2.20 + Vs: 1.10 + rho: 1.99 + Qp: 156.80 + Qs: 78.40 + - thickness: 0.200 + Vp: 2.40 + Vs: 1.15 + rho: 2.06 + Qp: 160.20 + Qs: 80.10 + - thickness: 0.200 + Vp: 2.70 + Vs: 1.20 + rho: 2.15 + Qp: 163.60 + Qs: 81.80 + - thickness: 0.200 + Vp: 3.00 + Vs: 1.43 + rho: 2.22 + Qp: 179.24 + Qs: 89.62 + - thickness: 0.200 + Vp: 3.27 + Vs: 1.64 + rho: 2.28 + Qp: 193.52 + Qs: 96.76 + - thickness: 0.200 + Vp: 3.53 + Vs: 1.86 + rho: 2.32 + Qp: 208.48 + Qs: 104.24 + - thickness: 0.200 + Vp: 3.80 + Vs: 2.07 + rho: 2.36 + Qp: 222.76 + Qs: 111.38 + - thickness: 0.200 + Vp: 4.07 + Vs: 2.28 + rho: 2.40 + Qp: 237.04 + Qs: 118.52 + - thickness: 0.200 + Vp: 4.33 + Vs: 2.49 + rho: 2.44 + Qp: 251.32 + Qs: 125.66 + - thickness: 0.200 + Vp: 4.60 + Vs: 2.70 + rho: 2.48 + Qp: 265.60 + Qs: 132.80 + - thickness: 0.200 + Vp: 4.71 + Vs: 2.77 + rho: 2.49 + Qp: 270.36 + Qs: 135.18 + - thickness: 0.200 + Vp: 4.82 + Vs: 2.84 + rho: 2.51 + Qp: 275.12 + Qs: 137.56 + - thickness: 0.200 + Vp: 4.93 + Vs: 2.91 + rho: 2.52 + Qp: 279.88 + Qs: 139.94 + - thickness: 0.200 + Vp: 5.04 + Vs: 2.98 + rho: 2.54 + Qp: 284.64 + Qs: 142.32 + - thickness: 0.200 + Vp: 5.15 + Vs: 3.05 + rho: 2.56 + Qp: 289.40 + Qs: 144.70 + - thickness: 0.200 + Vp: 5.26 + Vs: 3.12 + rho: 2.58 + Qp: 294.16 + Qs: 147.08 + - thickness: 0.200 + Vp: 5.37 + Vs: 3.19 + rho: 2.60 + Qp: 298.92 + Qs: 149.46 + - thickness: 0.200 + Vp: 5.48 + Vs: 3.26 + rho: 2.61 + Qp: 303.68 + Qs: 151.84 + - thickness: 0.200 + Vp: 5.59 + Vs: 3.33 + rho: 2.63 + Qp: 308.44 + Qs: 154.22 + - thickness: 0.200 + Vp: 5.70 + Vs: 3.40 + rho: 2.66 + Qp: 313.20 + Qs: 156.60 + - thickness: 3.000 + Vp: 6.00 + Vs: 3.60 + rho: 2.72 + Qp: 326.80 + Qs: 163.40 + - thickness: 4.000 + Vp: 6.00 + Vs: 3.60 + rho: 2.72 + Qp: 326.80 + Qs: 163.40 + - thickness: 15.000 + Vp: 6.50 + Vs: 3.70 + rho: 2.83 + Qp: 333.60 + Qs: 166.80 + - thickness: 12.000 + Vp: 7.50 + Vs: 4.30 + rho: 3.12 + Qp: 374.40 + Qs: 187.20 + - thickness: 999.999 + Vp: 8.10 + Vs: 4.60 + rho: 3.33 + Qp: 394.80 + Qs: 197.40 diff --git a/workflow/default_parameters/v24_2_2_1/defaults.yaml b/workflow/default_parameters/v24_2_2_1/defaults.yaml index 77e71dfb..8c990b3c 100644 --- a/workflow/default_parameters/v24_2_2_1/defaults.yaml +++ b/workflow/default_parameters/v24_2_2_1/defaults.yaml @@ -1,691 +1,8 @@ --- resolution: resolution: 0.1 -emod3d: - all_in_one: 1 - bfilt: 4 - bforce: 0 - dampwidth: 0 - dblcpl: 0 - dmodfile: rho3dfile.d - dtts: 20 - dump_itinc: 4000 - dxout: 1 - dxts: 5 - dyout: 1 - dyts: 5 - dzout: 1 - dzts: 1 - elas_only: 0 - enable_output_dump: 1 - enable_restart: 1 - ffault: 2 - fhi: 0.0 - fmax: 25.0 - fmin: 0.01 - freesurf: 1 - geoproj: 1 - intmem: 1 - ix_ts: 99 - ix_ys: 100 - ix_zs: 100 - iy_ts: 2 - iy_xs: 60 - iy_zs: 50 - iz_ts: 1 - iz_xs: 1 - iz_ys: 1 - lonlat_out: 1 - maxmem: 1500 - model_style: 1 - nseis: 1 - order: 4 - pmodfile: vp3dfile.p - pointmt: 0 - qbndmax: 100.0 - qpfrac: 100.0 - qpqs_factor: 2.0 - qsfrac: 50.0 - read_restart: 0 - report: 100 - scale: 1 - smodfile: vs3dfile.s - span: 1 - stype: 2tri-p10-h20 - swap_bytes: 0 - ts_xy: 1 - ts_xz: 0 - ts_yz: 0 - tzero: 0.6 - vmodel_swapb: 0 - xseis: 0 - yseis: 0 - zseis: 0 - pertbfile: test -hf: - nbu: 4 - ift: 0 - flo: 0.02 - fhi: 19.9 - nl_skip: -99 - vp_sig: 0.0 - vsh_sig: 0.0 - rho_sig: 0.0 - qs_sig: 0.0 - ic_flag: true - velocity_name: "-1" - t_sec: 0.0 - sdrop: 50.0 - rayset: [1] - no_siteamp: false - fmax: 10.0 - kappa: 0.045 - qfexp: 0.6 - czero: 2.1 - calpha: -99.0 - mom: null - rupv: null - site_specific: false - vs_moho: 999.9 - fa_sig1: 0.0 - fa_sig2: 0.0 - rv_sig1: 0.1 - path_dur: 11 - dpath_pert: 0.0 - stress_parameter_adjustment_tect_type: 0 - stress_parameter_adjustment_target_magnitude: null - stress_parameter_adjustment_fault_area: null - stoch_dx: 2.0 - stoch_dy: 2.0 -rupture_velocity: - rvfrac: 0.8 - rvfrac_shal: 0.7 - rvfrac_deep: 0.7 -srf: - side_taper: 0.02 - bot_taper: 0.02 - top_taper: 0.0 - alpha_rough: 0.0 - gwid: [] - rvfrac_seg: [] - seg_delay: false - ymag_exp: null - xmag_exp: null - kx_corner: null - ky_corner: null - resolution: 0.1 - slip_sigma: 0.75 - risetime_coef: 1.6 - # The following parameters are only used for the point source approximation. - point_source_params: - # Valid options for the slip time function (stype) are: - # esg2006, urs, ucsb, ucsb2, ucsb-T, ucsb-varT1, cos, and seki - stype: "cos" - risetime: 0.5 - risetimefac: 1.0 - risetimedep: 0.0 - inittime: 0.0 -velocity_model: - min_vs: 0.5 - ds_multiplier: 1.2 - version: "2.07" - topo_type: "SQUASHED_TAPERED" - vs30: 500.0 - s_wave_velocity: 3500.0 - pgv_interpolants: [[3.5, 1.0], [8., 1.0]] -velocity_model_1d: - model: - - thickness: 0.0500 - Vp: 1.8000 - Vs: 0.3800 - rho: 1.8100 - Qp: 38.00 - Qs: 19.00 - - thickness: 0.0500 - Vp: 1.8000 - Vs: 0.4800 - rho: 1.8100 - Qp: 48.00 - Qs: 24.00 - - thickness: 0.0500 - Vp: 1.8000 - Vs: 0.5800 - rho: 1.8100 - Qp: 58.00 - Qs: 29.00 - - thickness: 0.0500 - Vp: 1.8000 - Vs: 0.6800 - rho: 1.8100 - Qp: 68.00 - Qs: 34.00 - - thickness: 0.1000 - Vp: 1.8000 - Vs: 0.7500 - rho: 1.8100 - Qp: 75.00 - Qs: 37.50 - - thickness: 0.1000 - Vp: 1.8000 - Vs: 0.8300 - rho: 1.8100 - Qp: 83.00 - Qs: 41.50 - - thickness: 0.2000 - Vp: 1.9000 - Vs: 0.9000 - rho: 1.8600 - Qp: 90.00 - Qs: 45.00 - - thickness: 0.2000 - Vp: 2.0300 - Vs: 1.0000 - rho: 1.9200 - Qp: 100.00 - Qs: 50.00 - - thickness: 0.2000 - Vp: 2.1400 - Vs: 1.0500 - rho: 1.9700 - Qp: 105.00 - Qs: 52.50 - - thickness: 0.2000 - Vp: 2.2000 - Vs: 1.1000 - rho: 1.9900 - Qp: 110.00 - Qs: 55.00 - - thickness: 0.2000 - Vp: 2.4000 - Vs: 1.1500 - rho: 2.0600 - Qp: 115.00 - Qs: 57.50 - - thickness: 0.2000 - Vp: 2.7000 - Vs: 1.2000 - rho: 2.1500 - Qp: 120.00 - Qs: 60.00 - - thickness: 0.2000 - Vp: 3.0000 - Vs: 1.4300 - rho: 2.2200 - Qp: 143.00 - Qs: 71.50 - - thickness: 0.2000 - Vp: 3.2700 - Vs: 1.6400 - rho: 2.2800 - Qp: 164.00 - Qs: 82.00 - - thickness: 0.2000 - Vp: 3.5300 - Vs: 1.8600 - rho: 2.3200 - Qp: 186.00 - Qs: 93.00 - - thickness: 0.2000 - Vp: 3.8000 - Vs: 2.0700 - rho: 2.3600 - Qp: 207.00 - Qs: 103.50 - - thickness: 0.2000 - Vp: 4.0700 - Vs: 2.2800 - rho: 2.4000 - Qp: 228.00 - Qs: 114.00 - - thickness: 0.2000 - Vp: 4.3300 - Vs: 2.4900 - rho: 2.4400 - Qp: 249.00 - Qs: 124.50 - - thickness: 0.2000 - Vp: 4.6000 - Vs: 2.7000 - rho: 2.4800 - Qp: 270.00 - Qs: 135.00 - - thickness: 0.2000 - Vp: 4.7100 - Vs: 2.7700 - rho: 2.4900 - Qp: 277.00 - Qs: 138.50 - - thickness: 0.2000 - Vp: 4.8200 - Vs: 2.8400 - rho: 2.5100 - Qp: 284.00 - Qs: 142.00 - - thickness: 0.2000 - Vp: 4.9300 - Vs: 2.9100 - rho: 2.5200 - Qp: 291.00 - Qs: 145.50 - - thickness: 0.2000 - Vp: 5.0400 - Vs: 2.9800 - rho: 2.5400 - Qp: 298.00 - Qs: 149.00 - - thickness: 0.2000 - Vp: 5.1500 - Vs: 3.0500 - rho: 2.5600 - Qp: 305.00 - Qs: 152.50 - - thickness: 0.2000 - Vp: 5.2600 - Vs: 3.1200 - rho: 2.5800 - Qp: 312.00 - Qs: 156.00 - - thickness: 0.2000 - Vp: 5.3700 - Vs: 3.1900 - rho: 2.6000 - Qp: 319.00 - Qs: 159.50 - - thickness: 0.2000 - Vp: 5.4800 - Vs: 3.2600 - rho: 2.6100 - Qp: 326.00 - Qs: 163.00 - - thickness: 0.2000 - Vp: 5.5900 - Vs: 3.3300 - rho: 2.6300 - Qp: 333.00 - Qs: 166.50 - - thickness: 0.2000 - Vp: 5.7000 - Vs: 3.4000 - rho: 2.6600 - Qp: 340.00 - Qs: 170.00 - - thickness: 3.0000 - Vp: 6.0000 - Vs: 3.6000 - rho: 2.7200 - Qp: 360.00 - Qs: 180.00 - - thickness: 4.0000 - Vp: 6.0000 - Vs: 3.6000 - rho: 2.7200 - Qp: 360.00 - Qs: 180.00 - - thickness: 15.0000 - Vp: 6.5000 - Vs: 3.7000 - rho: 2.8300 - Qp: 370.00 - Qs: 185.00 - - thickness: 12.0000 - Vp: 7.5000 - Vs: 4.3000 - rho: 3.1200 - Qp: 430.00 - Qs: 215.00 - - thickness: 999.0000 - Vp: 8.1000 - Vs: 4.6000 - rho: 3.3300 - Qp: 460.00 - Qs: 230.00 bb: flo: 1.0 fmidbot: 0.5 fmin: 0.25 site_amp_version: "2014" -im: - ims: ["PGA", "PGV", "CAV", "AI", "Ds575", "Ds595", "pSA", "FAS"] - valid_periods: - [ - 0.01, - 0.02, - 0.03, - 0.04, - 0.05, - 0.075, - 0.1, - 0.12, - 0.15, - 0.17, - 0.2, - 0.25, - 0.3, - 0.4, - 0.5, - 0.6, - 0.7, - 0.75, - 0.8, - 0.9, - 1.0, - 1.25, - 1.5, - 2.0, - 2.5, - 3.0, - 4.0, - 5.0, - 6.0, - 7.5, - 10.0, - ] - fas_frequencies: - [ - 0.1, - 0.10722672, - 0.1149757, - 0.12328467, - 0.13219411, - 0.14174742, - 0.15199111, - 0.16297508, - 0.17475284, - 0.18738174, - 0.2009233, - 0.21544347, - 0.23101297, - 0.24770764, - 0.26560878, - 0.28480359, - 0.30538555, - 0.32745492, - 0.35111917, - 0.37649358, - 0.40370173, - 0.43287613, - 0.46415888, - 0.49770236, - 0.53366992, - 0.57223677, - 0.61359073, - 0.65793322, - 0.70548023, - 0.75646333, - 0.81113083, - 0.869749, - 0.93260335, - 1.0, - 1.07226722, - 1.149757, - 1.23284674, - 1.32194115, - 1.41747416, - 1.51991108, - 1.62975083, - 1.7475284, - 1.87381742, - 2.009233, - 2.15443469, - 2.3101297, - 2.47707636, - 2.65608778, - 2.84803587, - 3.05385551, - 3.27454916, - 3.51119173, - 3.76493581, - 4.03701726, - 4.32876128, - 4.64158883, - 4.97702356, - 5.33669923, - 5.72236766, - 6.13590727, - 6.57933225, - 7.05480231, - 7.56463328, - 8.11130831, - 8.69749003, - 9.32603347, - 10.0, - 10.72267222, - 11.49756995, - 12.32846739, - 13.21941148, - 14.17474163, - 15.19911083, - 16.29750835, - 17.475284, - 18.73817423, - 20.09233003, - 21.5443469, - 23.101297, - 24.77076356, - 26.56087783, - 28.48035868, - 30.53855509, - 32.74549163, - 35.11191734, - 37.64935807, - 40.37017259, - 43.28761281, - 46.41588834, - 49.77023564, - 53.36699231, - 57.22367659, - 61.35907273, - 65.79332247, - 70.54802311, - 75.64633276, - 81.11308308, - 86.97490026, - 93.26033469, - 100.0, - ] -hf_velocity_model_1d: - model: - - thickness: 0.050 - Vp: 1.80 - Vs: 0.50 - rho: 1.81 - Qp: 116.00 - Qs: 58.00 - - thickness: 0.050 - Vp: 1.80 - Vs: 0.50 - rho: 1.81 - Qp: 116.00 - Qs: 58.00 - - thickness: 0.050 - Vp: 1.80 - Vs: 0.58 - rho: 1.81 - Qp: 121.44 - Qs: 60.72 - - thickness: 0.050 - Vp: 1.80 - Vs: 0.68 - rho: 1.81 - Qp: 128.24 - Qs: 64.12 - - thickness: 0.100 - Vp: 1.80 - Vs: 0.75 - rho: 1.81 - Qp: 133.00 - Qs: 66.50 - - thickness: 0.100 - Vp: 1.80 - Vs: 0.83 - rho: 1.81 - Qp: 138.44 - Qs: 69.22 - - thickness: 0.200 - Vp: 1.90 - Vs: 0.90 - rho: 1.86 - Qp: 143.20 - Qs: 71.60 - - thickness: 0.200 - Vp: 2.03 - Vs: 1.00 - rho: 1.92 - Qp: 150.00 - Qs: 75.00 - - thickness: 0.200 - Vp: 2.14 - Vs: 1.05 - rho: 1.97 - Qp: 153.40 - Qs: 76.70 - - thickness: 0.200 - Vp: 2.20 - Vs: 1.10 - rho: 1.99 - Qp: 156.80 - Qs: 78.40 - - thickness: 0.200 - Vp: 2.40 - Vs: 1.15 - rho: 2.06 - Qp: 160.20 - Qs: 80.10 - - thickness: 0.200 - Vp: 2.70 - Vs: 1.20 - rho: 2.15 - Qp: 163.60 - Qs: 81.80 - - thickness: 0.200 - Vp: 3.00 - Vs: 1.43 - rho: 2.22 - Qp: 179.24 - Qs: 89.62 - - thickness: 0.200 - Vp: 3.27 - Vs: 1.64 - rho: 2.28 - Qp: 193.52 - Qs: 96.76 - - thickness: 0.200 - Vp: 3.53 - Vs: 1.86 - rho: 2.32 - Qp: 208.48 - Qs: 104.24 - - thickness: 0.200 - Vp: 3.80 - Vs: 2.07 - rho: 2.36 - Qp: 222.76 - Qs: 111.38 - - thickness: 0.200 - Vp: 4.07 - Vs: 2.28 - rho: 2.40 - Qp: 237.04 - Qs: 118.52 - - thickness: 0.200 - Vp: 4.33 - Vs: 2.49 - rho: 2.44 - Qp: 251.32 - Qs: 125.66 - - thickness: 0.200 - Vp: 4.60 - Vs: 2.70 - rho: 2.48 - Qp: 265.60 - Qs: 132.80 - - thickness: 0.200 - Vp: 4.71 - Vs: 2.77 - rho: 2.49 - Qp: 270.36 - Qs: 135.18 - - thickness: 0.200 - Vp: 4.82 - Vs: 2.84 - rho: 2.51 - Qp: 275.12 - Qs: 137.56 - - thickness: 0.200 - Vp: 4.93 - Vs: 2.91 - rho: 2.52 - Qp: 279.88 - Qs: 139.94 - - thickness: 0.200 - Vp: 5.04 - Vs: 2.98 - rho: 2.54 - Qp: 284.64 - Qs: 142.32 - - thickness: 0.200 - Vp: 5.15 - Vs: 3.05 - rho: 2.56 - Qp: 289.40 - Qs: 144.70 - - thickness: 0.200 - Vp: 5.26 - Vs: 3.12 - rho: 2.58 - Qp: 294.16 - Qs: 147.08 - - thickness: 0.200 - Vp: 5.37 - Vs: 3.19 - rho: 2.60 - Qp: 298.92 - Qs: 149.46 - - thickness: 0.200 - Vp: 5.48 - Vs: 3.26 - rho: 2.61 - Qp: 303.68 - Qs: 151.84 - - thickness: 0.200 - Vp: 5.59 - Vs: 3.33 - rho: 2.63 - Qp: 308.44 - Qs: 154.22 - - thickness: 0.200 - Vp: 5.70 - Vs: 3.40 - rho: 2.66 - Qp: 313.20 - Qs: 156.60 - - thickness: 3.000 - Vp: 6.00 - Vs: 3.60 - rho: 2.72 - Qp: 326.80 - Qs: 163.40 - - thickness: 4.000 - Vp: 6.00 - Vs: 3.60 - rho: 2.72 - Qp: 326.80 - Qs: 163.40 - - thickness: 15.000 - Vp: 6.50 - Vs: 3.70 - rho: 2.83 - Qp: 333.60 - Qs: 166.80 - - thickness: 12.000 - Vp: 7.50 - Vs: 4.30 - rho: 3.12 - Qp: 374.40 - Qs: 187.20 - - thickness: 999.999 - Vp: 8.10 - Vs: 4.60 - rho: 3.33 - Qp: 394.80 - Qs: 197.40 diff --git a/workflow/default_parameters/v24_2_2_2/defaults.yaml b/workflow/default_parameters/v24_2_2_2/defaults.yaml index c1d624c8..ec662d84 100644 --- a/workflow/default_parameters/v24_2_2_2/defaults.yaml +++ b/workflow/default_parameters/v24_2_2_2/defaults.yaml @@ -1,692 +1,8 @@ --- resolution: resolution: 0.2 -emod3d: - all_in_one: 1 - bfilt: 4 - bforce: 0 - dampwidth: 0 - dblcpl: 0 - dmodfile: rho3dfile.d - dtts: 20 - dump_itinc: 4000 - dxout: 1 - dxts: 5 - dyout: 1 - dyts: 5 - dzout: 1 - dzts: 1 - elas_only: 0 - enable_output_dump: 1 - enable_restart: 1 - ffault: 2 - fhi: 0.0 - fmax: 25.0 - fmin: 0.01 - freesurf: 1 - geoproj: 1 - intmem: 1 - ix_ts: 99 - ix_ys: 100 - ix_zs: 100 - iy_ts: 2 - iy_xs: 60 - iy_zs: 50 - iz_ts: 1 - iz_xs: 1 - iz_ys: 1 - lonlat_out: 1 - maxmem: 1500 - model_style: 1 - nseis: 1 - order: 4 - pmodfile: vp3dfile.p - pointmt: 0 - qbndmax: 100.0 - qpfrac: 100.0 - qpqs_factor: 2.0 - qsfrac: 50.0 - read_restart: 0 - report: 100 - scale: 1 - smodfile: vs3dfile.s - span: 1 - stype: 2tri-p10-h20 - swap_bytes: 0 - ts_xy: 1 - ts_xz: 0 - ts_yz: 0 - tzero: 0.6 - vmodel_swapb: 0 - xseis: 0 - yseis: 0 - zseis: 0 - pertbfile: test -hf: - nbu: 4 - ift: 0 - flo: 0.02 - fhi: 19.9 - nl_skip: -99 - vp_sig: 0.0 - vsh_sig: 0.0 - rho_sig: 0.0 - qs_sig: 0.0 - ic_flag: true - velocity_name: "-1" - t_sec: 0.0 - sdrop: 50.0 - rayset: [1] - no_siteamp: false - fmax: 10.0 - kappa: 0.045 - qfexp: 0.6 - czero: 2.1 - calpha: -99.0 - mom: null - rupv: null - site_specific: false - vs_moho: 999.9 - fa_sig1: 0.0 - fa_sig2: 0.0 - rv_sig1: 0.1 - path_dur: 11 - dpath_pert: 0.0 - stress_parameter_adjustment_tect_type: 0 - stress_parameter_adjustment_target_magnitude: null - stress_parameter_adjustment_fault_area: null - stoch_dx: 2.0 - stoch_dy: 2.0 -rupture_velocity: - rvfrac: 0.8 - rvfrac_shal: 0.7 - rvfrac_deep: 0.7 -srf: - side_taper: 0.02 - bot_taper: 0.02 - top_taper: 0.0 - alpha_rough: 0.0 - gwid: [] - rvfrac_seg: [] - seg_delay: false - ymag_exp: null - xmag_exp: null - kx_corner: null - ky_corner: null - resolution: 0.1 - slip_sigma: 0.75 - risetime_coef: 1.6 - # The following parameters are only used for the point source approximation. - point_source_params: - # Valid options for the slip time function (stype) are: - # esg2006, urs, ucsb, ucsb2, ucsb-T, ucsb-varT1, cos, and seki - stype: "cos" - risetime: 0.5 - risetimefac: 1.0 - risetimedep: 0.0 - inittime: 0.0 -velocity_model: - min_vs: 0.5 - ds_multiplier: 1.2 - version: "2.07" - topo_type: "SQUASHED_TAPERED" - vs30: 500.0 - s_wave_velocity: 3500.0 - pgv_interpolants: [[3.5, 1.0], [8., 1.0]] bb: flo: 0.5 fmidbot: 0.5 fmin: 0.25 site_amp_version: "2014" - -velocity_model_1d: - model: - - thickness: 0.0500 - Vp: 1.8000 - Vs: 0.3800 - rho: 1.8100 - Qp: 38.00 - Qs: 19.00 - - thickness: 0.0500 - Vp: 1.8000 - Vs: 0.4800 - rho: 1.8100 - Qp: 48.00 - Qs: 24.00 - - thickness: 0.0500 - Vp: 1.8000 - Vs: 0.5800 - rho: 1.8100 - Qp: 58.00 - Qs: 29.00 - - thickness: 0.0500 - Vp: 1.8000 - Vs: 0.6800 - rho: 1.8100 - Qp: 68.00 - Qs: 34.00 - - thickness: 0.1000 - Vp: 1.8000 - Vs: 0.7500 - rho: 1.8100 - Qp: 75.00 - Qs: 37.50 - - thickness: 0.1000 - Vp: 1.8000 - Vs: 0.8300 - rho: 1.8100 - Qp: 83.00 - Qs: 41.50 - - thickness: 0.2000 - Vp: 1.9000 - Vs: 0.9000 - rho: 1.8600 - Qp: 90.00 - Qs: 45.00 - - thickness: 0.2000 - Vp: 2.0300 - Vs: 1.0000 - rho: 1.9200 - Qp: 100.00 - Qs: 50.00 - - thickness: 0.2000 - Vp: 2.1400 - Vs: 1.0500 - rho: 1.9700 - Qp: 105.00 - Qs: 52.50 - - thickness: 0.2000 - Vp: 2.2000 - Vs: 1.1000 - rho: 1.9900 - Qp: 110.00 - Qs: 55.00 - - thickness: 0.2000 - Vp: 2.4000 - Vs: 1.1500 - rho: 2.0600 - Qp: 115.00 - Qs: 57.50 - - thickness: 0.2000 - Vp: 2.7000 - Vs: 1.2000 - rho: 2.1500 - Qp: 120.00 - Qs: 60.00 - - thickness: 0.2000 - Vp: 3.0000 - Vs: 1.4300 - rho: 2.2200 - Qp: 143.00 - Qs: 71.50 - - thickness: 0.2000 - Vp: 3.2700 - Vs: 1.6400 - rho: 2.2800 - Qp: 164.00 - Qs: 82.00 - - thickness: 0.2000 - Vp: 3.5300 - Vs: 1.8600 - rho: 2.3200 - Qp: 186.00 - Qs: 93.00 - - thickness: 0.2000 - Vp: 3.8000 - Vs: 2.0700 - rho: 2.3600 - Qp: 207.00 - Qs: 103.50 - - thickness: 0.2000 - Vp: 4.0700 - Vs: 2.2800 - rho: 2.4000 - Qp: 228.00 - Qs: 114.00 - - thickness: 0.2000 - Vp: 4.3300 - Vs: 2.4900 - rho: 2.4400 - Qp: 249.00 - Qs: 124.50 - - thickness: 0.2000 - Vp: 4.6000 - Vs: 2.7000 - rho: 2.4800 - Qp: 270.00 - Qs: 135.00 - - thickness: 0.2000 - Vp: 4.7100 - Vs: 2.7700 - rho: 2.4900 - Qp: 277.00 - Qs: 138.50 - - thickness: 0.2000 - Vp: 4.8200 - Vs: 2.8400 - rho: 2.5100 - Qp: 284.00 - Qs: 142.00 - - thickness: 0.2000 - Vp: 4.9300 - Vs: 2.9100 - rho: 2.5200 - Qp: 291.00 - Qs: 145.50 - - thickness: 0.2000 - Vp: 5.0400 - Vs: 2.9800 - rho: 2.5400 - Qp: 298.00 - Qs: 149.00 - - thickness: 0.2000 - Vp: 5.1500 - Vs: 3.0500 - rho: 2.5600 - Qp: 305.00 - Qs: 152.50 - - thickness: 0.2000 - Vp: 5.2600 - Vs: 3.1200 - rho: 2.5800 - Qp: 312.00 - Qs: 156.00 - - thickness: 0.2000 - Vp: 5.3700 - Vs: 3.1900 - rho: 2.6000 - Qp: 319.00 - Qs: 159.50 - - thickness: 0.2000 - Vp: 5.4800 - Vs: 3.2600 - rho: 2.6100 - Qp: 326.00 - Qs: 163.00 - - thickness: 0.2000 - Vp: 5.5900 - Vs: 3.3300 - rho: 2.6300 - Qp: 333.00 - Qs: 166.50 - - thickness: 0.2000 - Vp: 5.7000 - Vs: 3.4000 - rho: 2.6600 - Qp: 340.00 - Qs: 170.00 - - thickness: 3.0000 - Vp: 6.0000 - Vs: 3.6000 - rho: 2.7200 - Qp: 360.00 - Qs: 180.00 - - thickness: 4.0000 - Vp: 6.0000 - Vs: 3.6000 - rho: 2.7200 - Qp: 360.00 - Qs: 180.00 - - thickness: 15.0000 - Vp: 6.5000 - Vs: 3.7000 - rho: 2.8300 - Qp: 370.00 - Qs: 185.00 - - thickness: 12.0000 - Vp: 7.5000 - Vs: 4.3000 - rho: 3.1200 - Qp: 430.00 - Qs: 215.00 - - thickness: 999.0000 - Vp: 8.1000 - Vs: 4.6000 - rho: 3.3300 - Qp: 460.00 - Qs: 230.00 -im: - ims: ["PGA", "PGV", "CAV", "AI", "Ds575", "Ds595", "pSA", "FAS"] - valid_periods: - [ - 0.01, - 0.02, - 0.03, - 0.04, - 0.05, - 0.075, - 0.1, - 0.12, - 0.15, - 0.17, - 0.2, - 0.25, - 0.3, - 0.4, - 0.5, - 0.6, - 0.7, - 0.75, - 0.8, - 0.9, - 1.0, - 1.25, - 1.5, - 2.0, - 2.5, - 3.0, - 4.0, - 5.0, - 6.0, - 7.5, - 10.0, - ] - fas_frequencies: - [ - 0.1, - 0.10722672, - 0.1149757, - 0.12328467, - 0.13219411, - 0.14174742, - 0.15199111, - 0.16297508, - 0.17475284, - 0.18738174, - 0.2009233, - 0.21544347, - 0.23101297, - 0.24770764, - 0.26560878, - 0.28480359, - 0.30538555, - 0.32745492, - 0.35111917, - 0.37649358, - 0.40370173, - 0.43287613, - 0.46415888, - 0.49770236, - 0.53366992, - 0.57223677, - 0.61359073, - 0.65793322, - 0.70548023, - 0.75646333, - 0.81113083, - 0.869749, - 0.93260335, - 1.0, - 1.07226722, - 1.149757, - 1.23284674, - 1.32194115, - 1.41747416, - 1.51991108, - 1.62975083, - 1.7475284, - 1.87381742, - 2.009233, - 2.15443469, - 2.3101297, - 2.47707636, - 2.65608778, - 2.84803587, - 3.05385551, - 3.27454916, - 3.51119173, - 3.76493581, - 4.03701726, - 4.32876128, - 4.64158883, - 4.97702356, - 5.33669923, - 5.72236766, - 6.13590727, - 6.57933225, - 7.05480231, - 7.56463328, - 8.11130831, - 8.69749003, - 9.32603347, - 10.0, - 10.72267222, - 11.49756995, - 12.32846739, - 13.21941148, - 14.17474163, - 15.19911083, - 16.29750835, - 17.475284, - 18.73817423, - 20.09233003, - 21.5443469, - 23.101297, - 24.77076356, - 26.56087783, - 28.48035868, - 30.53855509, - 32.74549163, - 35.11191734, - 37.64935807, - 40.37017259, - 43.28761281, - 46.41588834, - 49.77023564, - 53.36699231, - 57.22367659, - 61.35907273, - 65.79332247, - 70.54802311, - 75.64633276, - 81.11308308, - 86.97490026, - 93.26033469, - 100.0, - ] -hf_velocity_model_1d: - model: - - thickness: 0.050 - Vp: 1.80 - Vs: 0.50 - rho: 1.81 - Qp: 116.00 - Qs: 58.00 - - thickness: 0.050 - Vp: 1.80 - Vs: 0.50 - rho: 1.81 - Qp: 116.00 - Qs: 58.00 - - thickness: 0.050 - Vp: 1.80 - Vs: 0.58 - rho: 1.81 - Qp: 121.44 - Qs: 60.72 - - thickness: 0.050 - Vp: 1.80 - Vs: 0.68 - rho: 1.81 - Qp: 128.24 - Qs: 64.12 - - thickness: 0.100 - Vp: 1.80 - Vs: 0.75 - rho: 1.81 - Qp: 133.00 - Qs: 66.50 - - thickness: 0.100 - Vp: 1.80 - Vs: 0.83 - rho: 1.81 - Qp: 138.44 - Qs: 69.22 - - thickness: 0.200 - Vp: 1.90 - Vs: 0.90 - rho: 1.86 - Qp: 143.20 - Qs: 71.60 - - thickness: 0.200 - Vp: 2.03 - Vs: 1.00 - rho: 1.92 - Qp: 150.00 - Qs: 75.00 - - thickness: 0.200 - Vp: 2.14 - Vs: 1.05 - rho: 1.97 - Qp: 153.40 - Qs: 76.70 - - thickness: 0.200 - Vp: 2.20 - Vs: 1.10 - rho: 1.99 - Qp: 156.80 - Qs: 78.40 - - thickness: 0.200 - Vp: 2.40 - Vs: 1.15 - rho: 2.06 - Qp: 160.20 - Qs: 80.10 - - thickness: 0.200 - Vp: 2.70 - Vs: 1.20 - rho: 2.15 - Qp: 163.60 - Qs: 81.80 - - thickness: 0.200 - Vp: 3.00 - Vs: 1.43 - rho: 2.22 - Qp: 179.24 - Qs: 89.62 - - thickness: 0.200 - Vp: 3.27 - Vs: 1.64 - rho: 2.28 - Qp: 193.52 - Qs: 96.76 - - thickness: 0.200 - Vp: 3.53 - Vs: 1.86 - rho: 2.32 - Qp: 208.48 - Qs: 104.24 - - thickness: 0.200 - Vp: 3.80 - Vs: 2.07 - rho: 2.36 - Qp: 222.76 - Qs: 111.38 - - thickness: 0.200 - Vp: 4.07 - Vs: 2.28 - rho: 2.40 - Qp: 237.04 - Qs: 118.52 - - thickness: 0.200 - Vp: 4.33 - Vs: 2.49 - rho: 2.44 - Qp: 251.32 - Qs: 125.66 - - thickness: 0.200 - Vp: 4.60 - Vs: 2.70 - rho: 2.48 - Qp: 265.60 - Qs: 132.80 - - thickness: 0.200 - Vp: 4.71 - Vs: 2.77 - rho: 2.49 - Qp: 270.36 - Qs: 135.18 - - thickness: 0.200 - Vp: 4.82 - Vs: 2.84 - rho: 2.51 - Qp: 275.12 - Qs: 137.56 - - thickness: 0.200 - Vp: 4.93 - Vs: 2.91 - rho: 2.52 - Qp: 279.88 - Qs: 139.94 - - thickness: 0.200 - Vp: 5.04 - Vs: 2.98 - rho: 2.54 - Qp: 284.64 - Qs: 142.32 - - thickness: 0.200 - Vp: 5.15 - Vs: 3.05 - rho: 2.56 - Qp: 289.40 - Qs: 144.70 - - thickness: 0.200 - Vp: 5.26 - Vs: 3.12 - rho: 2.58 - Qp: 294.16 - Qs: 147.08 - - thickness: 0.200 - Vp: 5.37 - Vs: 3.19 - rho: 2.60 - Qp: 298.92 - Qs: 149.46 - - thickness: 0.200 - Vp: 5.48 - Vs: 3.26 - rho: 2.61 - Qp: 303.68 - Qs: 151.84 - - thickness: 0.200 - Vp: 5.59 - Vs: 3.33 - rho: 2.63 - Qp: 308.44 - Qs: 154.22 - - thickness: 0.200 - Vp: 5.70 - Vs: 3.40 - rho: 2.66 - Qp: 313.20 - Qs: 156.60 - - thickness: 3.000 - Vp: 6.00 - Vs: 3.60 - rho: 2.72 - Qp: 326.80 - Qs: 163.40 - - thickness: 4.000 - Vp: 6.00 - Vs: 3.60 - rho: 2.72 - Qp: 326.80 - Qs: 163.40 - - thickness: 15.000 - Vp: 6.50 - Vs: 3.70 - rho: 2.83 - Qp: 333.60 - Qs: 166.80 - - thickness: 12.000 - Vp: 7.50 - Vs: 4.30 - rho: 3.12 - Qp: 374.40 - Qs: 187.20 - - thickness: 999.999 - Vp: 8.10 - Vs: 4.60 - rho: 3.33 - Qp: 394.80 - Qs: 197.40 diff --git a/workflow/default_parameters/v24_2_2_4/defaults.yaml b/workflow/default_parameters/v24_2_2_4/defaults.yaml index 851b7e61..beb9c260 100644 --- a/workflow/default_parameters/v24_2_2_4/defaults.yaml +++ b/workflow/default_parameters/v24_2_2_4/defaults.yaml @@ -1,691 +1,8 @@ --- resolution: resolution: 0.4 -emod3d: - all_in_one: 1 - bfilt: 4 - bforce: 0 - dampwidth: 0 - dblcpl: 0 - dmodfile: rho3dfile.d - dtts: 20 - dump_itinc: 4000 - dxout: 1 - dxts: 5 - dyout: 1 - dyts: 5 - dzout: 1 - dzts: 1 - elas_only: 0 - enable_output_dump: 1 - enable_restart: 1 - ffault: 2 - fhi: 0.0 - fmax: 25.0 - fmin: 0.01 - freesurf: 1 - geoproj: 1 - intmem: 1 - ix_ts: 99 - ix_ys: 100 - ix_zs: 100 - iy_ts: 2 - iy_xs: 60 - iy_zs: 50 - iz_ts: 1 - iz_xs: 1 - iz_ys: 1 - lonlat_out: 1 - maxmem: 1500 - model_style: 1 - nseis: 1 - order: 4 - pmodfile: vp3dfile.p - pointmt: 0 - qbndmax: 100.0 - qpfrac: 100.0 - qpqs_factor: 2.0 - qsfrac: 50.0 - read_restart: 0 - report: 100 - scale: 1 - smodfile: vs3dfile.s - span: 1 - stype: 2tri-p10-h20 - swap_bytes: 0 - ts_xy: 1 - ts_xz: 0 - ts_yz: 0 - tzero: 0.6 - vmodel_swapb: 0 - xseis: 0 - yseis: 0 - zseis: 0 - pertbfile: none.pertb -hf: - nbu: 4 - ift: 0 - flo: 0.02 - fhi: 19.9 - nl_skip: -99 - vp_sig: 0.0 - vsh_sig: 0.0 - rho_sig: 0.0 - qs_sig: 0.0 - ic_flag: true - velocity_name: "-1" - t_sec: 0.0 - sdrop: 50.0 - rayset: [1] - no_siteamp: false - fmax: 10.0 - kappa: 0.045 - qfexp: 0.6 - czero: 2.1 - calpha: -99.0 - mom: null - rupv: null - site_specific: false - vs_moho: 999.9 - fa_sig1: 0.0 - fa_sig2: 0.0 - rv_sig1: 0.1 - path_dur: 11 - dpath_pert: 0.0 - stress_parameter_adjustment_tect_type: 0 - stress_parameter_adjustment_target_magnitude: null - stress_parameter_adjustment_fault_area: null - stoch_dx: 2.0 - stoch_dy: 2.0 -rupture_velocity: - rvfrac: 0.8 - rvfrac_shal: 0.7 - rvfrac_deep: 0.7 -srf: - side_taper: 0.02 - bot_taper: 0.02 - top_taper: 0.0 - alpha_rough: 0.0 - gwid: [] - rvfrac_seg: [] - seg_delay: false - ymag_exp: null - xmag_exp: null - kx_corner: null - ky_corner: null - resolution: 0.1 - slip_sigma: 0.75 - risetime_coef: 1.6 - # The following parameters are only used for the point source approximation. - point_source_params: - # Valid options for the slip time function (stype) are: - # esg2006, urs, ucsb, ucsb2, ucsb-T, ucsb-varT1, cos, and seki - stype: "cos" - risetime: 0.5 - risetimefac: 1.0 - risetimedep: 0.0 - inittime: 0.0 -velocity_model: - min_vs: 0.5 - ds_multiplier: 1.2 - version: "2.07" - topo_type: "SQUASHED_TAPERED" - vs30: 500.0 - s_wave_velocity: 3500.0 - pgv_interpolants: [[3.5, 1.0], [8., 1.0]] -velocity_model_1d: - model: - - thickness: 0.0500 - Vp: 1.8000 - Vs: 0.3800 - rho: 1.8100 - Qp: 38.00 - Qs: 19.00 - - thickness: 0.0500 - Vp: 1.8000 - Vs: 0.4800 - rho: 1.8100 - Qp: 48.00 - Qs: 24.00 - - thickness: 0.0500 - Vp: 1.8000 - Vs: 0.5800 - rho: 1.8100 - Qp: 58.00 - Qs: 29.00 - - thickness: 0.0500 - Vp: 1.8000 - Vs: 0.6800 - rho: 1.8100 - Qp: 68.00 - Qs: 34.00 - - thickness: 0.1000 - Vp: 1.8000 - Vs: 0.7500 - rho: 1.8100 - Qp: 75.00 - Qs: 37.50 - - thickness: 0.1000 - Vp: 1.8000 - Vs: 0.8300 - rho: 1.8100 - Qp: 83.00 - Qs: 41.50 - - thickness: 0.2000 - Vp: 1.9000 - Vs: 0.9000 - rho: 1.8600 - Qp: 90.00 - Qs: 45.00 - - thickness: 0.2000 - Vp: 2.0300 - Vs: 1.0000 - rho: 1.9200 - Qp: 100.00 - Qs: 50.00 - - thickness: 0.2000 - Vp: 2.1400 - Vs: 1.0500 - rho: 1.9700 - Qp: 105.00 - Qs: 52.50 - - thickness: 0.2000 - Vp: 2.2000 - Vs: 1.1000 - rho: 1.9900 - Qp: 110.00 - Qs: 55.00 - - thickness: 0.2000 - Vp: 2.4000 - Vs: 1.1500 - rho: 2.0600 - Qp: 115.00 - Qs: 57.50 - - thickness: 0.2000 - Vp: 2.7000 - Vs: 1.2000 - rho: 2.1500 - Qp: 120.00 - Qs: 60.00 - - thickness: 0.2000 - Vp: 3.0000 - Vs: 1.4300 - rho: 2.2200 - Qp: 143.00 - Qs: 71.50 - - thickness: 0.2000 - Vp: 3.2700 - Vs: 1.6400 - rho: 2.2800 - Qp: 164.00 - Qs: 82.00 - - thickness: 0.2000 - Vp: 3.5300 - Vs: 1.8600 - rho: 2.3200 - Qp: 186.00 - Qs: 93.00 - - thickness: 0.2000 - Vp: 3.8000 - Vs: 2.0700 - rho: 2.3600 - Qp: 207.00 - Qs: 103.50 - - thickness: 0.2000 - Vp: 4.0700 - Vs: 2.2800 - rho: 2.4000 - Qp: 228.00 - Qs: 114.00 - - thickness: 0.2000 - Vp: 4.3300 - Vs: 2.4900 - rho: 2.4400 - Qp: 249.00 - Qs: 124.50 - - thickness: 0.2000 - Vp: 4.6000 - Vs: 2.7000 - rho: 2.4800 - Qp: 270.00 - Qs: 135.00 - - thickness: 0.2000 - Vp: 4.7100 - Vs: 2.7700 - rho: 2.4900 - Qp: 277.00 - Qs: 138.50 - - thickness: 0.2000 - Vp: 4.8200 - Vs: 2.8400 - rho: 2.5100 - Qp: 284.00 - Qs: 142.00 - - thickness: 0.2000 - Vp: 4.9300 - Vs: 2.9100 - rho: 2.5200 - Qp: 291.00 - Qs: 145.50 - - thickness: 0.2000 - Vp: 5.0400 - Vs: 2.9800 - rho: 2.5400 - Qp: 298.00 - Qs: 149.00 - - thickness: 0.2000 - Vp: 5.1500 - Vs: 3.0500 - rho: 2.5600 - Qp: 305.00 - Qs: 152.50 - - thickness: 0.2000 - Vp: 5.2600 - Vs: 3.1200 - rho: 2.5800 - Qp: 312.00 - Qs: 156.00 - - thickness: 0.2000 - Vp: 5.3700 - Vs: 3.1900 - rho: 2.6000 - Qp: 319.00 - Qs: 159.50 - - thickness: 0.2000 - Vp: 5.4800 - Vs: 3.2600 - rho: 2.6100 - Qp: 326.00 - Qs: 163.00 - - thickness: 0.2000 - Vp: 5.5900 - Vs: 3.3300 - rho: 2.6300 - Qp: 333.00 - Qs: 166.50 - - thickness: 0.2000 - Vp: 5.7000 - Vs: 3.4000 - rho: 2.6600 - Qp: 340.00 - Qs: 170.00 - - thickness: 3.0000 - Vp: 6.0000 - Vs: 3.6000 - rho: 2.7200 - Qp: 360.00 - Qs: 180.00 - - thickness: 4.0000 - Vp: 6.0000 - Vs: 3.6000 - rho: 2.7200 - Qp: 360.00 - Qs: 180.00 - - thickness: 15.0000 - Vp: 6.5000 - Vs: 3.7000 - rho: 2.8300 - Qp: 370.00 - Qs: 185.00 - - thickness: 12.0000 - Vp: 7.5000 - Vs: 4.3000 - rho: 3.1200 - Qp: 430.00 - Qs: 215.00 - - thickness: 999.0000 - Vp: 8.1000 - Vs: 4.6000 - rho: 3.3300 - Qp: 460.00 - Qs: 230.00 -hf_velocity_model_1d: - model: - - thickness: 0.050 - Vp: 1.80 - Vs: 0.50 - rho: 1.81 - Qp: 116.00 - Qs: 58.00 - - thickness: 0.050 - Vp: 1.80 - Vs: 0.50 - rho: 1.81 - Qp: 116.00 - Qs: 58.00 - - thickness: 0.050 - Vp: 1.80 - Vs: 0.58 - rho: 1.81 - Qp: 121.44 - Qs: 60.72 - - thickness: 0.050 - Vp: 1.80 - Vs: 0.68 - rho: 1.81 - Qp: 128.24 - Qs: 64.12 - - thickness: 0.100 - Vp: 1.80 - Vs: 0.75 - rho: 1.81 - Qp: 133.00 - Qs: 66.50 - - thickness: 0.100 - Vp: 1.80 - Vs: 0.83 - rho: 1.81 - Qp: 138.44 - Qs: 69.22 - - thickness: 0.200 - Vp: 1.90 - Vs: 0.90 - rho: 1.86 - Qp: 143.20 - Qs: 71.60 - - thickness: 0.200 - Vp: 2.03 - Vs: 1.00 - rho: 1.92 - Qp: 150.00 - Qs: 75.00 - - thickness: 0.200 - Vp: 2.14 - Vs: 1.05 - rho: 1.97 - Qp: 153.40 - Qs: 76.70 - - thickness: 0.200 - Vp: 2.20 - Vs: 1.10 - rho: 1.99 - Qp: 156.80 - Qs: 78.40 - - thickness: 0.200 - Vp: 2.40 - Vs: 1.15 - rho: 2.06 - Qp: 160.20 - Qs: 80.10 - - thickness: 0.200 - Vp: 2.70 - Vs: 1.20 - rho: 2.15 - Qp: 163.60 - Qs: 81.80 - - thickness: 0.200 - Vp: 3.00 - Vs: 1.43 - rho: 2.22 - Qp: 179.24 - Qs: 89.62 - - thickness: 0.200 - Vp: 3.27 - Vs: 1.64 - rho: 2.28 - Qp: 193.52 - Qs: 96.76 - - thickness: 0.200 - Vp: 3.53 - Vs: 1.86 - rho: 2.32 - Qp: 208.48 - Qs: 104.24 - - thickness: 0.200 - Vp: 3.80 - Vs: 2.07 - rho: 2.36 - Qp: 222.76 - Qs: 111.38 - - thickness: 0.200 - Vp: 4.07 - Vs: 2.28 - rho: 2.40 - Qp: 237.04 - Qs: 118.52 - - thickness: 0.200 - Vp: 4.33 - Vs: 2.49 - rho: 2.44 - Qp: 251.32 - Qs: 125.66 - - thickness: 0.200 - Vp: 4.60 - Vs: 2.70 - rho: 2.48 - Qp: 265.60 - Qs: 132.80 - - thickness: 0.200 - Vp: 4.71 - Vs: 2.77 - rho: 2.49 - Qp: 270.36 - Qs: 135.18 - - thickness: 0.200 - Vp: 4.82 - Vs: 2.84 - rho: 2.51 - Qp: 275.12 - Qs: 137.56 - - thickness: 0.200 - Vp: 4.93 - Vs: 2.91 - rho: 2.52 - Qp: 279.88 - Qs: 139.94 - - thickness: 0.200 - Vp: 5.04 - Vs: 2.98 - rho: 2.54 - Qp: 284.64 - Qs: 142.32 - - thickness: 0.200 - Vp: 5.15 - Vs: 3.05 - rho: 2.56 - Qp: 289.40 - Qs: 144.70 - - thickness: 0.200 - Vp: 5.26 - Vs: 3.12 - rho: 2.58 - Qp: 294.16 - Qs: 147.08 - - thickness: 0.200 - Vp: 5.37 - Vs: 3.19 - rho: 2.60 - Qp: 298.92 - Qs: 149.46 - - thickness: 0.200 - Vp: 5.48 - Vs: 3.26 - rho: 2.61 - Qp: 303.68 - Qs: 151.84 - - thickness: 0.200 - Vp: 5.59 - Vs: 3.33 - rho: 2.63 - Qp: 308.44 - Qs: 154.22 - - thickness: 0.200 - Vp: 5.70 - Vs: 3.40 - rho: 2.66 - Qp: 313.20 - Qs: 156.60 - - thickness: 3.000 - Vp: 6.00 - Vs: 3.60 - rho: 2.72 - Qp: 326.80 - Qs: 163.40 - - thickness: 4.000 - Vp: 6.00 - Vs: 3.60 - rho: 2.72 - Qp: 326.80 - Qs: 163.40 - - thickness: 15.000 - Vp: 6.50 - Vs: 3.70 - rho: 2.83 - Qp: 333.60 - Qs: 166.80 - - thickness: 12.000 - Vp: 7.50 - Vs: 4.30 - rho: 3.12 - Qp: 374.40 - Qs: 187.20 - - thickness: 999.999 - Vp: 8.10 - Vs: 4.60 - rho: 3.33 - Qp: 394.80 - Qs: 197.40 bb: flo: 0.25 fmidbot: 0.5 fmin: 0.25 site_amp_version: "2014" -im: - ims: ["PGA", "PGV", "CAV", "AI", "Ds575", "Ds595", "pSA", "FAS"] - valid_periods: - [ - 0.01, - 0.02, - 0.03, - 0.04, - 0.05, - 0.075, - 0.1, - 0.12, - 0.15, - 0.17, - 0.2, - 0.25, - 0.3, - 0.4, - 0.5, - 0.6, - 0.7, - 0.75, - 0.8, - 0.9, - 1.0, - 1.25, - 1.5, - 2.0, - 2.5, - 3.0, - 4.0, - 5.0, - 6.0, - 7.5, - 10.0, - ] - fas_frequencies: - [ - 0.1, - 0.10722672, - 0.1149757, - 0.12328467, - 0.13219411, - 0.14174742, - 0.15199111, - 0.16297508, - 0.17475284, - 0.18738174, - 0.2009233, - 0.21544347, - 0.23101297, - 0.24770764, - 0.26560878, - 0.28480359, - 0.30538555, - 0.32745492, - 0.35111917, - 0.37649358, - 0.40370173, - 0.43287613, - 0.46415888, - 0.49770236, - 0.53366992, - 0.57223677, - 0.61359073, - 0.65793322, - 0.70548023, - 0.75646333, - 0.81113083, - 0.869749, - 0.93260335, - 1.0, - 1.07226722, - 1.149757, - 1.23284674, - 1.32194115, - 1.41747416, - 1.51991108, - 1.62975083, - 1.7475284, - 1.87381742, - 2.009233, - 2.15443469, - 2.3101297, - 2.47707636, - 2.65608778, - 2.84803587, - 3.05385551, - 3.27454916, - 3.51119173, - 3.76493581, - 4.03701726, - 4.32876128, - 4.64158883, - 4.97702356, - 5.33669923, - 5.72236766, - 6.13590727, - 6.57933225, - 7.05480231, - 7.56463328, - 8.11130831, - 8.69749003, - 9.32603347, - 10.0, - 10.72267222, - 11.49756995, - 12.32846739, - 13.21941148, - 14.17474163, - 15.19911083, - 16.29750835, - 17.475284, - 18.73817423, - 20.09233003, - 21.5443469, - 23.101297, - 24.77076356, - 26.56087783, - 28.48035868, - 30.53855509, - 32.74549163, - 35.11191734, - 37.64935807, - 40.37017259, - 43.28761281, - 46.41588834, - 49.77023564, - 53.36699231, - 57.22367659, - 61.35907273, - 65.79332247, - 70.54802311, - 75.64633276, - 81.11308308, - 86.97490026, - 93.26033469, - 100.0, - ] diff --git a/workflow/defaults.py b/workflow/defaults.py index efac3672..cdf247d3 100644 --- a/workflow/defaults.py +++ b/workflow/defaults.py @@ -3,9 +3,12 @@ import importlib from enum import StrEnum from importlib import resources +from typing import Any import yaml +import workflow.default_parameters.root as root + class DefaultsVersion(StrEnum): """Enum of versions that can be loaded by load_defaults.""" @@ -16,6 +19,29 @@ class DefaultsVersion(StrEnum): develop = "develop" +def _merge_defaults(defaults_a: dict[str, Any], defaults_b: dict[str, Any]) -> None: + """Deep merge python dictionaries preferring the values of the second argument. + + Parameters + ---------- + defaults_a : dict[str, Any] + The first dictionary to merge from. + defaults_b : dict[str, Any] + The second dictionary to merge from. Keys in this dictionary + are preferred. + """ + + for key, value in defaults_b.items(): + if ( + key in defaults_a + and isinstance(defaults_a[key], dict) + and isinstance(value, dict) + ): + _merge_defaults(defaults_a[key], defaults_b[key]) + else: + defaults_a[key] = value + + def load_defaults(version: DefaultsVersion) -> dict[str, int | float | str]: """Load default parameters for EMOD3D simulation from a YAML file. @@ -39,6 +65,11 @@ def load_defaults(version: DefaultsVersion) -> dict[str, int | float | str]: defaults_package = importlib.import_module( f"workflow.default_parameters.v{version.value.replace('.', '_')}" ) + root_defaults_path = resources.files(root) / "defaults.yaml" + with root_defaults_path.open(encoding="utf-8") as root_defaults_handle: + root_defaults = yaml.safe_load(root_defaults_handle) defaults_path = resources.files(defaults_package) / "defaults.yaml" with defaults_path.open(encoding="utf-8") as emod3d_defaults_file_handle: - return yaml.safe_load(emod3d_defaults_file_handle) + defaults = yaml.safe_load(emod3d_defaults_file_handle) + _merge_defaults(root_defaults, defaults) + return root_defaults diff --git a/workflow/realisations.py b/workflow/realisations.py index bc47f785..d1279ab8 100644 --- a/workflow/realisations.py +++ b/workflow/realisations.py @@ -736,6 +736,14 @@ class RuptureVelocity(RealisationConfiguration): """Rupture velocity at shallow depths""" rvfrac_deep: float """Rupture velocity at depth""" + shallow_depth: float + """Shallow depth (km). Marks transition to rvfrac_shal from rvfrac.""" + shallow_transition_range: float + """Shallow depth transition range (km).""" + deep_depth: float + """Shallow depth (km). Marks transition to rvfrac_deep from rvfrac.""" + deep_transition_range: float + """Deep depth transition range (km).""" @dataclasses.dataclass diff --git a/workflow/schemas.py b/workflow/schemas.py index 41ea14da..567610d2 100644 --- a/workflow/schemas.py +++ b/workflow/schemas.py @@ -389,6 +389,22 @@ def _corners_to_array(corners_spec: list[dict[str, float]]) -> np.ndarray: Literal("rvfrac_deep", description="Rupture velocity at depth"): And( NUMBER, _is_positive ), + Literal( + "shallow_depth", + description="Shallow transition depth.", + ): And(NUMBER, _is_positive), + Literal( + "shallow_transition_range", + description="Shallow transition depth transition range.", + ): And(NUMBER, _is_positive), + Literal( + "deep_depth", + description="Deep transition depth.", + ): And(NUMBER, _is_positive), + Literal( + "deep_transition_range", + description="Deep transition depth transition range.", + ): And(NUMBER, _is_positive), } ) diff --git a/workflow/scripts/realisation_to_srf.py b/workflow/scripts/realisation_to_srf.py index 03adaea0..30c37612 100644 --- a/workflow/scripts/realisation_to_srf.py +++ b/workflow/scripts/realisation_to_srf.py @@ -473,7 +473,11 @@ def _build_genslip_command( f"dt={dt}", f"rvfrac={rupture_velocity.rvfrac}", f"shal_vrup={rupture_velocity.rvfrac_shal}", + f"shal_vrup_dep={rupture_velocity.shallow_depth}", + f"shal_vrup_deprange={rupture_velocity.shallow_transition_range}", f"deep_vrup={rupture_velocity.rvfrac_deep}", + f"deep_vrup_dep={rupture_velocity.deep_depth}", + f"deep_vrup_deprange={rupture_velocity.deep_transition_range}", ] skipped_fields = {"point_source_params"} for field in dataclasses.fields(srf_config): From 5e6b26078b5c80b5210a05415543606c244f9158 Mon Sep 17 00:00:00 2001 From: Jake Faulkner Date: Mon, 5 Jan 2026 16:48:26 +1300 Subject: [PATCH 08/17] feat(hf_sim): specify shallow/deep transition depths. --- tests/test_hf.py | 21 +++++++++++++++------ workflow/scripts/hf_sim.py | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 6 deletions(-) diff --git a/tests/test_hf.py b/tests/test_hf.py index 2845b6b8..c7d5ed87 100644 --- a/tests/test_hf.py +++ b/tests/test_hf.py @@ -56,7 +56,15 @@ def test_build_hf_input_serialisation() -> None: ) res = Resolution(resolution=0.1) - rv = RuptureVelocity(rvfrac=0.8, rvfrac_shal=0.7, rvfrac_deep=0.9) + rv = RuptureVelocity( + rvfrac=0.8, + rvfrac_shal=0.7, + rvfrac_deep=0.9, + shallow_depth=1.0, + shallow_transition_range=1, + deep_depth=2.0, + deep_transition_range=1, + ) # Rather than create DomainParameters with a bounding box, we simplify with a mock object domain = SimpleNamespace(duration=100.0) @@ -78,11 +86,12 @@ def test_build_hf_input_serialisation() -> None: assert lines[5] == "1" # int(not no_siteamp) -> int(not False) -> 1 assert lines[7] == "{seed}" # seed placeholder assert lines[9] == "100.0 0.005 20.0 0.045 0.6" # Domain and resolution parameters - assert lines[10] == "0.8 0.7 0.9 2.5 0.0" - assert lines[11] == "-1 1.2" # mom (None -> -1) and rupv - assert lines[12] == str(stoch_ffp) # Stoch file path - assert lines[15] == "0 0.1 0.1 0.1 0.1 1" # Sigs and ic_flag (True -> 1) - assert lines[20] == "-1 -1 -1" # Optional stress parameters + assert lines[10] == "0.8 0.7 0.9 2.5 0.0" # rupture velocity + czero,alpha + assert lines[11] == "0.5 1.5 1.5 2.5" # shallow depth, deep depth + assert lines[12] == "-1 1.2" # mom (None -> -1) and rupv + assert lines[13] == str(stoch_ffp) # Stoch file path + assert lines[16] == "0 0.1 0.1 0.1 0.1 1" # Sigs and ic_flag (True -> 1) + assert lines[21] == "-1 -1 -1" # Optional stress parameters STATION_STRATEGY = st.text( diff --git a/workflow/scripts/hf_sim.py b/workflow/scripts/hf_sim.py index 35128dcf..1610f5eb 100644 --- a/workflow/scripts/hf_sim.py +++ b/workflow/scripts/hf_sim.py @@ -62,6 +62,35 @@ app = typer.Typer() +def rupture_velocity_hf_transition_bands( + rupture_velocity: RuptureVelocity, +) -> tuple[float, float, float, float]: + """Produce transition bands for rupture velocity parameters. + + Converts median-centred description into bounds description. + + Parameters + ---------- + rupture_velocity : RuptureVelocity + Rupture velocity configuration + + + Returns + ------- + tuple[float, float, float, float] + The shallow min/max, deep min/max transition depths. + """ + deep = rupture_velocity.deep_depth + deep_range = rupture_velocity.deep_transition_range + shallow = rupture_velocity.shallow_depth + shallow_range = rupture_velocity.shallow_transition_range + deep_min = deep - deep_range / 2 + deep_max = deep + deep_range / 2 + shallow_min = shallow - shallow_range / 2 + shallow_max = shallow + shallow_range / 2 + return shallow_min, shallow_max, deep_min, deep_max + + def build_hf_input( stoch_ffp: Path, velocity_model: Path, @@ -95,6 +124,9 @@ def build_hf_input( substituted to yield a high-frequency input in for each station. """ + shallow_min, shallow_max, deep_min, deep_max = rupture_velocity_hf_transition_bands( + rupture_velocity + ) hf_sim_input = [ "", hf_config.sdrop, @@ -107,6 +139,7 @@ def build_hf_input( 1, # one station in the input f"{domain_parameters.duration} {resolution.dt} {hf_config.fmax} {hf_config.kappa} {hf_config.qfexp}", f"{rupture_velocity.rvfrac} {rupture_velocity.rvfrac_shal} {rupture_velocity.rvfrac_deep} {hf_config.czero} {hf_config.calpha}", + f"{shallow_min} {shallow_max} {deep_min} {deep_max}", f"{hf_config.mom or -1} {hf_config.rupv or -1}", stoch_ffp, velocity_model, From bd4a563963ff8f7bb7feb53518097882b05408f5 Mon Sep 17 00:00:00 2001 From: Jake Faulkner Date: Tue, 6 Jan 2026 15:04:07 +1300 Subject: [PATCH 09/17] test: add unit test for _build_genslip_command static arguments --- tests/test_realisation_to_srf.py | 97 ++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 tests/test_realisation_to_srf.py diff --git a/tests/test_realisation_to_srf.py b/tests/test_realisation_to_srf.py new file mode 100644 index 00000000..c5632cd6 --- /dev/null +++ b/tests/test_realisation_to_srf.py @@ -0,0 +1,97 @@ +from pathlib import Path + +from workflow import schemas +from workflow.realisations import RuptureVelocity, SRFConfig +from workflow.scripts import realisation_to_srf + + +def test_build_genslip_command_static_args() -> None: + srf_config = SRFConfig( + resolution=0.1, + point_source_params=schemas.PointSourceParams( + stype=schemas.Stype.cos, + risetime=0.5, + risetimefac=1.0, + risetimedep=0.0, + inittime=0.0, + ), + side_taper=0.02, + bot_taper=0.02, + top_taper=0.0, + alpha_rough=0.0, + gwid=[], + rvfrac_seg=[], + seg_delay=False, + slip_sigma=1.0, + risetime_coef=1.6, + ymag_exp=None, + xmag_exp=1.0, + kx_corner=None, + ky_corner=None, + ) + genslip_path = Path("genslip_v5.6.2") + gsf_path = Path("/tmp/fault.gsf") + vel_path = Path("/tmp/velocity.vm") + rupture_velocity = RuptureVelocity( + rvfrac=1.0, + rvfrac_shal=0.6, + rvfrac_deep=0.7, + shallow_depth=15.0, + shallow_transition_range=5.0, + deep_depth=20.0, + deep_transition_range=2.5, + ) + cmd = realisation_to_srf._build_genslip_command( + genslip_path=genslip_path, + gsf_file_path=gsf_path, + nx=50, + ny=25, + seed=999, + velocity_model_path=vel_path, + shypo=10.5, + dhypo=20.5, + magnitude=7.8, + dt=0.01, + srf_config=srf_config, + rupture_velocity=rupture_velocity, + ) + + assert cmd[0] == str(genslip_path) + + args = set(cmd[1:]) + + assert args == { + f"infile={gsf_path}", + f"velfile={vel_path}", + "ns=1", + "write_srf=1", + "write_gsf=0", + "resolution=0.1", + "nh=1", + "read_erf=0", + "plane_header=1", + "srf_version=1.0", + "read_gsf=1", + "nstk=50", + "ndip=25", + "seed=999", + "shypo=10.5", + "dhypo=20.5", + "mag=7.8", + "dt=0.01", + "side_taper=0.02", + "bot_taper=0.02", + "top_taper=0.0", + "alpha_rough=0.0", + "seg_delay=0", + "slip_sigma=1.0", + "risetime_coef=1.6", + "xmag_exp=1.0", + "rvfrac=1.0", + "shal_vrup=0.6", + "shal_vrup_dep=15.0", + "shal_vrup_deprange=5.0", + "deep_vrup=0.7", + "deep_vrup_dep=20.0", + "deep_vrup_deprange=2.5", + } From 235876a90c3ec61d8dd30b1a0548962d04d5aa00 Mon Sep 17 00:00:00 2001 From: Jake Faulkner Date: Tue, 6 Jan 2026 16:42:27 +1300 Subject: [PATCH 10/17] ci: update lock file with hypothesis --- uv.lock | 2 ++ 1 file changed, 2 insertions(+) diff --git a/uv.lock b/uv.lock index 3bdac097..7ae8984d 100644 --- a/uv.lock +++ b/uv.lock @@ -2599,6 +2599,7 @@ dev = [ { name = "ty" }, ] test = [ + { name = "hypothesis" }, { name = "pytest" }, ] types = [ @@ -2612,6 +2613,7 @@ types = [ requires-dist = [ { name = "deptry", marker = "extra == 'dev'" }, { name = "geopandas" }, + { name = "hypothesis", marker = "extra == 'test'", specifier = ">=6.148.3" }, { name = "im-calculation" }, { name = "nshmdb", specifier = ">=2025.12.1" }, { name = "numexpr" }, From 7107db8d7177c3550a8719e824c823ebadd4d5df Mon Sep 17 00:00:00 2001 From: Jake Faulkner Date: Wed, 7 Jan 2026 09:05:54 +1300 Subject: [PATCH 11/17] fix: PR comments Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- workflow/defaults.py | 9 +++++---- workflow/realisations.py | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/workflow/defaults.py b/workflow/defaults.py index cdf247d3..c651372e 100644 --- a/workflow/defaults.py +++ b/workflow/defaults.py @@ -20,15 +20,16 @@ class DefaultsVersion(StrEnum): def _merge_defaults(defaults_a: dict[str, Any], defaults_b: dict[str, Any]) -> None: - """Deep merge python dictionaries preferring the values of the second argument. + """Deep-merge dictionaries in place, updating the first with values from the second. Parameters ---------- defaults_a : dict[str, Any] - The first dictionary to merge from. + Base dictionary to be updated. This dictionary is modified in place with + merged values. defaults_b : dict[str, Any] - The second dictionary to merge from. Keys in this dictionary - are preferred. + Dictionary providing overriding values. Keys in this dictionary are + preferred when keys conflict. This dictionary is not modified. """ for key, value in defaults_b.items(): diff --git a/workflow/realisations.py b/workflow/realisations.py index d1279ab8..a97c4aa3 100644 --- a/workflow/realisations.py +++ b/workflow/realisations.py @@ -741,7 +741,7 @@ class RuptureVelocity(RealisationConfiguration): shallow_transition_range: float """Shallow depth transition range (km).""" deep_depth: float - """Shallow depth (km). Marks transition to rvfrac_deep from rvfrac.""" + """Deep depth (km). Marks transition to rvfrac_deep from rvfrac.""" deep_transition_range: float """Deep depth transition range (km).""" From 7a2acff13bce979b41f1236be3cf33978290c278 Mon Sep 17 00:00:00 2001 From: Jake Faulkner Date: Thu, 8 Jan 2026 09:19:01 +1300 Subject: [PATCH 12/17] fix(defaults): re-add high-frequency fix --- workflow/default_parameters/root/defaults.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/workflow/default_parameters/root/defaults.yaml b/workflow/default_parameters/root/defaults.yaml index 6d55c3bd..23d72ae2 100644 --- a/workflow/default_parameters/root/defaults.yaml +++ b/workflow/default_parameters/root/defaults.yaml @@ -686,3 +686,11 @@ hf_velocity_model_1d: rho: 3.33 Qp: 394.80 Qs: 197.40 + # This layer is duplicated to prevent a crash in the HF fortran code + # when raycasting travels through the last layer. + - thickness: 999.999 + Vp: 8.10 + Vs: 4.60 + rho: 3.33 + Qp: 394.80 + Qs: 197.40 From deb496222b32df74023dd150c52ac3445b199c5b Mon Sep 17 00:00:00 2001 From: Jake Faulkner Date: Wed, 14 Jan 2026 10:14:50 +1300 Subject: [PATCH 13/17] fix(rvfrac): consistent rvfrac parameters - In genslip, the defaults from the source code are 6.5km +/- 1.5km for shallow transition and are 17.5 +/- 2.5km for deep transition. - The defaults and bounds calculation has been updated for consistency --- tests/test_hf.py | 2 +- workflow/default_parameters/root/defaults.yaml | 8 ++++---- workflow/scripts/hf_sim.py | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/test_hf.py b/tests/test_hf.py index c7d5ed87..417a75c9 100644 --- a/tests/test_hf.py +++ b/tests/test_hf.py @@ -87,7 +87,7 @@ def test_build_hf_input_serialisation() -> None: assert lines[7] == "{seed}" # seed placeholder assert lines[9] == "100.0 0.005 20.0 0.045 0.6" # Domain and resolution parameters assert lines[10] == "0.8 0.7 0.9 2.5 0.0" # rupture velocity + czero,alpha - assert lines[11] == "0.5 1.5 1.5 2.5" # shallow depth, deep depth + assert lines[11] == "0.0 2.0 1.0 3.0" # shallow depth, deep depth assert lines[12] == "-1 1.2" # mom (None -> -1) and rupv assert lines[13] == str(stoch_ffp) # Stoch file path assert lines[16] == "0 0.1 0.1 0.1 0.1 1" # Sigs and ic_flag (True -> 1) diff --git a/workflow/default_parameters/root/defaults.yaml b/workflow/default_parameters/root/defaults.yaml index 23d72ae2..292abe49 100644 --- a/workflow/default_parameters/root/defaults.yaml +++ b/workflow/default_parameters/root/defaults.yaml @@ -99,10 +99,10 @@ rupture_velocity: rvfrac: 0.8 rvfrac_shal: 0.7 rvfrac_deep: 0.7 - shallow_depth: 5.0 - deep_depth: 20.0 - shallow_transition_range: 5.0 - deep_transition_range: 5.0 + shallow_depth: 6.5 + deep_depth: 17.5 + shallow_transition_range: 1.5 + deep_transition_range: 2.5 srf: side_taper: 0.02 bot_taper: 0.02 diff --git a/workflow/scripts/hf_sim.py b/workflow/scripts/hf_sim.py index 1610f5eb..9f3a28e6 100644 --- a/workflow/scripts/hf_sim.py +++ b/workflow/scripts/hf_sim.py @@ -84,10 +84,10 @@ def rupture_velocity_hf_transition_bands( deep_range = rupture_velocity.deep_transition_range shallow = rupture_velocity.shallow_depth shallow_range = rupture_velocity.shallow_transition_range - deep_min = deep - deep_range / 2 - deep_max = deep + deep_range / 2 - shallow_min = shallow - shallow_range / 2 - shallow_max = shallow + shallow_range / 2 + deep_min = deep - deep_range + deep_max = deep + deep_range + shallow_min = shallow - shallow_range + shallow_max = shallow + shallow_range return shallow_min, shallow_max, deep_min, deep_max From c1d7ade6944be5e1d6c109f1f8dc69f4712fe7b0 Mon Sep 17 00:00:00 2001 From: Jake Faulkner Date: Wed, 14 Jan 2026 10:18:17 +1300 Subject: [PATCH 14/17] fix(rvfrac): use 0.6 as the default scaling factor --- workflow/default_parameters/root/defaults.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/workflow/default_parameters/root/defaults.yaml b/workflow/default_parameters/root/defaults.yaml index 292abe49..223d049b 100644 --- a/workflow/default_parameters/root/defaults.yaml +++ b/workflow/default_parameters/root/defaults.yaml @@ -97,8 +97,8 @@ hf: stoch_dy: 2.0 rupture_velocity: rvfrac: 0.8 - rvfrac_shal: 0.7 - rvfrac_deep: 0.7 + rvfrac_shal: 0.6 + rvfrac_deep: 0.6 shallow_depth: 6.5 deep_depth: 17.5 shallow_transition_range: 1.5 From 5bd305cbec33c84f197cce1ba15dfeae35e065be Mon Sep 17 00:00:00 2001 From: Jake Faulkner Date: Mon, 16 Feb 2026 16:09:22 +1300 Subject: [PATCH 15/17] refactor(defaults): add PGD and im calc periods --- .../default_parameters/root/defaults.yaml | 84 ++++++++++++++++++- 1 file changed, 82 insertions(+), 2 deletions(-) diff --git a/workflow/default_parameters/root/defaults.yaml b/workflow/default_parameters/root/defaults.yaml index 223d049b..1dfcae6a 100644 --- a/workflow/default_parameters/root/defaults.yaml +++ b/workflow/default_parameters/root/defaults.yaml @@ -342,40 +342,120 @@ velocity_model_1d: Qp: 460.00 Qs: 230.00 im: - ims: ["PGA", "PGV", "CAV", "AI", "Ds575", "Ds595", "pSA", "FAS"] + ims: ["PGA", "PGV", "PGD", "CAV", "AI", "Ds575", "Ds595", "pSA", "FAS"] valid_periods: [ 0.01, 0.02, + 0.022, + 0.025, + 0.029, 0.03, + 0.032, + 0.035, + 0.036, 0.04, + 0.042, + 0.044, + 0.045, + 0.046, + 0.048, 0.05, + 0.055, + 0.06, + 0.065, + 0.067, + 0.07, 0.075, + 0.08, + 0.085, + 0.09, + 0.095, 0.1, + 0.11, 0.12, + 0.13, + 0.133, + 0.14, 0.15, + 0.16, 0.17, + 0.18, + 0.19, 0.2, + 0.22, + 0.24, 0.25, + 0.26, + 0.28, + 0.29, 0.3, + 0.32, + 0.34, + 0.35, + 0.36, + 0.38, 0.4, + 0.42, + 0.44, + 0.45, + 0.46, + 0.48, 0.5, + 0.55, 0.6, + 0.65, + 0.667, 0.7, 0.75, 0.8, + 0.85, 0.9, + 0.95, 1.0, - 1.25, + 1.1, + 1.2, + 1.3, + 1.4, 1.5, + 1.6, + 1.7, + 1.8, + 1.9, 2.0, + 2.2, + 2.4, 2.5, + 2.6, + 2.8, 3.0, + 3.2, + 3.4, + 3.5, + 3.6, + 3.8, 4.0, + 4.2, + 4.4, + 4.6, + 4.8, 5.0, + 5.5, 6.0, + 6.5, + 7.0, 7.5, + 8.0, + 8.5, + 9.0, + 9.5, 10.0, + 11.0, + 12.0, + 13.0, + 14.0, + 15.0, + 20.0, ] fas_frequencies: [ From d356145fcee9fdb9616dbba1664d38724f11a8dd Mon Sep 17 00:00:00 2001 From: Jake Faulkner Date: Tue, 17 Feb 2026 10:45:42 +1300 Subject: [PATCH 16/17] fix(defaults): fix default velocity model parameters --- .../default_parameters/root/defaults.yaml | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/workflow/default_parameters/root/defaults.yaml b/workflow/default_parameters/root/defaults.yaml index 223d049b..0d75a5ea 100644 --- a/workflow/default_parameters/root/defaults.yaml +++ b/workflow/default_parameters/root/defaults.yaml @@ -134,7 +134,73 @@ velocity_model: topo_type: "SQUASHED_TAPERED" vs30: 500.0 s_wave_velocity: 3500.0 + fault_buffer: 2.0 pgv_interpolants: [[3.5, 1.0], [8., 1.0]] + rrup_interpolants: + [ + [ + 3.5, + 3.6, + 3.7, + 3.8, + 3.9, + 4., + 4.1, + 4.2, + 4.3, + 4.4, + 4.5, + 4.6, + 4.7, + 4.8, + 4.9, + 5., + 5.1, + 5.2, + 5.3, + 5.4, + 5.5, + 5.6, + 5.7, + 5.8, + 6., + 6.5, + 7., + 7.5, + 8., + ], + [ + 96.001584, + 95.96318337, + 98., + 102., + 108.02690269, + 114.86856676, + 123.44523863, + 128.68959965, + 134.58683383, + 145.68111725, + 157.68992642, + 170.68864766, + 188.45405921, + 192.22314039, + 203.98873437, + 216.47447683, + 233.19667576, + 248.66112894, + 258.19003824, + 268.72840715, + 280.03281854, + 297.1730673, + 300., + 300., + 300., + 300., + 300., + 300., + 300., + ], + ] velocity_model_1d: model: - thickness: 0.0500 From b0d2b9002df97b656bdf50d98a9781a0ef705c36 Mon Sep 17 00:00:00 2001 From: Jake Faulkner Date: Tue, 17 Feb 2026 10:47:43 +1300 Subject: [PATCH 17/17] fix(defaults): remove pgv interpolants from root defaults --- workflow/default_parameters/root/defaults.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/workflow/default_parameters/root/defaults.yaml b/workflow/default_parameters/root/defaults.yaml index 0d75a5ea..b5015d07 100644 --- a/workflow/default_parameters/root/defaults.yaml +++ b/workflow/default_parameters/root/defaults.yaml @@ -135,7 +135,6 @@ velocity_model: vs30: 500.0 s_wave_velocity: 3500.0 fault_buffer: 2.0 - pgv_interpolants: [[3.5, 1.0], [8., 1.0]] rrup_interpolants: [ [