From 1574ebea5a91083742fdda0aae813ba775f0fbfe Mon Sep 17 00:00:00 2001
From: Jason Altekruse <jaltekruse@usgs.gov>
Date: Thu, 26 Aug 2021 14:33:46 -0600
Subject: [PATCH] example 1: get peer set1-case1 to run, set up as
 single-branch logic tree

---
 .../{set1-case1 => features}/set1-case1.geojson    |  8 ++------
 .../active-crust/fault-sources/mfd-map.json        |  5 +++--
 .../active-crust/fault-sources/rate-tree.json      | 14 --------------
 .../fault-sources/set1-case1/rupture-set.json      |  5 +++++
 .../active-crust/fault-sources/source-tree.json    |  6 ++++++
 .../Set1-Case1/{config.json => calc-config.json}   |  0
 .../models/Set1-Case1/{Fault => ~Fault}/gmm.xml    |  0
 .../models/Set1-Case1/{Fault => ~Fault}/source.xml |  0
 etc/peer/results/Set1-Case1.csv                    |  8 ++++++++
 9 files changed, 24 insertions(+), 22 deletions(-)
 rename etc/peer/models/Set1-Case1/active-crust/fault-sources/{set1-case1 => features}/set1-case1.geojson (77%)
 delete mode 100644 etc/peer/models/Set1-Case1/active-crust/fault-sources/rate-tree.json
 create mode 100644 etc/peer/models/Set1-Case1/active-crust/fault-sources/set1-case1/rupture-set.json
 create mode 100644 etc/peer/models/Set1-Case1/active-crust/fault-sources/source-tree.json
 rename etc/peer/models/Set1-Case1/{config.json => calc-config.json} (100%)
 rename etc/peer/models/Set1-Case1/{Fault => ~Fault}/gmm.xml (100%)
 rename etc/peer/models/Set1-Case1/{Fault => ~Fault}/source.xml (100%)
 create mode 100644 etc/peer/results/Set1-Case1.csv

diff --git a/etc/peer/models/Set1-Case1/active-crust/fault-sources/set1-case1/set1-case1.geojson b/etc/peer/models/Set1-Case1/active-crust/fault-sources/features/set1-case1.geojson
similarity index 77%
rename from etc/peer/models/Set1-Case1/active-crust/fault-sources/set1-case1/set1-case1.geojson
rename to etc/peer/models/Set1-Case1/active-crust/fault-sources/features/set1-case1.geojson
index 4bcd4dcce..4a5b7edec 100644
--- a/etc/peer/models/Set1-Case1/active-crust/fault-sources/set1-case1/set1-case1.geojson
+++ b/etc/peer/models/Set1-Case1/active-crust/fault-sources/features/set1-case1.geojson
@@ -15,12 +15,8 @@
     "lower-depth": 12.0,
     "dip": 90.0,
     "rake": 0.0,
-    "rate-type": "SLIP",
+    "rate-type": "RECURRENCE",
     "length": 25.0,
-    "rate-map": {
-      "peer": {
-        "rate": 0.0028528077
-      }
-    }
+    "mfd-tree": "set1-case1"
   }
 }
diff --git a/etc/peer/models/Set1-Case1/active-crust/fault-sources/mfd-map.json b/etc/peer/models/Set1-Case1/active-crust/fault-sources/mfd-map.json
index 0c326ad30..2ed2b79ce 100644
--- a/etc/peer/models/Set1-Case1/active-crust/fault-sources/mfd-map.json
+++ b/etc/peer/models/Set1-Case1/active-crust/fault-sources/mfd-map.json
@@ -1,11 +1,12 @@
 {
-  "peer-faults": [
+  "set1-case1-mfd": [
     {
       "id": "set1-case1",
       "weight": 1.0,
       "value": {
         "type": "SINGLE",
-        "m": 6.5
+        "m": 6.5,
+        "rate": 0.0028528077
       }
     }
   ]
diff --git a/etc/peer/models/Set1-Case1/active-crust/fault-sources/rate-tree.json b/etc/peer/models/Set1-Case1/active-crust/fault-sources/rate-tree.json
deleted file mode 100644
index 1dbfc0718..000000000
--- a/etc/peer/models/Set1-Case1/active-crust/fault-sources/rate-tree.json
+++ /dev/null
@@ -1,14 +0,0 @@
-[
-  {
-    "id": "BIRD",
-    "weight": 0.1
-  },
-  {
-    "id": "GEO",
-    "weight": 0.8
-  },
-  {
-    "id": "ZENG",
-    "weight": 0.1
-  }
-]
diff --git a/etc/peer/models/Set1-Case1/active-crust/fault-sources/set1-case1/rupture-set.json b/etc/peer/models/Set1-Case1/active-crust/fault-sources/set1-case1/rupture-set.json
new file mode 100644
index 000000000..7be454dd4
--- /dev/null
+++ b/etc/peer/models/Set1-Case1/active-crust/fault-sources/set1-case1/rupture-set.json
@@ -0,0 +1,5 @@
+{
+  "name": "PEER Set1-Case1",
+  "id": 1,
+  "mfd-tree": "set1-case1-mfd"
+}
diff --git a/etc/peer/models/Set1-Case1/active-crust/fault-sources/source-tree.json b/etc/peer/models/Set1-Case1/active-crust/fault-sources/source-tree.json
new file mode 100644
index 000000000..5b8e1a3ed
--- /dev/null
+++ b/etc/peer/models/Set1-Case1/active-crust/fault-sources/source-tree.json
@@ -0,0 +1,6 @@
+[
+  {
+    "id": "set1-case1",
+    "weight": 1.0
+  }
+]
diff --git a/etc/peer/models/Set1-Case1/config.json b/etc/peer/models/Set1-Case1/calc-config.json
similarity index 100%
rename from etc/peer/models/Set1-Case1/config.json
rename to etc/peer/models/Set1-Case1/calc-config.json
diff --git a/etc/peer/models/Set1-Case1/Fault/gmm.xml b/etc/peer/models/Set1-Case1/~Fault/gmm.xml
similarity index 100%
rename from etc/peer/models/Set1-Case1/Fault/gmm.xml
rename to etc/peer/models/Set1-Case1/~Fault/gmm.xml
diff --git a/etc/peer/models/Set1-Case1/Fault/source.xml b/etc/peer/models/Set1-Case1/~Fault/source.xml
similarity index 100%
rename from etc/peer/models/Set1-Case1/Fault/source.xml
rename to etc/peer/models/Set1-Case1/~Fault/source.xml
diff --git a/etc/peer/results/Set1-Case1.csv b/etc/peer/results/Set1-Case1.csv
new file mode 100644
index 000000000..f60a849f3
--- /dev/null
+++ b/etc/peer/results/Set1-Case1.csv
@@ -0,0 +1,8 @@
+name,lon,lat,0.001,0.01,0.05,0.1,0.15,0.2,0.25,0.3,0.35,0.4,0.45,0.5,0.55,0.6,0.7,0.8,0.9,1.0
+PEER S1-Fault-Site1,-122.00000,38.11300,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,0.00000000e+00,0.00000000e+00,0.00000000e+00
+PEER S1-Fault-Site2,-122.11400,38.11300,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,0.00000000e+00,0.00000000e+00,0.00000000e+00,0.00000000e+00,0.00000000e+00,0.00000000e+00,0.00000000e+00,0.00000000e+00,0.00000000e+00,0.00000000e+00
+PEER S1-Fault-Site3,-122.57000,38.11100,2.84874231e-03,2.84874231e-03,0.00000000e+00,0.00000000e+00,0.00000000e+00,0.00000000e+00,0.00000000e+00,0.00000000e+00,0.00000000e+00,0.00000000e+00,0.00000000e+00,0.00000000e+00,0.00000000e+00,0.00000000e+00,0.00000000e+00,0.00000000e+00,0.00000000e+00,0.00000000e+00
+PEER S1-Fault-Site4,-122.00000,38.00000,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,0.00000000e+00,0.00000000e+00,0.00000000e+00
+PEER S1-Fault-Site5,-122.00000,37.91000,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,0.00000000e+00,0.00000000e+00,0.00000000e+00,0.00000000e+00,0.00000000e+00,0.00000000e+00,0.00000000e+00,0.00000000e+00,0.00000000e+00,0.00000000e+00
+PEER S1-Fault-Site6,-122.00000,38.22500,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,0.00000000e+00,0.00000000e+00,0.00000000e+00
+PEER S1-Fault-Site7,-121.88600,38.11300,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,2.84874231e-03,0.00000000e+00,0.00000000e+00,0.00000000e+00,0.00000000e+00,0.00000000e+00,0.00000000e+00,0.00000000e+00,0.00000000e+00,0.00000000e+00,0.00000000e+00
-- 
GitLab