Skip to content

Commit c0039d3

Browse files
authored
Add case studies document as notebook (#247)
* add case studies document as notebook * add more case studies * re-run CI * fix broken link
1 parent 3a53b52 commit c0039d3

File tree

3 files changed

+263
-0
lines changed

3 files changed

+263
-0
lines changed

docs/user-guide/assignments/case_studies_virtualship.ipynb

Lines changed: 211 additions & 0 deletions
Large diffs are not rendered by default.

docs/user-guide/assignments/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ Research_proposal_intro.ipynb
1010
Research_Proposal_only.ipynb
1111
sciencecommunication_assignment.ipynb
1212
Code_of_conduct.ipynb
13+
case_studies_virtualship.ipynb
1314
```
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
import cartopy.crs as ccrs
2+
import matplotlib.pyplot as plt
3+
4+
REGIONS = {
5+
"Irminger Sea": {"label": "1", "coords": (57.25, -33.0)},
6+
"California Current": {"label": "2", "coords": (35, -132)},
7+
"Gulf Stream and Deep Western Boundary Current": {
8+
"label": "3",
9+
"coords": (32.0, -72.0),
10+
},
11+
"Japan current": {"label": "4", "coords": (31.7, 141)},
12+
"Atlantic Meridional Overturning Circulation (AMOC)": {
13+
"label": "5",
14+
"coords": (26, -47),
15+
},
16+
"El Niño Southern Oscillation (ENSO)": {"label": "6", "coords": (-5.0, -91.5)},
17+
"North Brazil current": {"label": "7", "coords": (2.0, -43.0)},
18+
"Somali current": {"label": "8", "coords": (6.0, 53.0)},
19+
"East Australian Current": {"label": "9", "coords": (-28.0, 156)},
20+
"Drake passage": {"label": "10", "coords": (-58.0, -57.0)},
21+
"Agulhas Leakage": {"label": "11", "coords": (-42.0, 15.0)},
22+
"Bay of Bengal": {"label": "12", "coords": (11.0, 83.0)},
23+
"Brazil-Malvinas Confluence": {"label": "13", "coords": (-35.0, -48.0)},
24+
"Cross-shelf exchange on the European North-West Shelf Seas": {
25+
"label": "14",
26+
"coords": (48.0, -21.0),
27+
},
28+
"European North-West Shelf Seas": {"label": "15", "coords": (54.0, -3.0)},
29+
}
30+
31+
32+
def _global_plot(width=10, height=5, regions=None) -> None:
33+
fig = plt.figure(figsize=(width, height), dpi=300)
34+
ax = fig.add_subplot(1, 1, 1, projection=ccrs.Robinson())
35+
36+
ax.set_global()
37+
38+
if regions:
39+
for _, info in regions.items():
40+
ax.text(
41+
info["coords"][1],
42+
info["coords"][0],
43+
info["label"],
44+
transform=ccrs.PlateCarree(),
45+
fontsize=8,
46+
fontweight="bold",
47+
color="red",
48+
)
49+
50+
ax.stock_img()
51+
ax.coastlines(linewidth=0.5)

0 commit comments

Comments
 (0)