Skip to content

Commit 5b4eea2

Browse files
committed
docs: cabin/hatch/Twister README - the hatch must be maintained
1 parent 2af75b9 commit 5b4eea2

File tree

1 file changed

+163
-90
lines changed

1 file changed

+163
-90
lines changed

README.md

Lines changed: 163 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -15,142 +15,211 @@
1515
╚══════════════════════════════════════════════════════════════════════════╝
1616
```
1717

18-
> *"Numerical weather prediction is the use of mathematical models of the atmosphere to predict the weather. The first successful NWP run was performed in 1950 on the ENIAC — programmed in FORTRAN."*
19-
2018
**[→ Launch the Live Dashboard](https://bdgroves.github.io/cascadia-wx)**
2119

2220
---
2321

24-
## What It Is
22+
> *"We're going to go out there and put this machine right in the path of the storm."*
23+
> — Dr. Jo Harding, Twister (1996)
24+
25+
---
26+
27+
## The Setup
28+
29+
It's early April. The Cascades are running dry — 15% of normal snowpack. Snoqualmie Pass is bare. Stevens is bare. Stampede is bare. Someone in a cabin somewhere in the foothills can feel it. The snowpack that should be sitting up there, waiting to melt slow into August, isn't there. The reservoirs will notice in July.
2530

26-
CASCADIA-WX is a FORTRAN scientific analysis engine for Pacific Northwest mountain weather. It reads live NRCS SNOTEL snowpack data from 11 stations across three mountain massifs, combines it with NOAA surface temperatures at valley airports, and computes atmospheric science metrics every morning at 8AM Pacific.
31+
Every morning at 8AM, a terminal somewhere wakes up. A Python script reaches out to 11 weather stations buried in the mountains — sensors at Paradise on Rainier, high ridges in the Olympics, fog-soaked Cascade passes. It pulls the numbers. It writes a CSV. Then FORTRAN takes over.
2732

28-
The sister project to **[SIERRA-FLOW](https://github.com/bdgroves/sierra-flow-cobol)** — which does Sierra Nevada streamflow analysis in COBOL. Together: vintage languages, live government data, zero cloud costs.
33+
Not a wrapper. Not a library. **FORTRAN.** The language that computed the first numerical weather forecast in 1950 on a machine that filled a room. The same mathematical DNA that still runs inside the National Weather Service, NCAR, ECMWF — every serious atmospheric model on the planet. It reads the data, cranks through the physics — lapse rates, snow levels, precipitation phase, atmospheric river index, storm classification — and prints a report.
34+
35+
Then it terminates. Normally. Return code zero.
36+
37+
Nobody asked for this. It just needed to happen.
2938

3039
---
3140

32-
## What FORTRAN Computes
41+
## The Numbers
42+
43+
```
44+
4, 8, 15, 16, 23, 42
45+
```
46+
47+
Enter them every 108 minutes or the snowpack anomaly gets worse. We don't make the rules.
48+
49+
```
50+
CASCADIA-WX: LOADING SNOTEL DATA...
51+
STATION 1: Paradise
52+
STATION 2: Cayuse Pass
53+
STATION 3: Burnt Mountain
54+
...
55+
STATION 11: Corral Pass
56+
CASCADIA-WX: 11 SNOTEL STATIONS LOADED
57+
CASCADIA-WX: COMPUTING LAPSE RATES...
58+
CASCADIA-WX: COMPUTING SNOW LEVELS...
59+
CASCADIA-WX: COMPUTING DEGREE DAYS...
60+
CASCADIA-WX: COMPUTING AR INDEX...
61+
CASCADIA-WX: WRITING REPORT...
62+
CASCADIA-WX: NORMAL TERMINATION.
63+
```
64+
65+
Every day. Automated. Whether anyone's watching or not. The hatch has to be maintained.
66+
67+
---
68+
69+
## What It Computes
70+
71+
FORTRAN does the atmospheric science. Not because it's convenient — because it's what the atmosphere deserves.
3372

34-
| Computation | Description |
35-
|-------------|-------------|
36-
| **Environmental lapse rate** | Temperature gradient C/km from valley floor to mountain stations |
37-
| **Snow level** | Elevation where precipitation phase changes (rain → snow boundary) |
38-
| **Precipitation phase partitioning** | Snow % vs rain % at each station elevation |
39-
| **Degree day accumulation** | Heating/cooling/positive degree days — snowmelt energy budget |
40-
| **Atmospheric river index** | Proxy IVT score from snow level anomaly + SWE accumulation rate |
73+
| Computation | Physics |
74+
|-------------|---------|
75+
| **Environmental lapse rate** | Temperature gradient C/km, valley floor mountain stations |
76+
| **Snow level** | Elevation where T = 2°C — the rain/snow phase boundary |
77+
| **Precipitation phase** | Snow % vs rain % at each station using transition zone logic |
78+
| **Degree days** | Heating / cooling / positive — the snowmelt energy budget |
79+
| **Atmospheric river index** | Proxy IVT score from snow level anomaly + SWE rate |
4180
| **Storm classification** | Gulf of Alaska / Pineapple Express / Cutoff Low |
4281
| **SWE percent of normal** | Current snowpack vs 30-year NRCS median |
43-
| **Massif roll-up** | Average SWE and snow level by Rainier / Olympics / Cascades |
44-
| **Atmospheric stability** | Unstable / Conditionally Unstable / Neutral / Stable |
82+
| **Massif roll-up** | Rainier / Olympics / Cascades averaged and classified |
83+
| **Atmospheric stability** | Unstable / Cond. Unstable / Neutral / Stable |
84+
85+
---
86+
87+
## April 2, 2026 — What the Numbers Said
88+
89+
```
90+
SECTION III: MOUNTAIN MASSIF SNOWPACK SUMMARY
91+
92+
MASSIF STATIONS AVG SWE (IN) AVG % NORMAL STATUS
93+
------------------------------------------------------------
94+
RAINIER 4 24.65 52.5 WELL BELOW NORMAL
95+
OLYMPICS 2 13.90 33.2 WELL BELOW NORMAL
96+
CASCADES 5 4.68 15.1 WELL BELOW NORMAL
97+
98+
SECTION IV: ATMOSPHERIC ANALYSIS
99+
100+
ATMOSPHERIC RIVER INDEX: -0.71
101+
AR STATUS: NO AR CONDITIONS
102+
STORM CLASSIFICATION: GULF OF ALASKA
103+
ENVIRONMENTAL LAPSE RATE: -5.43 C/km
104+
REGIONAL SNOW LEVEL: 2972. ft
105+
REGIONAL SWE % NORMAL: 32.0%
106+
```
107+
108+
Snoqualmie Pass: 0.0 inches. Stevens Pass: 0.0 inches. Stampede Pass: 0.0 inches.
109+
Paradise, sitting at 5,150 feet on the flank of Rainier, still holding 36.7 inches — 73% of normal.
110+
The mountain remembers what the passes have forgotten.
45111

46112
---
47113

48114
## The Eleven Stations
49115

50-
| Station | Massif | Elevation |
51-
|---------|--------|-----------|
52-
| Paradise | Rainier | 5,427 ft |
53-
| Sunrise | Rainier | 6,400 ft |
54-
| Cayuse Pass | Rainier | 3,960 ft |
55-
| Hurricane Ridge | Olympics | 5,757 ft |
56-
| Waterhole | Olympics | 4,200 ft |
57-
| Snoqualmie Pass | Cascades | 3,000 ft |
58-
| Stevens Pass | Cascades | 4,061 ft |
59-
| Stampede Pass | Cascades | 3,960 ft |
60-
| White Pass | Cascades | 4,500 ft |
61-
| Crystal Mountain | Cascades | 4,400 ft |
62-
| Chinook Pass | Cascades | 5,432 ft |
116+
Three massifs. Eleven sensors. Each one a data point in a system that's been measuring snowpack since before most of the code running today was written.
117+
118+
| Station | Massif | Elevation | What It Watches |
119+
|---------|--------|-----------|-----------------|
120+
| Paradise | Rainier | 5,150 ft | Heart of the Nisqually watershed |
121+
| Cayuse Pass | Rainier | 5,260 ft | White River headwaters |
122+
| Burnt Mountain | Rainier | 4,160 ft | Wilkeson Creek drainage |
123+
| Corral Pass | Rainier | 5,810 ft | Highest station — last to lose snow |
124+
| Dungeness | Olympics | 3,990 ft | Olympic Peninsula water supply |
125+
| Buckinghorse | Olympics | 4,850 ft | Elwha River headwaters |
126+
| Snoqualmie Pass | Cascades | 3,000 ft | I-90 corridor — first to go bare |
127+
| Stevens Pass | Cascades | 4,061 ft | US-2 corridor |
128+
| Stampede Pass | Cascades | 3,960 ft | Yakima River basin |
129+
| Elbow Lake | Cascades | 3,050 ft | South Fork Nooksack |
130+
| Bumping Ridge | Cascades | 4,600 ft | Bumping River / Yakima |
63131

64132
---
65133

66134
## The Pipeline
67135

68136
```
69-
NRCS AWDB API (SNOTEL) + NOAA Observations API
70-
71-
72-
fetch_wx.py Python 3.12 · stdlib only · zero pip
73-
snotel_data.csv
74-
valley_data.csv
75-
76-
77-
CASCADIA-WX.f90 GFortran 13 · 700+ lines
78-
reads both CSVs
79-
80-
├── Lapse rate computation
81-
├── Snow level estimation
82-
├── Precipitation phase partitioning
83-
├── Degree day accumulation
84-
├── Atmospheric River index
85-
├── Storm classification
86-
└── 4-section formatted report
87-
88-
89-
cascadia-wx-report.txt committed daily
90-
analysis.csv committed daily
91-
92-
93-
index.html reads analysis.csv live · no rebuild
137+
┌─────────────────────────────────────────┐
138+
│ 8:00 AM PACIFIC │
139+
│ GitHub Actions wakes up │
140+
└───────────────────┬─────────────────────┘
141+
142+
143+
NRCS SNOTEL API + NOAA Observations
144+
(free · public · no key · been running
145+
since before the internet existed)
146+
147+
148+
fetch_wx.py
149+
Python · zero dependencies
150+
stdlib only · no pip
151+
152+
snotel_data.csv ←─── 11 stations
153+
valley_data.csv ←─── 4 airports
154+
155+
156+
CASCADIA-WX.f90
157+
┌──────────────────────────────┐
158+
│ FORTRAN · GFortran 13 │
159+
│ Lapse rate computation │
160+
│ Snow level estimation │
161+
│ Phase partitioning │
162+
│ Degree day accumulation │
163+
│ Atmospheric river index │
164+
│ Storm classification │
165+
│ Massif roll-up │
166+
│ 4-section formatted report │
167+
└──────────────────────────────┘
168+
169+
cascadia-wx-report.txt (the printout)
170+
analysis.csv (the machine read)
171+
172+
173+
git commit + push
174+
175+
176+
bdgroves.github.io/cascadia-wx
177+
reads analysis.csv live · no rebuild
178+
amber phosphor · updates on page load
94179
```
95180

96181
---
97182

98-
## Why FORTRAN
183+
## Why FORTRAN. Why Now. Why Anyone.
99184

100-
FORTRAN (Formula Translation) was designed in 1957 by John Backus at IBM. The first successful numerical weather prediction run was performed in 1950 on ENIAC — and when NWP code was ported to faster machines, it was written in FORTRAN.
185+
FORTRAN was designed in 1957 by John Backus at IBM. The first successful numerical weather prediction run was performed in 1950 on ENIAC — and when that code was ported to faster machines, it was rewritten in FORTRAN. Today the National Weather Service runs FORTRAN. NCAR runs FORTRAN. ECMWF runs FORTRAN. The WRF model — the backbone of regional weather forecasting — is FORTRAN. The atmosphere has been computed in FORTRAN for 75 years.
101186

102-
Today the National Weather Service runs FORTRAN. NCAR runs FORTRAN. ECMWF runs FORTRAN. The WRF (Weather Research & Forecasting) model — the backbone of modern regional weather forecasting — is FORTRAN. The atmosphere has been computed in FORTRAN for 75 years and will continue to be for decades more.
187+
How many people are writing new FORTRAN in 2026? Compiling it fresh on WSL, feeding it live government sensor data, running it through GitHub Actions every morning, and serving the output as a web dashboard? Not many. Maybe a handful of grad students who had no choice. Maybe some legacy system maintainers who know too much. And now, apparently, a developer in Lakewood, Washington, who thought it would be fun.
103188

104-
Running FORTRAN in a GitHub Actions pipeline in 2026 isn't ironic. It's appropriate.
189+
It was fun. It still is. The numbers come in every morning. The atmosphere doesn't care what language you use to understand it — but FORTRAN has been understanding it longer than anything else, and it does it without apology, without overhead, and without anyone asking for permission.
190+
191+
The hatch needs to be maintained. We maintain the hatch.
105192

106193
---
107194

108195
## Requirements
109196

110197
| Item | Details |
111198
|------|---------|
112-
| FORTRAN compiler | [GFortran](https://gcc.gnu.org/fortran/) 9+ |
113-
| Python | 3.9+ · stdlib only |
199+
| FORTRAN | [GFortran](https://gcc.gnu.org/fortran/) 9+ |
200+
| Python | 3.9+ · zero external dependencies |
114201
| OS | Linux, macOS, Windows (WSL) |
115-
| Data | NRCS AWDB + NOAA APIs — free, no key required |
202+
| Data | NRCS AWDB + NOAA APIs — free, no key, publicly funded |
116203

117204
```bash
118205
# Ubuntu / Debian / WSL
119206
sudo apt install gfortran
120207

121208
# macOS
122-
brew install gcc # includes gfortran
209+
brew install gcc
123210
```
124211

125212
---
126213

127214
## Build & Run
128215

129216
```bash
130-
# 1. Fetch live SNOTEL + valley data
131217
python3 fetch_wx.py
132-
133-
# 2. Compile
134218
gfortran -O2 -o cascadia-wx CASCADIA-WX.f90 -lm
135-
136-
# 3. Run
137219
./cascadia-wx
138-
139-
# 4. View report
140220
cat cascadia-wx-report.txt
141221

142-
# Or: make
143-
```
144-
145-
---
146-
147-
## GitHub Actions
148-
149-
Runs daily at **8:00 AM Pacific** (15:00 UTC) — after SNOTEL stations report their overnight data:
150-
151-
```yaml
152-
schedule:
153-
- cron: '0 15 * * *'
222+
# or just: make
154223
```
155224

156225
---
@@ -159,14 +228,14 @@ schedule:
159228

160229
```
161230
cascadia-wx/
162-
├── CASCADIA-WX.f90 ← Main FORTRAN source
163-
├── fetch_wx.py ← NRCS + NOAA fetcher (stdlib only)
164-
├── baselines.csv ← 30-year SNOTEL medians
165-
├── snotel_data.csv ← Live snowpack data (updated daily)
166-
├── valley_data.csv ← Surface temps for lapse rate (updated daily)
167-
├── cascadia-wx-report.txt ← Formatted analysis report (updated daily)
168-
├── analysis.csv ← Machine-readable results (updated daily)
169-
├── index.html ← Live dashboard (reads analysis.csv)
231+
├── CASCADIA-WX.f90 FORTRAN source
232+
├── fetch_wx.py ← NRCS + NOAA fetcher
233+
├── baselines.csv ← 30-year SNOTEL medians
234+
├── snotel_data.csv ← Live snowpack (updated daily)
235+
├── valley_data.csv ← Surface temps (updated daily)
236+
├── cascadia-wx-report.txt ← The printout (updated daily)
237+
├── analysis.csv ← Machine-readable (updated daily)
238+
├── index.html ← Live dashboard
170239
├── Makefile
171240
├── pixi.toml
172241
└── .github/workflows/cascadia-wx.yml
@@ -176,14 +245,18 @@ cascadia-wx/
176245

177246
## Related Projects
178247

179-
- **[SIERRA-FLOW](https://bdgroves.github.io/sierra-flow-cobol)** — COBOL sister project. Live USGS streamflow, 8 Sierra Nevada gages, daily CI/CD.
248+
- **[SIERRA-FLOW](https://bdgroves.github.io/sierra-flow-cobol)** — COBOL sister project. Live USGS streamflow, 8 Sierra Nevada gages, percent-of-normal, trend analysis, daily CI/CD. Same idea, different watershed, different decade of computing history.
180249
- **[Sierra Streamflow Monitor](https://bdgroves.github.io/sierra-streamflow)** — 20-year spaghetti charts, Leaflet map, Tuolumne/Merced/Stanislaus.
181250
- **[EDGAR](https://bdgroves.github.io/EDGAR)** — Mariners/Rainiers analytics. Nightly updates.
182-
- **[brooksgroves.com](https://brooksgroves.com)**Project hub.
251+
- **[brooksgroves.com](https://brooksgroves.com)**All of it, in one place.
183252

184253
---
185254

186255
```
256+
The hatch is maintained.
257+
The numbers have been entered.
258+
The snowpack has been measured.
259+
187260
CASCADIA-WX.f90
188261
NORMAL TERMINATION. RETURN CODE: 0.
189262
*** END OF JOB ***

0 commit comments

Comments
 (0)