From 26e11edbc9f48e6935b71872ade636dc07772af6 Mon Sep 17 00:00:00 2001 From: chrisdicaprio Date: Wed, 18 Dec 2024 09:45:25 +1300 Subject: [PATCH] remove script --- nzshm_model/scripts/upgrade_slt.py | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 nzshm_model/scripts/upgrade_slt.py diff --git a/nzshm_model/scripts/upgrade_slt.py b/nzshm_model/scripts/upgrade_slt.py deleted file mode 100644 index 2584a4b..0000000 --- a/nzshm_model/scripts/upgrade_slt.py +++ /dev/null @@ -1,22 +0,0 @@ -from pathlib import Path - -from nzshm_model import all_model_versions, get_model_version - -trts = { - '0.7': ("Subduction Interface",), - 'TL': ("Subduction Interface",), - 'geodetic': ("Active Shallow Crust",), - 'uniform': ("Subduction Intraslab",), -} - - -for model_version in all_model_versions(): - model = get_model_version(model_version) - slt = model.source_logic_tree - for branch_set in slt.branch_sets: - for branch in branch_set.branches: - branch.tectonic_region_types = trts[branch_set.branches[0].values[0].value] - for i, branch in enumerate(branch_set.branches): - branch.branch_id = str(i) - filepath = Path(__file__).parent.parent / 'resources' / 'SRM_JSON' / (model_version.lower() + '_v2.json') - slt.to_json(filepath)