Skip to content

Commit dfc0449

Browse files
committed
Refactor exercises/solutions to fit new format.
1 parent 662e4c0 commit dfc0449

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1130
-886
lines changed

pages/workshop/Bonus/Downloading GFS with Siphon.ipynb

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,7 @@
105105
{
106106
"cell_type": "code",
107107
"execution_count": null,
108-
"metadata": {
109-
"scrolled": false
110-
},
108+
"metadata": {},
111109
"outputs": [],
112110
"source": [
113111
"ncss.variables"
@@ -237,9 +235,7 @@
237235
{
238236
"cell_type": "code",
239237
"execution_count": null,
240-
"metadata": {
241-
"scrolled": false
242-
},
238+
"metadata": {},
243239
"outputs": [],
244240
"source": [
245241
"import matplotlib.pyplot as plt\n",
@@ -275,11 +271,16 @@
275271
"cell_type": "markdown",
276272
"metadata": {},
277273
"source": [
278-
"### Exercise\n",
274+
"<div class=\"alert alert-success\">\n",
275+
" <b>EXERCISE</b>:\n",
276+
" \n",
279277
"Create your own map using the same projection as above but plot different data variables such as dewpoint or relative humidity.\n",
280-
"1. Explore the variables available in the NCSS dataset by printing NCSS.variables\n",
281-
"2. Change the latitude/longitude values for the request and the map to a region of your own interest!\n",
282-
"3. If you're feeling bold, pass in a different TDSCatalog reference url (such as the GFS half degree). Take a look at the full TDS catalog [here](http://thredds.ucar.edu/thredds/catalog.html)."
278+
" <ul>\n",
279+
" <li>Explore the variables available in the NCSS dataset by printing NCSS.variables</li>\n",
280+
" <li>Change the latitude/longitude values for the request and the map to a region of your own interest!</li>\n",
281+
" <li>If you're feeling bold, pass in a different TDSCatalog reference url (such as the GFS half degree). Take a look at the full TDS catalog <a href=\"http://thredds.ucar.edu/thredds/catalog.html\">here</a>.</li>\n",
282+
" </ul>\n",
283+
"</div>"
283284
]
284285
}
285286
],
@@ -299,9 +300,9 @@
299300
"name": "python",
300301
"nbconvert_exporter": "python",
301302
"pygments_lexer": "ipython3",
302-
"version": "3.7.1"
303+
"version": "3.7.6"
303304
}
304305
},
305306
"nbformat": 4,
306-
"nbformat_minor": 2
307+
"nbformat_minor": 4
307308
}

pages/workshop/Bonus/Siphon_XARRAY_Cartopy_HRRR.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,9 @@
219219
"metadata": {
220220
"gist_id": "310b790a3a2cfdc8d06e",
221221
"kernelspec": {
222-
"display_name": "Python [conda env:unidata]",
222+
"display_name": "Python 3",
223223
"language": "python",
224-
"name": "conda-env-unidata-py"
224+
"name": "python3"
225225
},
226226
"language_info": {
227227
"codemirror_mode": {
@@ -233,9 +233,9 @@
233233
"name": "python",
234234
"nbconvert_exporter": "python",
235235
"pygments_lexer": "ipython3",
236-
"version": "3.7.3"
236+
"version": "3.7.6"
237237
}
238238
},
239239
"nbformat": 4,
240-
"nbformat_minor": 1
240+
"nbformat_minor": 4
241241
}

pages/workshop/Bonus/What to do when things go wrong.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,9 +337,9 @@
337337
"name": "python",
338338
"nbconvert_exporter": "python",
339339
"pygments_lexer": "ipython3",
340-
"version": "3.6.2"
340+
"version": "3.7.6"
341341
}
342342
},
343343
"nbformat": 4,
344-
"nbformat_minor": 1
344+
"nbformat_minor": 4
345345
}

pages/workshop/CF Conventions/NetCDF and CF - The Basics.ipynb

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -878,17 +878,23 @@
878878
"metadata": {},
879879
"source": [
880880
"<a name=\"exercises\"></a>\n",
881-
"## Exercises\n",
882-
"1. Create another 3D variable representing relative humidity\n",
883-
"2. Createa another variable for surface precipitation"
881+
"<div class=\"alert alert-success\">\n",
882+
" <b>EXERCISE</b>:\n",
883+
" <ul>\n",
884+
" <li>Create another 3D variable representing relative humidity.</li>\n",
885+
" <li>Create another variable for surface precipitation.</li>\n",
886+
" </ul>\n",
887+
"</div>"
884888
]
885889
},
886890
{
887891
"cell_type": "code",
888892
"execution_count": null,
889893
"metadata": {},
890894
"outputs": [],
891-
"source": []
895+
"source": [
896+
"# YOUR CODE GOES HERE"
897+
]
892898
},
893899
{
894900
"cell_type": "markdown",
@@ -904,13 +910,6 @@
904910
"- See CF Data Model (cfdm) python package [tutorial](https://ncas-cms.github.io/cfdm/tutorial.html)\n",
905911
"- See Tim Whiteaker's cfgeom python package (GitHub [repo](https://github.com/twhiteaker/CFGeom))([tutorial]( https://twhiteaker.github.io/CFGeom/tutorial.html))"
906912
]
907-
},
908-
{
909-
"cell_type": "code",
910-
"execution_count": null,
911-
"metadata": {},
912-
"outputs": [],
913-
"source": []
914913
}
915914
],
916915
"metadata": {
@@ -929,7 +928,7 @@
929928
"name": "python",
930929
"nbconvert_exporter": "python",
931930
"pygments_lexer": "ipython3",
932-
"version": "3.7.3"
931+
"version": "3.7.6"
933932
}
934933
},
935934
"nbformat": 4,

pages/workshop/CartoPy/CartoPy.ipynb

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@
2121
"\n",
2222
"<div style=\"float:right; width:250 px\"><img src=\"http://scitools.org.uk/images/cartopy.png\" alt=\"CartoPy\" style=\"height: 200px;\"></div>\n",
2323
"\n",
24-
"## Overview:\n",
25-
"\n",
26-
"* **Teaching:** 20 minutes\n",
27-
"* **Exercises:** 20 minutes\n",
28-
"\n",
2924
"### Questions\n",
3025
"1. How do we plot on a map in Python?\n",
3126
"1. How do I specify a map projection?\n",
@@ -94,7 +89,6 @@
9489
"cell_type": "code",
9590
"execution_count": null,
9691
"metadata": {
97-
"scrolled": false,
9892
"slideshow": {
9993
"slide_type": "subslide"
10094
}
@@ -400,10 +394,14 @@
400394
"cell_type": "markdown",
401395
"metadata": {},
402396
"source": [
403-
"### Exercise\n",
404-
"* Create a map, on a Mercator Projection, which at least has coastlines and country and state borders. Bonus points for putting on colored land and oceans, or other map features.\n",
405-
"* Plot our location correctly on the map.\n",
406-
"* Set the bounds of the map to zoom in mostly over our state/region."
397+
"<div class=\"alert alert-success\">\n",
398+
" <b>EXERCISE</b>:\n",
399+
" <ul>\n",
400+
" <li>Create a map, on a Mercator Projection, which at least has coastlines and country and state borders. Bonus points for putting on colored land and oceans, or other map features.</li>\n",
401+
" <li>Plot our location correctly on the map.</li>\n",
402+
" <li>Set the bounds of the map to zoom in mostly over our state/region.</li>\n",
403+
" </ul>\n",
404+
"</div> "
407405
]
408406
},
409407
{
@@ -412,14 +410,16 @@
412410
"metadata": {},
413411
"outputs": [],
414412
"source": [
415-
"# YOUR CODE GOES HERE\n"
413+
"# YOUR CODE GOES HERE"
416414
]
417415
},
418416
{
419417
"cell_type": "markdown",
420418
"metadata": {},
421419
"source": [
422-
"#### Solution"
420+
"<div class=\"alert alert-info\">\n",
421+
" <b>SOLUTION</b>\n",
422+
"</div>"
423423
]
424424
},
425425
{
@@ -428,7 +428,7 @@
428428
"metadata": {},
429429
"outputs": [],
430430
"source": [
431-
"# %load solutions/map.py\n"
431+
"# %load solutions/map.py"
432432
]
433433
},
434434
{
@@ -442,9 +442,9 @@
442442
],
443443
"metadata": {
444444
"kernelspec": {
445-
"display_name": "Python [conda env:devel]",
445+
"display_name": "Python 3",
446446
"language": "python",
447-
"name": "conda-env-devel-py"
447+
"name": "python3"
448448
},
449449
"language_info": {
450450
"codemirror_mode": {
@@ -456,9 +456,9 @@
456456
"name": "python",
457457
"nbconvert_exporter": "python",
458458
"pygments_lexer": "ipython3",
459-
"version": "3.7.3"
459+
"version": "3.7.6"
460460
}
461461
},
462462
"nbformat": 4,
463-
"nbformat_minor": 2
463+
"nbformat_minor": 4
464464
}

pages/workshop/CartoPy/solutions/map.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
ax.plot(-101.877, 33.583, marker='o', color='tab:green', transform=ccrs.PlateCarree())
1212

1313

14-
ax.set_extent([-108, -93, 25, 37])
14+
ax.set_extent([-108, -93, 25, 37])

pages/workshop/Command_Line_Tools/Command_Line_Primer.ipynb

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,7 @@
2222
"\n",
2323
"<hr style=\"height:2px;\">\n",
2424
"\n",
25-
"<div style=\"float:right; width:250 px\"><img src=\"http://media02.hongkiat.com/developers-command-line/command-line.jpg\" alt=\"Command Line\" style=\"height: 500px;\"></div>\n",
26-
"\n",
27-
"\n",
28-
"## Overview:\n",
29-
"\n",
30-
"* **Teaching:** 30 minutes\n",
31-
"* **Exercises:** 36 minutes"
25+
"<div style=\"float:right; width:250 px\"><img src=\"http://media02.hongkiat.com/developers-command-line/command-line.jpg\" alt=\"Command Line\" style=\"height: 500px;\"></div>"
3226
]
3327
},
3428
{
@@ -315,9 +309,9 @@
315309
"name": "python",
316310
"nbconvert_exporter": "python",
317311
"pygments_lexer": "ipython3",
318-
"version": "3.7.1"
312+
"version": "3.7.6"
319313
}
320314
},
321315
"nbformat": 4,
322-
"nbformat_minor": 2
316+
"nbformat_minor": 4
323317
}

0 commit comments

Comments
 (0)