Skip to content

Commit 4dbf86d

Browse files
authored
Merge pull request #180 from ncasuk/isc2024
ISC 2024
2 parents dc2c58a + 1ea16cc commit 4dbf86d

File tree

267 files changed

+109506
-658
lines changed

Some content is hidden

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

267 files changed

+109506
-658
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
*.pyo
66
*__pycache__*
77
*.ipynb_checkpoints*
8+
environ
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# These should match the versions in the version of jaspy which will be used for the course.
2-
matplotlib==3.5.3
3-
pandas==2.0.3
2+
matplotlib==3.8.4
3+
pandas==2.2.2

README.md

+32-61

python-data/notebooks/ex01_numpy_arrays.ipynb old_material/data_old_materials/notebooks/ex01_numpy_arrays.ipynb

+7-7
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"source": [
5454
"### Let's create a numpy array from a list.\n",
5555
"\n",
56-
"Create a with values 1 to 10 and assign it to the variable `x`"
56+
"Create a range with values 1 to 10 and assign it to the variable `x`"
5757
]
5858
},
5959
{
@@ -179,7 +179,7 @@
179179
"Create an array from the list `[2, 3.2, 5.5, -6.4, -2.2, 2.4]` and assign it to the variable `a`\n",
180180
"\n",
181181
"- Do you know what `a[1]` will equal? Print to see.\n",
182-
"- Try print `a[1:4]` to see what that equals."
182+
"- Try printing `a[1:4]` to see what that equals."
183183
]
184184
},
185185
{
@@ -261,7 +261,7 @@
261261
"\n",
262262
"### Let's interrogate an array to find out it's characteristics\n",
263263
"\n",
264-
"Create a 2-D array of shape (2, 4) containing two lists `range(4)` and `range(10, 14)`, assign it to the vairable `arr`\n",
264+
"Create a 2-D array of shape (2, 4) containing two lists `range(4)` and `range(10, 14)`, assign it to the variable `arr`\n",
265265
"\n",
266266
"- Print the shape of the array\n",
267267
"- Print the size of the array\n",
@@ -342,7 +342,7 @@
342342
"\n",
343343
"### Let's perform some array calculations\n",
344344
"\n",
345-
"Create a 2-D array of shape (2, 4) containing two lists `range(4)` and `range(10, 14)`, assign it to the vairable `a`\n",
345+
"Create a 2-D array of shape (2, 4) containing two lists `range(4)` and `range(10, 14)`, assign it to the variable `a`\n",
346346
"\n",
347347
"Create an array from a list `[2, -1, 1, 0]` and assign it to the variable `b`\n",
348348
"\n",
@@ -385,7 +385,7 @@
385385
"\n",
386386
"Create an array of values 0 to 9 and assign it to the variable `arr`\n",
387387
"\n",
388-
"- Print two different way of expressing the condition where the array is less than 3.\n",
388+
"- Print two different ways of expressing the condition where the array is less than 3.\n",
389389
"- Create a numpy condition where `arr` is less than 3 OR greater than 8.\n",
390390
"- Use the `where` function to create a new array where the value is `arr*5` if the above condition is `True` and `arr-5` where the condition is `False`"
391391
]
@@ -418,7 +418,7 @@
418418
"source": [
419419
"### Let's implement a mathematical function that works on arrays.\n",
420420
"\n",
421-
"Write a function that takes a 2-D array of horizontal zonal (east-west) wind components (`u`, in m/s) and a 2-D array of horizontal meridional (north-south) wind componenets (`v`, in m/s)\n",
421+
"Write a function that takes a 2-D array of horizontal zonal (east-west) wind components (`u`, in m/s) and a 2-D array of horizontal meridional (north-south) wind components (`v`, in m/s)\n",
422422
"and returns an array of the magnitudes of the total wind.\n",
423423
"Include a test for the overall magnitude: if it is less than 0.1 then set it equal to 0.1 (We might presume this particular domain has no non-zero winds and that only winds above 0.1 m/s constitute \"good\" data while those below are indistinguishable from the minimum due to noise)\n",
424424
"\n",
@@ -534,7 +534,7 @@
534534
"- Print the array to view its values.\n",
535535
"- Print its missing value (i.e. `narr.fill_value`)\n",
536536
"- Print an array that converts `narr` so that the missing values are represented by the missing value (i.e. `MA.filled`). Assign it to `farr`\n",
537-
"- What is the type of the `farr`"
537+
"- What is the type of `farr`?"
538538
]
539539
},
540540
{

python-data/notebooks/ex02_matplotlib.ipynb old_material/data_old_materials/notebooks/ex02_matplotlib.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@
237237
"source": [
238238
"## 3. Plotting gridded data on a map\n",
239239
"\n",
240-
"In this section, we will use `cartopy` - a python module that supports maps and usage with `matplotlib`.\n",
240+
"In this section, we will use `cartopy` - a Python module that supports maps and usage with `matplotlib`.\n",
241241
"\n",
242242
"First, let's grab some data from a NetCDF file and quickly plot it.\n",
243243
"\n",

python-data/notebooks/ex03_netcdf.ipynb old_material/data_old_materials/notebooks/ex03_netcdf.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
"cell_type": "markdown",
7171
"metadata": {},
7272
"source": [
73-
"Loop through and print Dataset `variables` names, this is the ID that act like the key to access the Variable."
73+
"Loop through and print Dataset `variables` names, this is the ID that acts like the key to access the variable."
7474
]
7575
},
7676
{
@@ -314,7 +314,7 @@
314314
"metadata": {},
315315
"source": [
316316
"Create four new Dimensions to `myds` from your previous slices. Re-use the names from the last section.\n",
317-
"Note that the \"level\" and \"time\" Dimensions should have length, \"lat\" length 10 and \"lon\" length 5.\n",
317+
"Note that the \"level\" and \"time\" dimensions should have length 1, \"lat\" length 10 and \"lon\" length 5.\n",
318318
"To create a new Dimension use `myds.createDimension(name, size)`"
319319
]
320320
},
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)