# How an earthquake and a tsunami happen

> A process map exported from forks.world (https://forks.world). Author: Brian. Source: https://forks.world/p/cmv0ie2mb001djw063j61dz12
> It describes who does what, in what order, and with which technology. Read the plain-language sections first; the JSON at the end is the exact, complete data.

## Summary

- 24 steps across 3 layers
- Persona: Seismic waves, People and sensors
- Technology / systems: Tectonic plates, The fault, The ocean

## How to read this file

- A process is made of **layers**. The main layer is the top level; any step of kind `subprocess` opens a detail layer with its own lanes and steps.
- **Lanes** are either persona (people/roles) or technology (systems). Each step belongs to one lane; `using` lists tools a person uses for that step.
- Step kinds: `start`, `task`, `decision` (its arrows carry the answer as a label), `subprocess`, `end`.

## How an earthquake and a tsunami happen

Lanes:
- Tectonic plates: technology / system (id `plates`)
- The fault: technology / system (id `fault`)
- Seismic waves: person / role (id `waves`)
- The ocean: technology / system (id `ocean`)
- People and sensors: person / role (id `people`)

Steps, in the order they run:

1. **Plates creep past each other at about 5 cm a year** [start; Tectonic plates; id `e1`]
   - then Friction locks the fault and stress builds for decades
2. **Friction locks the fault and stress builds for decades** [task; The fault; id `e2`]
   - then Stress bigger than the friction holding the rock?
3. **Stress bigger than the friction holding the rock?** [decision; The fault; id `e3`]
   - if "Yes" go to The rock suddenly ruptures: the earthquake; if "No — keep building" go to Friction locks the fault and stress builds for decades
4. **The rock suddenly ruptures: the earthquake** [task; The fault; id `e4`]
   - then Seismic waves spread out
5. **Seismic waves spread out** [subprocess; Seismic waves; id `e5`], opens the detail layer "The three kinds of waves"
   - then Sensors detect the fast P waves first
6. **Sensors detect the fast P waves first** [task; People and sensors; id `e6`]
   - then Early warning goes out seconds before the shaking
7. **Early warning goes out seconds before the shaking** [task; People and sensors; id `e7`]
   - then Was it under the sea with vertical motion?
8. **Was it under the sea with vertical motion?** [decision; The fault; id `e8`]
   - if "Yes" go to The seafloor jerks up, lifting the whole column of water; if "No" go to Shaking damages buildings: inspect structures
9. **The seafloor jerks up, lifting the whole column of water** [task; The ocean; id `e9`]
   - then A tsunami races across the ocean at jet speed
10. **A tsunami races across the ocean at jet speed** [subprocess; The ocean; id `e10`], opens the detail layer "A tsunami reaches the coast"
   - then Warnings go out and people move uphill
11. **Warnings go out and people move uphill** [task; People and sensors; id `e11`]
   - then Aftershocks as the crust readjusts
12. **Aftershocks as the crust readjusts** [end; Tectonic plates; id `e13`]
13. **Shaking damages buildings: inspect structures** [task; People and sensors; id `e12`]
   - then Aftershocks as the crust readjusts

```mermaid
flowchart LR
  subgraph l_plates["Tectonic plates"]
    n_e1(["Plates creep past each other at about 5 cm a year"])
    n_e13(["Aftershocks as the crust readjusts"])
  end
  subgraph l_fault["The fault"]
    n_e2["Friction locks the fault and stress builds for decades"]
    n_e3{"Stress bigger than the friction holding the rock?"}
    n_e4["The rock suddenly ruptures: the earthquake"]
    n_e8{"Was it under the sea with vertical motion?"}
  end
  subgraph l_waves["Seismic waves"]
    n_e5[["Seismic waves spread out"]]
  end
  subgraph l_ocean["The ocean"]
    n_e9["The seafloor jerks up, lifting the whole column of water"]
    n_e10[["A tsunami races across the ocean at jet speed"]]
  end
  subgraph l_people["People and sensors"]
    n_e6["Sensors detect the fast P waves first"]
    n_e7["Early warning goes out seconds before the shaking"]
    n_e11["Warnings go out and people move uphill"]
    n_e12["Shaking damages buildings: inspect structures"]
  end
  n_e1 --> n_e2
  n_e2 --> n_e3
  n_e3 -->|"Yes"| n_e4
  n_e3 -->|"No — keep building"| n_e2
  n_e4 --> n_e5
  n_e5 --> n_e6
  n_e6 --> n_e7
  n_e7 --> n_e8
  n_e8 -->|"Yes"| n_e9
  n_e8 -->|"No"| n_e12
  n_e9 --> n_e10
  n_e10 --> n_e11
  n_e11 --> n_e13
  n_e12 --> n_e13
```

### A tsunami reaches the coast (detail of step "A tsunami races across the ocean at jet speed")

Lanes:
- The ocean: technology / system (id `ocean`)
- People and sensors: person / role (id `people`)

Steps, in the order they run:

1. **In deep water: 800 km/h but barely a ripple** [start; The ocean; id `t1`]
   - then Nears the coast where the seabed rises
2. **Nears the coast where the seabed rises** [task; The ocean; id `t2`]
   - then The wave slows and squeezes up into a wall
3. **The wave slows and squeezes up into a wall** [task; The ocean; id `t3`]
   - then Does the sea pull back from shore first?
4. **Does the sea pull back from shore first?** [decision; The ocean; id `t4`]
   - if "Yes — run" go to The drained shoreline is a final warning; if "Not always — still run" go to Don't wait to see it: move to high ground
5. **The drained shoreline is a final warning** [task; People and sensors; id `t5`]
   - then Surges inland for minutes, then comes again
6. **Surges inland for minutes, then comes again** [end; The ocean; id `t7`]
7. **Don't wait to see it: move to high ground** [task; People and sensors; id `t6`]
   - then Surges inland for minutes, then comes again

```mermaid
flowchart LR
  subgraph l_ocean["The ocean"]
    n_t1(["In deep water: 800 km/h but barely a ripple"])
    n_t2["Nears the coast where the seabed rises"]
    n_t3["The wave slows and squeezes up into a wall"]
    n_t4{"Does the sea pull back from shore first?"}
    n_t7(["Surges inland for minutes, then comes again"])
  end
  subgraph l_people["People and sensors"]
    n_t5["The drained shoreline is a final warning"]
    n_t6["Don't wait to see it: move to high ground"]
  end
  n_t1 --> n_t2
  n_t2 --> n_t3
  n_t3 --> n_t4
  n_t4 -->|"Yes — run"| n_t5
  n_t4 -->|"Not always — still run"| n_t6
  n_t5 --> n_t7
  n_t6 --> n_t7
```

### The three kinds of waves (detail of step "Seismic waves spread out")

Lanes:
- Seismic waves: person / role (id `waves`)
- People and sensors: person / role (id `people`)

Steps, in the order they run:

1. **P waves arrive first (push-pull)** [start; Seismic waves; id `w1`]
   - then S waves arrive next (side to side)
2. **S waves arrive next (side to side)** [task; Seismic waves; id `w2`]
   - then Surface waves arrive last and shake the hardest
3. **Surface waves arrive last and shake the hardest** [task; Seismic waves; id `w3`]
   - then The gap between P and S tells you how far away it was
4. **The gap between P and S tells you how far away it was** [end; People and sensors; id `w4`]

```mermaid
flowchart LR
  subgraph l_waves["Seismic waves"]
    n_w1(["P waves arrive first (push-pull)"])
    n_w2["S waves arrive next (side to side)"]
    n_w3["Surface waves arrive last and shake the hardest"]
  end
  subgraph l_people["People and sensors"]
    n_w4(["The gap between P and S tells you how far away it was"])
  end
  n_w1 --> n_w2
  n_w2 --> n_w3
  n_w3 --> n_w4
```

## Full data (JSON)

```json
{
  "title": "How an earthquake and a tsunami happen",
  "maps": {
    "m_tsu": {
      "id": "m_tsu",
      "lanes": [
        {
          "id": "ocean",
          "name": "The ocean",
          "type": "system"
        },
        {
          "id": "people",
          "name": "People and sensors",
          "type": "person"
        }
      ],
      "steps": [
        {
          "id": "t1",
          "kind": "start",
          "lane": "ocean",
          "next": [
            {
              "to": "t2"
            }
          ],
          "uses": [],
          "label": "In deep water: 800 km/h but barely a ripple"
        },
        {
          "id": "t2",
          "kind": "task",
          "lane": "ocean",
          "next": [
            {
              "to": "t3"
            }
          ],
          "uses": [],
          "label": "Nears the coast where the seabed rises"
        },
        {
          "id": "t3",
          "kind": "task",
          "lane": "ocean",
          "next": [
            {
              "to": "t4"
            }
          ],
          "uses": [],
          "label": "The wave slows and squeezes up into a wall"
        },
        {
          "id": "t4",
          "kind": "decision",
          "lane": "ocean",
          "next": [
            {
              "to": "t5",
              "label": "Yes — run"
            },
            {
              "to": "t6",
              "label": "Not always — still run"
            }
          ],
          "uses": [],
          "label": "Does the sea pull back from shore first?"
        },
        {
          "id": "t5",
          "kind": "task",
          "lane": "people",
          "next": [
            {
              "to": "t7"
            }
          ],
          "uses": [],
          "label": "The drained shoreline is a final warning"
        },
        {
          "id": "t6",
          "kind": "task",
          "lane": "people",
          "next": [
            {
              "to": "t7"
            }
          ],
          "uses": [],
          "label": "Don't wait to see it: move to high ground"
        },
        {
          "id": "t7",
          "kind": "end",
          "lane": "ocean",
          "next": [],
          "uses": [],
          "label": "Surges inland for minutes, then comes again"
        }
      ],
      "title": "A tsunami reaches the coast",
      "parent": {
        "map": "m_root",
        "step": "e10"
      }
    },
    "m_root": {
      "id": "m_root",
      "lanes": [
        {
          "id": "plates",
          "name": "Tectonic plates",
          "type": "system"
        },
        {
          "id": "fault",
          "name": "The fault",
          "type": "system"
        },
        {
          "id": "waves",
          "name": "Seismic waves",
          "type": "person"
        },
        {
          "id": "ocean",
          "name": "The ocean",
          "type": "system"
        },
        {
          "id": "people",
          "name": "People and sensors",
          "type": "person"
        }
      ],
      "steps": [
        {
          "id": "e1",
          "kind": "start",
          "lane": "plates",
          "next": [
            {
              "to": "e2"
            }
          ],
          "uses": [],
          "label": "Plates creep past each other at about 5 cm a year"
        },
        {
          "id": "e2",
          "kind": "task",
          "lane": "fault",
          "next": [
            {
              "to": "e3"
            }
          ],
          "uses": [],
          "label": "Friction locks the fault and stress builds for decades"
        },
        {
          "id": "e3",
          "kind": "decision",
          "lane": "fault",
          "next": [
            {
              "to": "e4",
              "label": "Yes"
            },
            {
              "to": "e2",
              "label": "No — keep building"
            }
          ],
          "uses": [],
          "label": "Stress bigger than the friction holding the rock?"
        },
        {
          "id": "e4",
          "kind": "task",
          "lane": "fault",
          "next": [
            {
              "to": "e5"
            }
          ],
          "uses": [],
          "label": "The rock suddenly ruptures: the earthquake"
        },
        {
          "id": "e5",
          "kind": "subprocess",
          "lane": "waves",
          "next": [
            {
              "to": "e6"
            }
          ],
          "uses": [],
          "child": "m_waves",
          "label": "Seismic waves spread out"
        },
        {
          "id": "e6",
          "kind": "task",
          "lane": "people",
          "next": [
            {
              "to": "e7"
            }
          ],
          "uses": [],
          "label": "Sensors detect the fast P waves first"
        },
        {
          "id": "e7",
          "kind": "task",
          "lane": "people",
          "next": [
            {
              "to": "e8"
            }
          ],
          "uses": [],
          "label": "Early warning goes out seconds before the shaking"
        },
        {
          "id": "e8",
          "kind": "decision",
          "lane": "fault",
          "next": [
            {
              "to": "e9",
              "label": "Yes"
            },
            {
              "to": "e12",
              "label": "No"
            }
          ],
          "uses": [],
          "label": "Was it under the sea with vertical motion?"
        },
        {
          "id": "e9",
          "kind": "task",
          "lane": "ocean",
          "next": [
            {
              "to": "e10"
            }
          ],
          "uses": [],
          "label": "The seafloor jerks up, lifting the whole column of water"
        },
        {
          "id": "e10",
          "kind": "subprocess",
          "lane": "ocean",
          "next": [
            {
              "to": "e11"
            }
          ],
          "uses": [],
          "child": "m_tsu",
          "label": "A tsunami races across the ocean at jet speed"
        },
        {
          "id": "e11",
          "kind": "task",
          "lane": "people",
          "next": [
            {
              "to": "e13"
            }
          ],
          "uses": [],
          "label": "Warnings go out and people move uphill"
        },
        {
          "id": "e12",
          "kind": "task",
          "lane": "people",
          "next": [
            {
              "to": "e13"
            }
          ],
          "uses": [],
          "label": "Shaking damages buildings: inspect structures"
        },
        {
          "id": "e13",
          "kind": "end",
          "lane": "plates",
          "next": [],
          "uses": [],
          "label": "Aftershocks as the crust readjusts"
        }
      ],
      "title": "How an earthquake and a tsunami happen",
      "parent": null
    },
    "m_waves": {
      "id": "m_waves",
      "lanes": [
        {
          "id": "waves",
          "name": "Seismic waves",
          "type": "person"
        },
        {
          "id": "people",
          "name": "People and sensors",
          "type": "person"
        }
      ],
      "steps": [
        {
          "id": "w1",
          "kind": "start",
          "lane": "waves",
          "next": [
            {
              "to": "w2"
            }
          ],
          "uses": [],
          "label": "P waves arrive first (push-pull)"
        },
        {
          "id": "w2",
          "kind": "task",
          "lane": "waves",
          "next": [
            {
              "to": "w3"
            }
          ],
          "uses": [],
          "label": "S waves arrive next (side to side)"
        },
        {
          "id": "w3",
          "kind": "task",
          "lane": "waves",
          "next": [
            {
              "to": "w4"
            }
          ],
          "uses": [],
          "label": "Surface waves arrive last and shake the hardest"
        },
        {
          "id": "w4",
          "kind": "end",
          "lane": "people",
          "next": [],
          "uses": [],
          "label": "The gap between P and S tells you how far away it was"
        }
      ],
      "title": "The three kinds of waves",
      "parent": {
        "map": "m_root",
        "step": "e5"
      }
    }
  }
}
```
