-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathLecture4.html
More file actions
851 lines (682 loc) · 36.4 KB
/
Copy pathLecture4.html
File metadata and controls
851 lines (682 loc) · 36.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" href="favicon.png" type="image/x-icon">
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+JP&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/styles/default.min.css">
<link rel="stylesheet" href="style.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/highlight.min.js"></script>
<script>hljs.highlightAll();</script>
<script>
MathJax = {
tex: {
inlineMath: [['$', '$'], ['\\(', '\\)']],
displayMath: [['$$', '$$'], ['\\[', '\\]']]
},
options: {
renderActions: {
addMenu: []
}
},
svg: {
fontCache: 'global',
scale: 1.0
}
};
document.addEventListener("DOMContentLoaded", () => {
const sidebar = document.querySelector('.sidebar');
const main = document.querySelector('.main-content');
const wrapper = document.createElement('div');
wrapper.className = 'layout';
sidebar.parentNode.insertBefore(wrapper, sidebar);
wrapper.appendChild(sidebar);
wrapper.appendChild(main);
});
</script>
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js" async></script>
</head>
<body>
<div class="sidebar">
<img src="Logo_NS-blackboard-Expand.png" alt="Sidebar Image">
<nav>
<ul class="nav-menu">
<li><a href="index.html">Welcome to NFYK22003U</a></li>
<ul class="sub-menu">
<li><a href="CourseInformation.html">Course Information</a></li>
</ul>
<li><a href="Welcome.html">Scope and Sequence</a></li>
<ul class="sub-menu">
<li><a href="CoursePrerequisitesExam.html">Prerequisites Exam</a></li>
<li><a href="IntroductiontoPythonProgramming.html">Introduction to Python Programming</a></li>
<li><a href="MathsSpeedrun.html">Maths Speedrun</a></li>
</ul>
<li>
<a href="Lecture1.html">Lecture 1 – Introduction and Transport Processes</a></li>
<ul class="sub-menu">
<li><a href="Project1.html">Project 1 – Oxygen Budget</a></li>
</ul>
<li><a href="Lecture2.html">Lecture 2 – The Dynamics of Rotating Planets</a></li>
<ul class="sub-menu">
<li><a href="Project2.html">Project 2 – The Sverdrup Relation</a></li>
</ul>
<li><a href="Lecture3.html">Lecture 3 – Origin of Carbon and Water on Earth</a></li>
<li><a href="Lecture4.html">Lecture 4 – The Gulfstream</a></li>
<ul class="sub-menu">
<li><a href="Project3.html">Project 3 – Western Boundary Currents</a></li>
</ul>
<li><a href="Lecture5.html">Lecture 5 – Carbon and Plankton</a></li>
<li><a href="Lecture6.html">Lecture 6 – Quasi-Geostrophy</a></li>
<li><a href="Lecture7.html">Lecture 7 – Theory of the Ventilated Thermocline</a></li>
<ul class="sub-menu">
<li><a href="Project4.html">Project 4 – Shadow Zone</a></li>
</ul>
<li><a href="Lecture8.html">Lecture 8 – Waves</a></li>
<li><a href="Lecture9.html">Lecture 9 – Atmospheric Thermodynamics</a></li>
<ul class="sub-menu">
<li><a href="Project5.html">Project 5 – Hadley Cell</a></li>
</ul>
<li><a href="Lecture10.html">Lecture 10 – Surface and Abyssal Circulation</a></li>
<ul class="sub-menu">
<li><a href="Project6.html">Project 6 – Overturning</a></li>
</ul>
<li><a href="Lecture11.html">Lecture 11 – Ocean Mixing and Overturning Circulation</a></li>
<li><a href="Lecture12.html">Lecture 12 – Stability of the Atlantic Meridional Overturning Circulation</a></li>
<ul class="sub-menu">
<li><a href="Project7.html">Project 7 – Oscillations</a></li>
<li><a href="TestExam.html">Test Exam</a></li>
</ul>
<li><a href="Lecture13.html">Lecture 13 – Applications of Machine Learning in CFD and GFD</a></li>
<ul class="sub-menu">
<li><a href="SailbyNightPhysics.html">Sail by Night Physics</a></li>
</ul>
<li><a href="Appendix.html">Appendix</a></li>
<li><a href="References.html">References</a></li>
</li>
</ul>
</nav>
</div>
<div class="main-content">
<h1>Lecture 4 – The Gulfstream</h1>
<h2>Geostrophy</h2>
Large-scale flow in the ocean and the atmosphere is characterized by an approximate
balance in the vertical direction between the pressure gradient and gravity (hydrostatic balance), and in the horizontal direction between the pressure gradient and the Coriolis force
(geostrophic balance).
The Coriolis force in the
momentum equations leads to the possibility of new balances, in
particular, a balance between the Coriolis force and the pressure
gradient force (geostrophic balance).
There is an acceleration from high to low pressure, as would happen without any influence of rotation.<br>
<strong>acceleration = pressure gradient force</strong>
$$
\frac{\partial u}{\partial t} = -\frac{1}{\rho_0} \frac{\partial p}{\partial x}
$$
Over time, as the velocity $u$ increases, the Coriolis force becomes important. If the pressure gradient persists over a time longer than the inertial period, $T = \frac{2\pi}{f}$, the water parcel will be deflected (to the right in the Northern Hemisphere), until the Coriolis force exactly balances the pressure gradient force. The parcel will then experience no further accelerations (at least in our rotating reference frame). Remember that:
$$
f = 2\Omega \sin \theta \quad \text{where} \quad \Omega = \frac{2\pi}{24 \text{ hours}} = 7.292 \times 10^{-5} \, \text{s}^{-1}
$$
and $\theta$ is latitude. Then we have <i>Geostrophy</i>:
$$
\boxed{fu = -\frac{1}{\rho_0} \frac{\partial p}{\partial y}} \quad \left( F_c = -F_p \right)
$$
Geostrophy also holds for the other velocity component $v$:
$$
\boxed{fv = \frac{1}{\rho_0} \frac{\partial p}{\partial x}}
$$
The signs for the component equations $fu = -\frac{1}{\rho_0} \frac{\partial p}{\partial y}$ and $fv = \frac{1}{\rho_0} \frac{\partial p}{\partial x}$ are because of the high pressure is on the right
when looking downstream in the northern hemisphere (and on the left in the southern
hemisphere, where $f$ is negative).<br>
The horizontal movement of surface water arising from a balance between the pressure gradient force and the Coriolis force is known as <strong>geostrophic flow</strong>. Viewed from above, geostrophic flow in a subtropical gyre is clockwise in the Northern Hemisphere and counterclockwise in the Southern Hemisphere.
Geostrophic flow is the balance between Coriolis effects causing currents to form a bulge of water in the center of ocean gyres and gravity currents also affected by the Coriolis effect. The geostropic flow is shown as concentric rings around the bulge in the figure below:
<img src="Figures/Lecture4_GeostrophicFlow.png" alt="GeostrophicFlow" style="margin-top: 1.5em; border: 1px solid #3c5c78; border-radius: 6px; max-width: 100%; display: block;">
<div class="figure-caption">(Coriolis forces, the rotational velocity of Earth, and gravity are responsible for generating geostrophic flow. Credit: Bryon Inouye)</div>
<ul>
<li>Convergence of Ekman flow raises sea surface</li>
<li>Rotating “dome” results</li>
</ul>
<h2>Ocean Currents</h2>
In the process of ocean current classification, there exist various standards, including the direction, temperature, origin, and location of ocean currents.
<table style="width: 100%; border-collapse: collapse; font-family: 'Courier New', Courier, monospace; background-color: #001a33; color: #aaccee; border: 1px solid #3c5c78;">
<thead>
<tr style="border-bottom: 2px solid #3c5c78;">
<th style="text-align: left; padding: 10px; border: 1px solid #3c5c78;">Classification Factor</th>
<th style="text-align: left; padding: 10px; border: 1px solid #3c5c78;">Subcategories</th>
<th style="text-align: left; padding: 10px; border: 1px solid #3c5c78;">Detailed Classification Criteria</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding: 8px; border: 1px solid #3c5c78;"><b>Temperature</b></td>
<td style="padding: 8px; border: 1px solid #3c5c78;">Warm current, Cold current</td>
<td style="padding: 8px; border: 1px solid #3c5c78;">Classified by comparing the temperature of ocean currents with surrounding waters. Currents warmer than surroundings are warm currents; colder ones are cold currents. Currents flowing from low to high latitudes are typically warm currents, and vice versa.</td>
</tr>
<tr>
<td style="padding: 8px; border: 1px solid #3c5c78;"><b>Driving Mechanism</b></td>
<td style="padding: 8px; border: 1px solid #3c5c78;">Wind-driven current (Drift current), Density current, Compensating current</td>
<td style="padding: 8px; border: 1px solid #3c5c78;">Ocean currents are mainly driven by two forces: one is wind stress on the sea surface, and the other is density differences in seawater.</td>
</tr>
<tr>
<td style="padding: 8px; border: 1px solid #3c5c78;"><b>Vertical Transport Direction</b></td>
<td style="padding: 8px; border: 1px solid #3c5c78;">Upwelling, Downwelling</td>
<td style="padding: 8px; border: 1px solid #3c5c78;">Classified based on vertical flow: movement from deeper waters to the surface is upwelling, and the reverse is downwelling.</td>
</tr>
<tr>
<td style="padding: 8px; border: 1px solid #3c5c78;"><b>Geographic Region</b></td>
<td style="padding: 8px; border: 1px solid #3c5c78;">Equatorial current, Shelf current, Eastern/Western boundary current, Coastal current</td>
<td style="padding: 8px; border: 1px solid #3c5c78;">Different regions have different sunlight, wind, and precipitation conditions, which affect ocean properties and lead to different regional current characteristics.</td>
</tr>
<tr>
<td style="padding: 8px; border: 1px solid #3c5c78;"><b>Equilibrium State</b></td>
<td style="padding: 8px; border: 1px solid #3c5c78;">Geostrophic current, Inertial current, etc.</td>
<td style="padding: 8px; border: 1px solid #3c5c78;">Classified by the balance of forces acting on ocean currents and the number of force components.</td>
</tr>
</tbody>
</table>
The table above shows several commonly used classification standards and examples. In practical, a frequently encountered type of ocean current is the <span class="doubleUnderline">Circulation</span>.
Circulation refers to a spiral flow pattern within a curved current, where the flow forms a circular motion when projected onto a cross-section.
<h2>Boundary Layer</h2>
A boundary layer is a thin layer of viscous fluid in the immediate vicinity of a solid surface, which is also known as a frictional layer. The no-slip condition at the interface between the fluid and the solid surface creates a sharp velocity gradient normal to the wall. Therefore, viscous forces cannot be disregarded inside a boundary layer. Outside the thin boundary region, the viscous forces are usually ignored due to the small velocity gradient.
<img src="Figures/Lecture4_BoundaryLayerViscosity.png" alt="BoundaryLayerViscosity" style="margin-top: 1.5em; border: 1px solid #3c5c78; border-radius: 6px; max-width: 100%; display: block;">
<div class="figure-caption">(The flow around an airfoil and the near-wall region affected by viscosity.
Credit: Hongwei Wang)</div>
Prandtl’s breakthrough was built on the fact that, in general flows, viscosity is only significant within the very thin near-wall layer called the boundary layer, outside of which the flow (generally called <i>mainstream</i>) is essentially inviscid.
<h2>Western Boundary Currents</h2>
\(
u_t + \vec{u} \cdot \nabla u - fv = -\frac{1}{\rho_0}p_x + k \nabla^2 u + F^x
\)<br>
\(
v_t + \vec{u} \cdot \nabla v + fu = -\frac{1}{\rho_0}p_y + k \nabla^2 v + F^y
\)<br>
\(
0 = -\frac{1}{\rho}p_z + g
\)<br>
\(
u_x + v_y + w_z = 0
\)<br>
Since geostrophy is the dominant balance underneath the mixed layer, it is convenient to define:
\[
u = -\Psi_y, \quad v = \Psi_x, \quad \text{where } \Psi = \frac{p}{\rho_0 f_0}, \quad \text{the streamfunction}
\]
Form the vorticity equation by \((II)_y - (I)_x\) (as before, but now complete, with all the terms):
$$
\zeta_t + \vec{u} \cdot \nabla \zeta + \beta v = (f_0 + \beta y + \zeta) w_z + k_H \nabla^2 \zeta
$$
With $\zeta$ being the <strong>relative vorticity</strong>,
$$
\zeta = v_x - u_y = \nabla^2 \Psi
$$
Exploiting that $f_0 \ll \beta y + \zeta$ (why?) and integrating from top to bottom:
$$
\zeta_t + \vec{u} \cdot \nabla \zeta + \beta v = \frac{f_0}{D}(w_E - w_B) + k_H \nabla^2 \zeta
$$
Three Extra Terms!!
$$
\zeta_t + \vec{u} \cdot \nabla \zeta + \beta v = \frac{f_0}{D}(w_E - w_B) + k_H \nabla^2 \zeta
$$
There is now also an Ekman layer at the bottom of the ocean, but here the friction depends on the flow, i.e., it is part of the solution. At the surface, the stress caused by flow is independent of the flow, since $U_{\text{wind}} \gg U_{\text{ocean}}$.
Let's assume:
$$
\tau^x_{\text{Bottom}} = \alpha u, \quad \tau^y_{\text{Bottom}} = \alpha v
$$
Analogous to the surface Ekman pumping, we then have a bottom Ekman pumping:
$$
w_B = -\frac{\alpha}{\rho_0 f}(v_x - u_y)
$$
So we replace $\frac{f_0}{D} w_B$ with:
$$
r \nabla^2 \psi, \text{ where } r \text{ is a decay rate (think } \zeta_t = -r \nabla^2 \psi \text{)}
$$
The <strong>Kuroshio Current</strong> and the <strong>Gulf Stream</strong>
are two of the most well-known western boundary warm currents in the global ocean and play a critical role in
influencing global climate change. It is precisely due to the influence of the North Atlantic Current
— an extension of the Gulf Stream—that northwestern Europe experiences a consistently mild and humid climate.
The Gulf Stream transports approximately 113 million cubic meters of water per second, while the
Kuroshio Current can travel 25 to 75 miles per day, with a volume comparable to that of 6,000 major rivers.<br>
NASA created a video titled Perpetual Ocean, which vividly shows the movement of ocean currents in great detail, it is very stunning.
<video controls style="margin-top: 1.5em; border: 1px solid #3c5c78; border-radius: 6px; max-width: 100%; display: block;">
<source src="Figures/Lecture4_Perpetual_Ocean.mp4" type="video/mp4">
</video>
<div class="figure-caption">(Watch surface currents circulate in this high-resolution, 3D model of the Earth's oceans.
Credit: NASA Scientific Visualization Studio)</div>
<img src="Figures/Lecture4_GulfStream.png" alt="GulfStream" style="margin-top: 1.5em; border: 1px solid #3c5c78; border-radius: 6px; max-width: 100%; display: block;">
<div class="figure-caption">(The Gulf Stream carries warm water from the eastern coastline of the United States to regions of the North Atlantic Ocean.
Credit: NASA Scientific Visualization Studio)</div>
<img src="Figures/Lecture4_Kuroshio.png" alt="Kuroshio" style="margin-top: 1.5em; border: 1px solid #3c5c78; border-radius: 6px; max-width: 100%; display: block;">
<div class="figure-caption">(The Kuroshio Current flows northeast off the coast of Japan transporting warm ocean water circulating east of Taiwan.
Credit: NASA Scientific Visualization Studio)</div>
<h2>Western Intensification</h2>
The westerlies of middle latitudes and the trade winds of the tropics drive the most prominent features of ocean surface motion, large-scale roughly circular current systems elongated in the east-west direction known as <strong>gyres</strong>.
<ul>
<li>Water moving eastward (in the westerly winds band) is deflected more than water moving westward (in the trade winds zone)</li>
<li>Westerly zone → water is transported towards the gyre center over the entire ocean width</li>
<li>Trade wind zone → little deflection; flow pushes water to west side of the ocean</li>
<li>Gyre center is offset to the west</li>
<li>Pressure gradient is larger on the west side (steeper slope) → stronger geostrophic currents</li>
</ul>
<img src="Figures/Lecture4_GeostrophicCurrentsWesternIntensification.png" alt="GeostrophicCurrentsWesternIntensification" style="margin-top: 1.5em; border: 1px solid #3c5c78; border-radius: 6px; max-width: 100%; display: block;">
<div class="figure-caption">(Geostrophic
current and western intensification. (a) A crosssectional view of a subtropical
gyre showing how water literally piles up in the center,
forming a hill up to 2 meters
(6.6 feet) high. Gravity and
the Coriolis effect balance to
create an ideal geostrophic
current that flows in equilibrium around the hill.
However, friction makes the
current gradually run downslope (actual geostrophic flow).
(b) A map view of the same
subtropical gyre, showing that
the flow pattern is restricted
(lines are closer together)
on the western side of the
gyre, resulting in western
intensification. Credit: Alan P. Trujillo and Harold V. Thurman, 2020)</div>
Note that the western boundary currents of all subtropical gyres are western intensified,
<strong>even in the Southern Hemisphere</strong>.
<h2>Stream Field</h2>
Stream field in any significant small area can be considered as a set of four basic elementary stream areas: translation, rotation, divergence, and deformation <a href="References.html">[12]</a>.
<ul>
<li>Streamlines: Line represents the linear curve which is tangential with the local vector current speed.</li>
<li>Translator field: Because the speed of flow is the vector size, translator field represents movement through the displacement vector field for translation. The fluid moves around the same speed and direction and intensity. Streamlines lie in the direction of flow are the parallel lines. That stream field does not change the volume or shape of the fluid.</li>
<li>Rotation field: Streamlines are concentric circles. The fluid rotates around a common centre of stream field. The speed of flow increases linearly with increasing distance of streamlines from the centre of rotation. During the rotation, individual air particles do not change its shape or volume.</li>
<li>Divergence and convergence field: Streamlines are straight and pass through the centre of the field as a joint stream point.
When fluid flows towards the centre, flow is convergent, and the point is called convergent point. If the flow is done from the center to the field, it is called the point of divergence.
The convergence of a fluid particle does not alter its shape, while both the rate of flow and volume of particle are going to reduce the convergence point.
In the divergence, flow is from the centre towards the outer area, the flow increases its velocity and volume, but particles in this case do not change their shape.</li>
<li>Deformation field: Streamlines are concentric equilateral hyperbolas and their velocity increases linearly in any direction from the center to the field. Linear speed of the centre field linearly increases.
Movement does not change the volume of the fluid particle, but it changes its shape. When approaching the common center of the hyperbola (center of the field), the dimensions of the particles decrease in the direction of flow, and when moving away from the center, the dimensions of the particles increase in the direction of flow.</li>
</ul>
<div class="code-block">
<button class="copy-btn" onclick="copyToClipboard(this)">Copy</button>
<pre><code class="language-python">import numpy as np
import matplotlib.pyplot as plt
# Set up the common grid
x = np.linspace(-5, 5, 20)
y = np.linspace(-5, 5, 20)
X, Y = np.meshgrid(x, y)
# Define velocity fields
# (a) Translation field: constant velocity
U_a = np.ones_like(X)
V_a = np.zeros_like(Y)
# (b) Rotation field: circular streamlines
U_b = -Y
V_b = X
# (c) Divergence field: radial outward flow
U_c = X
V_c = Y
# (d) Deformation field: saddle/hyperbolic flow
U_d = X
V_d = -Y
vec_color = "#d6ebff"
vec_alpha = 0.8
bg_color = 'none' # Transparent background
# Create subplots
fig, axs = plt.subplots(2, 2, figsize=(12, 12), tight_layout=True, dpi=300, facecolor=bg_color)
titles = ["(a) Translation", "(b) Rotation", "(c) Divergence", "(d) Deformation"]
fields = [(U_a, V_a), (U_b, V_b), (U_c, V_c), (U_d, V_d)]
for ax, title, (u, v) in zip(axs.flat, titles, fields):
ax.set_facecolor(bg_color)
ax.quiver(X, Y, u, v, color=vec_color, alpha=vec_alpha)
ax.set_title(title, fontsize=16, color=vec_color)
ax.tick_params(colors=vec_color, labelsize=12)
ax.spines[:].set_color(vec_color)
ax.set_aspect('equal')
ax.grid(True, color=vec_color, alpha=0.3)
plt.show()</code></pre>
</div>
<img src="Figures/Lecture4_StreamField.png" alt="StreamField" style="margin-top: 1.5em; border: 1px solid #3c5c78; border-radius: 6px; max-width: 100%; display: block;">
<h2>Vorticity Equation</h2>
<p>Since the horizontal velocity is divergence-free (because of the flat-bottom and rigid-lid) we may represent it as a streamfunction \(\psi\). Our full vorticity equation rewritten with \(\psi\) is:
\[
\overbrace{
\underbrace{\frac{\partial}{\partial t} (\nabla^2 \psi)}_{\text{Local change of relative vorticity } \zeta = \frac{\partial v}{\partial x} - \frac{\partial u}{\partial y}} +
\underbrace{J(\psi, \nabla^2 \psi)}_{\text{Jacobian, Nonlinear advection of vorticity}}
}^{\text{Material derivative } \frac{D\zeta}{Dt}} +
\underbrace{\beta \psi_x}_{\text{Meridional advection of planetary vorticity}} =
\underbrace{\frac{f_0}{D} w_E}_{\text{Column Stretching/compression by Ekman pumping}} -
\underbrace{r \nabla^2 \psi}_{\text{Linear bottom friction}} +
\underbrace{k_H \nabla^4 \psi}_{\text{Horizontal friction}}
\]
with
\[J(A, B) = A_x B_y - A_y B_x\]
<h2>The Depth Integrated Wind-driven Circulation</h2>
We now have 3 extra physical processes to break the Sverdrup balance, and close the circulation:
<span class= "bullet"></span>bottom friction, <span class= "bullet"></span>sidewall friction, and <span class= "bullet"></span>advection.
Advection may be important locally, but obviously somewhere friction has to remove the vorticity that wind has put into the system. So let’s look for a solution with friction first:<br>
<span class= "bullet"></span>Stommel 1948:
$$
\beta \Psi_x = \frac{f_0}{D} w_E - r \nabla^2 \Psi
$$
<span class= "bullet"></span>Munk 1950:
$$
\beta \Psi_x = \frac{f_0}{D} w_E + k_H \nabla^4 \Psi
$$
<span class= "bullet"></span>Practice with Stommel:
$$
\Psi_{xx} \gg \Psi_{yy} \quad \Longrightarrow \quad \beta \Psi_x = \frac{f_0}{D} w_E - r \Psi_{xx}
$$
We still cannot solve that, but can use perturbation methods, developed in the late fourties ;-)
<h2>Stommel's Solution</h2>
$$
\Psi_{xx} \gg \Psi_{yy} \Longrightarrow \beta \Psi_x = \frac{f_0}{D} w_E - r \Psi_{xx}
$$
Let $\Psi = \Psi^S + \Psi^W$, with $\Psi^S = \frac{f_0}{\beta D} \int_x^{x_E} w_E \, dx$
and $\Psi = 0$ at $x = 0$, $\Psi = \Psi^S$ for large $x$.
$$
\Rightarrow \quad r \Psi^W_{xx} + \beta \Psi^W_x = 0
$$
$$
\Rightarrow \quad \Psi^W = -\Psi^S e^{-x/\delta_S}, \quad \text{and} \quad \Psi = \Psi^S (1 - e^{-x/\delta_S})
$$
with \(\boxed{\delta_S = \beta / r}\), the Stommel boundary layer width
$$
\Rightarrow \quad v = \Psi_x = v_s + \frac{1}{\delta_S} e^{-x/\delta_S}
$$
Stommel's assumption:
<ul>
<li>Include only linear bottom drag: keep $-r \nabla^2 \psi$</li>
<li>Ignore $\nabla^4 \psi$ and nonlinear terms</li>
</ul>
$$
\overbrace{
\cancel{
\underbrace{\frac{\partial}{\partial t} (\nabla^2 \psi)}_{\text{Local change of relative vorticity } \zeta}} +
\cancel{
\underbrace{J(\psi, \nabla^2 \psi)}_{\text{Nonlinear advection of vorticity}}}
}^{\text{Material derivative } \frac{D\zeta}{Dt}} +
\underbrace{\beta \frac{\partial \psi}{\partial x}}_{\text{Meridional advection of planetary vorticity}} =
\underbrace{\frac{f_0}{D} w_E}_{\text{Ekman pumping (stretching/compression)}} -
\underbrace{r \nabla^2 \psi}_{\text{Linear bottom friction}} +
\cancel{
\underbrace{k_H \nabla^4 \psi}_{\text{Horizontal friction}}}
$$
Resulting vorticity equation:
$$
\beta \frac{\partial \psi}{\partial x}
= \frac{f_0}{D} w_E
- r \nabla^2 \psi
$$
In the <span class="doubleUnderline">western boundary layer</span> , we assume variation in $x$ is much stronger than in $y$:
$$
\psi_{xx} \gg \psi_{yy}
\Rightarrow \beta \psi_x = \frac{f_0}{D} w_E - r \psi_{xx}
$$
Using full derivatives notation:
$$
\frac{\partial^2 \psi}{\partial x^2} \gg \frac{\partial^2 \psi}{\partial y^2}
\quad \Rightarrow \quad
\boxed{
\beta \frac{\partial \psi}{\partial x}
=
\frac{f_0}{D} w_E
-
r \frac{\partial^2 \psi}{\partial x^2}
}
$$
<div class="code-block">
<button class="copy-btn" onclick="copyToClipboard(this)">Copy</button>
<pre><code class="language-python">import numpy as np
import matplotlib.pyplot as plt
from scipy.sparse import diags, kron, identity, csr_matrix
from scipy.sparse.linalg import spsolve
def laplacian_2d(nx, ny, dx, dy):
Lx = diags([1, -2, 1], [-1, 0, 1], shape=(nx, nx)) / dx**2
Ly = diags([1, -2, 1], [-1, 0, 1], shape=(ny, ny)) / dy**2
Ix = identity(nx)
Iy = identity(ny)
return kron(Iy, Lx) + kron(Ly, Ix)
# The Stommel model is given as: \frac{R}{D}\nabla^2 \psi - \beta\frac{\partial \psi}{\partial x} = - \frac{\hat\nabla \cdot \vec\tau}{\rho_0 D}
# streamfunction ψ given wind-stress
# curl \hat\nabla \cdot \vec\tau
def solve_stommel(curl_tau, dx, dy, R, D, beta, rho0):
ny, nx = curl_tau.shape
N = nx * ny
rhs = -curl_tau.flatten() / (rho0 * D)
L = laplacian_2d(nx, ny, dx, dy)
linear_term = -(R / D) * L
rows, cols, data = [], [], []
for j in range(ny):
for i in range(1, nx - 1):
idx = j * nx + i
rows.extend([idx, idx])
cols.extend([idx - 1, idx + 1])
data.extend([beta / (2 * dx), -beta / (2 * dx)])
# Beta term: sparse matrix for -beta * dψ/dx
beta_term = csr_matrix((data, (rows, cols)), shape=(N, N))
# Final system matrix
A = linear_term + beta_term
# Solve A * psi = rhs
psi_flat = spsolve(A, rhs)
return psi_flat.reshape(ny, nx)
def compute_velocity(psi, dx, dy):
v = np.gradient(psi, dx, axis=1) # ∂ψ/∂x
u = -np.gradient(psi, dy, axis=0) # -∂ψ/∂y
return u, v
nx, ny = 64, 64
Lx, Ly = 1e6, 1e6
x = np.linspace(0, Lx, nx)
y = np.linspace(0, Ly, ny)
dx = x[1] - x[0]
dy = y[1] - y[0]
X, Y = np.meshgrid(x, y)
curl_tau = np.sin(np.pi * Y / Ly) * np.ones_like(X) # Or curl_tau = np.cos(np.pi * (Y - Ly/2) / Ly) * np.ones_like(X), need to shift the cosine so that the maximum curl is centered in the domain, and zero curl at the edges
# Physical parameters
R = 5e-5 # Rayleigh friction, linear drag?
D = 100 # ocean depth
beta = 2e-11 # Coriolis gradient
rho0 = 1027 # Seawater density
psi = solve_stommel(curl_tau, dx, dy, R, D, beta, rho0)
u, v = compute_velocity(psi, dx, dy)
custom_color = "#d6ebff"
fig, ax = plt.subplots(figsize=(6, 5), facecolor='none', dpi=300) # transparent background
# Streamlines
stream = ax.streamplot(x, y, u, v, density=1.2, color=custom_color)
ax.set_title("Stommel Gyre Streamlines", color=custom_color)
ax.set_xlabel("x (m)", color=custom_color)
ax.set_ylabel("y (m)", color=custom_color)
ax.tick_params(colors=custom_color)
for spine in ax.spines.values():
spine.set_edgecolor(custom_color)
# Set transparent figure background
fig.patch.set_alpha(0.0)
ax.set_facecolor('none') # transparent plot area
plt.savefig("Lecture4_StommelGyre.png", dpi=300, transparent=True)
plt.tight_layout()
plt.show()</code></pre>
</div>
<img src="Figures/Lecture4_StommelGyre.png" alt="StommelGyre" style="margin-top: 1.5em; border: 1px solid #3c5c78; border-radius: 6px; max-width: 100%; display: block;">
<h2>Munk's Solution</h2>
$$
\Psi_{xx} \gg \Psi_{yy} \Longrightarrow \beta \Psi_x = \frac{f_0}{D} w_E + k_H \Psi_{xxxx}
$$
Let $\Psi = \Psi^S + \Psi^W$, with
$$
\Psi^S = \frac{f_0}{\beta D} \int_x^{x_E} w_E \, dx
$$
and $\Psi = 0$ at $x = 0$, $\Psi = \Psi^S$ for large $x$.<br>
We need more boundary conditions though!<br>
<span class= "bullet"></span>No slip: $\Psi_x = v = 0$ at $x = 0$<br>
<span class= "bullet"></span>Free slip: $\Psi_{xx} = v_x = 0$ at $x = 0$<br>
The most general solution to Munk’s vorticity equation:
$$
\Psi = \Psi^S \left(1 - e^{\frac{-x}{2 \delta_M}} \cos\left(\sqrt{3}/2 \delta_M x\right)\right) + C(y) \, e^{\frac{-x}{2 \delta_M}} \sin\left(\sqrt{3}/2 \delta_M x\right)
$$
with \(\boxed{\delta_M = \left(\frac{k_H}{\beta}\right)^{1/3}}\), the Munk boundary layer width,
C(y) has to be determined as a function of the boundary conditions:
$$
\Psi = \Psi^S \left(1 - e^{\frac{-x}{2 \delta_M}} \cos\left(\sqrt{3}/2 \delta_M x\right)\right) \pm \frac{1}{\sqrt{3}} \sin\left(\sqrt{3}/2 \delta_M x\right)
$$
<img src="Figures/Lecture4_MunkSolution.png" alt="MunkSolution" style="margin-top: 1.5em; border: 1px solid #3c5c78; border-radius: 6px; max-width: 100%; display: block;">
<div class="figure-caption">(Illustration by Munk, M.M. (1950) The Reversal Theorem of Linearized Supersonic Airfoil Theory. Journal of Applied Physics, 21, 159-161.)</div>
Munk’s extension:
<ul>
<li>Adds horizontal friction using biharmonic term $+k_H \nabla^4 \psi$</li>
<li>Important for resolving realistic boundary layers</li>
</ul>
$$
\overbrace{
\cancel{
\underbrace{\frac{\partial}{\partial t} (\nabla^2 \psi)}_{\text{Local change of relative vorticity } \zeta}} +
\cancel{
\underbrace{J(\psi, \nabla^2 \psi)}_{\text{Nonlinear advection of vorticity}}}
}^{\text{Material derivative } \frac{D\zeta}{Dt}} +
\underbrace{\beta \frac{\partial \psi}{\partial x}}_{\text{Meridional advection of planetary vorticity}} =
\underbrace{\frac{f_0}{D} w_E}_{\text{Column Stretching/compression by Ekman pumping}} -
\underbrace{\cancel{r \nabla^2 \psi}}_{\text{Linear bottom friction}} +
\underbrace{k_H \nabla^4 \psi}_{\text{Horizontal friction}}
$$
Applying the western boundary layer assumption:
$$
\nabla^4 \psi \approx \frac{\partial^4 \psi}{\partial x^4}
\quad \Rightarrow \quad
\boxed{
\beta \frac{\partial \psi}{\partial x} = \frac{f_0}{D} w_E + k_H \frac{\partial^4 \psi}{\partial x^4}
}
$$
<div class="code-block">
<button class="copy-btn" onclick="copyToClipboard(this)">Copy</button>
<pre><code class="language-python">import numpy as np
import matplotlib.pyplot as plt
from scipy.sparse import diags, kron, identity, csr_matrix
from scipy.sparse.linalg import spsolve
def laplacian_2d(nx, ny, dx, dy):
Lx = diags([1, -2, 1], [-1, 0, 1], shape=(nx, nx)) / dx**2
Ly = diags([1, -2, 1], [-1, 0, 1], shape=(ny, ny)) / dy**2
Ix = identity(nx)
Iy = identity(ny)
return kron(Iy, Lx) + kron(Ly, Ix)
# The Stommel-Munk model is given as: A_4\nabla^4\psi - \frac{R}{D}\nabla^2 \psi - \beta\frac{\partial \psi}{\partial x} = - \frac{\hat\nabla \cdot \vec\tau}{\rho_0 D}
# beta: Meridional derivative of Coriolis parameter.
# R: Laplacian viscosity.
# D: Depth of the ocean or mixed layer depth.
# rho0: Density of the fluid.
# A4: Hyperviscosity.
def solve_stommel_munk(curl_tau, dx, dy, A4, R, D, beta, rho0):
ny, nx = curl_tau.shape
N = nx * ny
rhs = -curl_tau.flatten() / (rho0 * D)
L = laplacian_2d(nx, ny, dx, dy)
biharmonic = L @ L
linear_term = -(R / D) * L
# Beta term: sparse matrix for -beta * dψ/dx
rows, cols, data = [], [], []
for j in range(ny):
for i in range(1, nx - 1):
idx = j * nx + i
rows.extend([idx, idx])
cols.extend([idx - 1, idx + 1])
data.extend([beta / (2 * dx), -beta / (2 * dx)])
beta_term = csr_matrix((data, (rows, cols)), shape=(N, N))
# Final system matrix
A = A4 * biharmonic + linear_term + beta_term
# Solve A * psi = rhs
psi_flat = spsolve(A, rhs)
psi = psi_flat.reshape(ny, nx)
return psi
def compute_velocity(psi, dx, dy):
v = np.gradient(psi, dx, axis=1) # ∂ψ/∂x
u = -np.gradient(psi, dy, axis=0) # -∂ψ/∂y
return u, v
# Grid
nx, ny = 64, 64
Lx, Ly = 1e6, 1e6
x = np.linspace(0, Lx, nx)
y = np.linspace(0, Ly, ny)
dx = x[1] - x[0]
dy = y[1] - y[0]
X, Y = np.meshgrid(x, y)
# Example wind stress curl forcing
curl_tau = np.sin(np.pi * Y / Ly) * np.ones_like(X)
# Physical parameters
A4 = 1e3 # biharmonic viscosity, modify based on the condition
R = 0 # Rayleigh friction, linear drag (Stommel)?
D = 100 # depth
beta = 2e-11 # beta plane
rho0 = 1027 # density
# Solve streamfunction
psi = solve_stommel_munk(curl_tau, dx, dy, A4, R, D, beta, rho0)
u, v = compute_velocity(psi, dx, dy)
custom_color = "#d6ebff"
fig, ax = plt.subplots(figsize=(6, 5), facecolor='none', dpi=300) # transparent background
stream = ax.streamplot(x, y, u, v, density=1.2, color=custom_color)
ax.set_title("Stommel-Munk Gyre Streamlines", color=custom_color)
ax.set_xlabel("x (m)", color=custom_color)
ax.set_ylabel("y (m)", color=custom_color)
ax.tick_params(colors=custom_color)
for spine in ax.spines.values():
spine.set_edgecolor(custom_color)
# Set transparent figure background
fig.patch.set_alpha(0.0)
ax.set_facecolor('none') # transparent plot area
plt.savefig("Lecture4_StommelMunkGyre.png", dpi=300, transparent=True)
plt.tight_layout()
plt.show()</code></pre>
</div>
<img src="Figures/Lecture4_StommelMunkGyre.png" alt="StommelMunkGyre" style="margin-top: 1.5em; border: 1px solid #3c5c78; border-radius: 6px; max-width: 100%; display: block;">
<img src="Figures/Lecture4_BlackboardRecitationWindDriven.png" alt="BlackboardRecitationWindDriven" style="margin-top: 1.5em; border: 1px solid #3c5c78; border-radius: 6px; max-width: 100%; display: block;">
<h2>Eastern Boundary Currents</h2>
Wind-induced Ekman transport causes surface waters to converge and downwell in the western part of ocean basins,
creating a zonal pressure gradient that drives geostrophic currents toward the western boundary.
To return to higher latitudes, the flow must gain positive planetary vorticity.
The sidewall friction of the western boundary can provide this, whereas the eastern boundary can only provide negative vorticity. Therefore, intensified currents must occur on the western boundary.<br>
Eastern boundary currents of major ocean basins are mainly upwelling currents caused by persistent trade winds blowing along the coast.
Below are some important eastern boundary currents:
<table style="width: 100%; border-collapse: collapse; font-family: 'Courier New', Courier, monospace; background-color: #001a33; color: #aaccee; border: 1px solid #3c5c78;">
<thead>
<tr style="border-bottom: 2px solid #3c5c78;">
<th style="text-align: left; padding: 10px; border: 1px solid #3c5c78;">Name</th>
<th style="text-align: left; padding: 10px; border: 1px solid #3c5c78;">Region</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding: 8px; border: 1px solid #3c5c78;">California Current</td>
<td style="padding: 8px; border: 1px solid #3c5c78;">Pacific</td>
</tr>
<tr>
<td style="padding: 8px; border: 1px solid #3c5c78;">Peru Current</td>
<td style="padding: 8px; border: 1px solid #3c5c78;">Pacific</td>
</tr>
<tr>
<td style="padding: 8px; border: 1px solid #3c5c78;">Western Australian Current</td>
<td style="padding: 8px; border: 1px solid #3c5c78;">Indian</td>
</tr>
<tr>
<td style="padding: 8px; border: 1px solid #3c5c78;">Benguela Current</td>
<td style="padding: 8px; border: 1px solid #3c5c78;">Atlantic</td>
</tr>
<tr>
<td style="padding: 8px; border: 1px solid #3c5c78;">Canary Current</td>
<td style="padding: 8px; border: 1px solid #3c5c78;">Atlantic</td>
</tr>
</tbody>
</table>
<script>
function copyToClipboard(btn) {
const code = btn.nextElementSibling.innerText;
navigator.clipboard.writeText(code).then(() => {
btn.classList.add('copied');
setTimeout(() => btn.classList.remove('copied'), 2000);
});
}
</script>
<p><strong>Next</strong>: <a href="Project3.html">Project 3 – Western Boundary Currents</a></p>
<div class="footer">
Qi-fan based on the course material by Markus Jochum<br>
It is very much a work in progress! Have you spotted a mistake or an error on this page?
Click <a href="mailto:qifan.wu@nbi.ku.dk">here</a> to tell me!<br>
© 2025 TeamOcean | NBI/KU
</div>
</div>
<script>
function copyToClipboard(btn) {
const code = btn.nextElementSibling.innerText;
navigator.clipboard.writeText(code).then(() => {
btn.classList.add('copied');
setTimeout(() => btn.classList.remove('copied'), 2000);
});
}
</script>
</body>
</html>