Skip to content

Commit a70c7ad

Browse files
aneeshcsclaude
andcommitted
Add Geostrophic Adjustment shallow water notebook; rename Coriolis tab
Notebook (notebooks/shallowwater.py): - 10 sections covering beta-plane SWE, dispersion, geostrophic adjustment - Pseudo-spectral solver (FFT + RK4), variable f(y) = f0 + β·y - Interactive sliders: f0, β̂, perturbation σ/amplitude, run time - Gaussian perturbation → gravity wave radiation + westward Rossby drift - GIF animation, snapshot browser, vorticity/divergence diagnostics - Energy partition (KE/PE) time series Portal (content/gfd/_index.md): - "Coriolis Effect" tab renamed to "Geostrophic Adjustment" - 'coriolis' model wired as iframe notebook (shallowwater.html?v=1) - Added to _notebookUrls map and _notebookModels set - Cleared old canvas-based params/legend Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 1380498 commit a70c7ad

4 files changed

Lines changed: 931 additions & 16 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ jobs:
9393
uvx marimo export html-wasm --sandbox --mode edit \
9494
notebooks/rayleighbenard.py \
9595
-o static/gfd/rayleighbenard.html
96+
uvx marimo export html-wasm --sandbox --mode edit \
97+
notebooks/shallowwater.py \
98+
-o static/gfd/shallowwater.html
9699
97100
- name: Setup Pages
98101
id: pages

content/gfd/_index.md

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ sections:
240240
<h2>SELECT MODEL</h2>
241241
<div class="gfd-nav-buttons">
242242
<button class="gfd-nav-btn active" onclick="selectModel('rayleigh-benard')">Rayleigh-Bénard</button>
243-
<button class="gfd-nav-btn" onclick="selectModel('coriolis')">Coriolis Effect</button>
243+
<button class="gfd-nav-btn" onclick="selectModel('coriolis')">Geostrophic Adjustment</button>
244244
<button class="gfd-nav-btn" onclick="selectModel('geostrophic')">2D Navier-Stokes</button>
245245
<button class="gfd-nav-btn" onclick="selectModel('stratified')">Stratified Flow</button>
246246
<button class="gfd-nav-btn" onclick="selectModel('rossby')">Rossby Waves</button>
@@ -297,20 +297,11 @@ sections:
297297
legend: []
298298
},
299299
'coriolis': {
300-
name: 'Shallow Water on Rotating Sphere',
301-
description: 'Linearized shallow water equations on a rotating sphere. A Gaussian height perturbation triggers geostrophic adjustment: fast gravity waves radiate outward while slower Rossby waves propagate westward.',
302-
concept: 'Geostrophic adjustment partitions energy between fast gravity waves and a balanced geostrophic flow. The Coriolis force (f = 2\u03A9 sin\u03C6) deflects motion, creating rotational asymmetry. Rossby waves arise from the variation of f with latitude (\u03B2-effect).',
303-
params: [
304-
{ id: 'rotationRate', label: 'Rotation Rate \u03A9', min: 0, max: 2, step: 0.05, default: 1.0 },
305-
{ id: 'waveSpeed', label: 'Wave Speed (gH)', min: 0.01, max: 0.3, step: 0.01, default: 0.1 },
306-
{ id: 'perturbAmp', label: 'Perturbation Amplitude', min: 0.01, max: 0.5, step: 0.01, default: 0.15 },
307-
{ id: 'viewLat', label: 'View Latitude', min: -80, max: 80, step: 5, default: 25 }
308-
],
309-
legend: [
310-
{ color: 'rgb(220, 60, 60)', label: 'Height excess (high)' },
311-
{ color: 'rgb(255, 255, 255)', label: 'Mean height' },
312-
{ color: 'rgb(60, 60, 220)', label: 'Height deficit (low)' }
313-
]
300+
name: 'Geostrophic Adjustment & Shallow Water Waves',
301+
description: 'Pseudo-spectral simulation of the linearised shallow water equations on a rotating beta-plane. A Gaussian height perturbation triggers geostrophic adjustment: fast inertia-gravity waves radiate outward while slower Rossby waves drift westward.',
302+
concept: 'The Rossby deformation radius L_R = √(gH)/f₀ controls the adjustment: scales larger than L_R reach geostrophic balance; smaller scales radiate as gravity waves. The β-effect adds slow westward Rossby wave propagation on top of the balanced state.',
303+
params: [],
304+
legend: []
314305
},
315306
'geostrophic': {
316307
name: '2D Navier-Stokes Turbulence',
@@ -378,6 +369,7 @@ sections:
378369
const _notebookUrls = {
379370
'geostrophic': '/gfd/twodnavierstokes.html?v=5',
380371
'rayleigh-benard': '/gfd/rayleighbenard.html?v=1',
372+
'coriolis': '/gfd/shallowwater.html?v=1',
381373
};
382374
if (modelId in _notebookUrls) {
383375
_canvas.style.display = 'none';
@@ -725,7 +717,7 @@ sections:
725717
simState = { particles, time: 0, jetStreamY: height / 2 };
726718
}
727719
}
728-
const _notebookModels = new Set(['geostrophic', 'rayleigh-benard']);
720+
const _notebookModels = new Set(['geostrophic', 'rayleigh-benard', 'coriolis']);
729721
function animate() {
730722
if (!_notebookModels.has(currentModel)) {
731723
if (isPlaying) update();

0 commit comments

Comments
 (0)