Skip to content

Commit

Permalink
Run spellcheck over notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
mdpiper committed Aug 11, 2023
1 parent 1510a49 commit 069653e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions lessons/python/advection.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@
"source": [
"## The advection equation\n",
"\n",
"A concepturally very simple PDE is the Advection Equation: \n",
"A conceptually very simple PDE is the Advection Equation: \n",
"\n",
"$$\\frac{\\partial C}{\\partial t} = -v \\frac{\\partial C}{\\partial x}\n",
"\\label{eq:1}\\tag{1}$$\n",
"or \n",
"$$\\frac{\\partial C}{\\partial t} +v \\frac{\\partial C}{\\partial x}=0\n",
"\\label{1b}$$\n",
"\n",
"where $C$ is the aerosol concentration and $v$ is a constant windspeed at which aerosol concentrations are advected. The equation above is a prototype of an **initial value problem**: The solution is obtained by using the known initial values and marching or advancing in time. The solution of this equation can be obtained directly from the initial conditions:\n",
"where $C$ is the aerosol concentration and $v$ is a constant wind speed at which aerosol concentrations are advected. The equation above is a prototype of an **initial value problem**: The solution is obtained by using the known initial values and marching or advancing in time. The solution of this equation can be obtained directly from the initial conditions:\n",
"\n",
"$$ C(x,t) = C(x-vt,0) \\label{eq:2}\\tag{2}$$\n",
"\n",
Expand Down
8 changes: 4 additions & 4 deletions lessons/python/diffusion.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@
" - $D = 100 \\: \\mathrm{(m^{2} s^{-1})}$\n",
" - $\\Delta x = 0.1 \\: \\mathrm{m}$\n",
"\n",
"2. Assumtions regarding the boundary conditions:\n",
"2. Assumptions regarding the boundary conditions:\n",
" - $C(x=0) = 500 \\: \\mathrm{(mol \\: m^{-2})}$\n",
" - $C(x=Lx) = 0 \\: \\mathrm{(mol \\: m^{-2})}$\n",
" \n",
Expand Down Expand Up @@ -375,7 +375,7 @@
"# - make a time loop\n",
"for t in range(0, nt):\n",
" # - in this loop, first calculate the flux by discretizing equation (1),\n",
" # try to use vectorized code (using numPy diff statement)\n",
" # try to use vectorized code (using NumPy diff statement)\n",
" q = -D * np.diff(C) / dx\n",
"\n",
" # - Update the new concentration (Eq. 2, without changing the boundary values)\n",
Expand Down Expand Up @@ -487,7 +487,7 @@
"\n",
"<img src=\"./media/Eyjafjallajokull.jpg\" />\n",
"\n",
"**Figure 5:** \"On March 2010 Eyjafjallajokull volcano in Iceland exploded into life, spewing lava, magma, rock and clouds of ash into the sky above it. The disaster grounded airlines, stranding holidaymakers and business passengers across Europe and North America. While many could only watch the crisis unfolding in hotels and airports, photographer Ragnar Th. Sigurdsson chose to fly into the epicentre on a mission to record one of nature's most deadly phenomena\" The Telegraph (c); Picture: RAGNAR TH. SIGURDSSON / BARCROFT \n",
"**Figure 5:** \"On March 2010 Eyjafjallajokull volcano in Iceland exploded into life, spewing lava, magma, rock and clouds of ash into the sky above it. The disaster grounded airlines, stranding holiday-makers and business passengers across Europe and North America. While many could only watch the crisis unfolding in hotels and airports, photographer Ragnar Th. Sigurdsson chose to fly into the epicentre on a mission to record one of nature's most deadly phenomena\" The Telegraph (c); Picture: RAGNAR TH. SIGURDSSON / BARCROFT \n",
"\n",
"**Exercise: 1D diffusion.**\n",
"The Eyjafjallajökull volcano is located at the Southern Iceland coast and 2000 km from Brussels. Consider a one-dimensional case with a domain length of 5000 km. The volcano itself is situated at 2220 km from the left boundary of the simulation domain. Brussels is situated at 4220 km from the left boundary of the simulation domain. Choose a spatial resolution of 20 km. In the next couple of steps, you will calculate the time required to obtain a specific ash concentration above Brussels. \n",
Expand All @@ -501,7 +501,7 @@
"Define the model parameters: \n",
"- set the diffusivity to 25 km$^2$/h\n",
"- define the model domain: total length is 5000 km, spatial resolution is 20 km\n",
"- calcualte the location (index in the np array) of the volcano and of Brussels and call the variables respectively `ind_vol` and `ind_Bru`\n",
"- calculate the location (index in the np array) of the volcano and of Brussels and call the variables respectively `ind_vol` and `ind_Bru`\n",
"- Set the initial conditions (C): at the volcano the concentration is 100 ppm, over the rest of the domain the concentration is 0 ppm.\n",
"- The Eyjafjallajökull volcano produced ashes almost continuously during a couple of weeks. Start from the initial condition above but now add 100 ppm ashes per hour to the volcano grid cell as a source term. \n",
"- Assume Dirichlet boundary conditions (0 ppm at 0 km and 0 ppm at 3000 km)\n",
Expand Down
6 changes: 3 additions & 3 deletions lessons/python/functions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"metadata": {},
"source": [
"In the diffusion notebook,\n",
"we defined a timestep based on a stability criterion\n",
"we defined a time step based on a stability criterion\n",
"for our numerical solution to the diffusion equation.\n",
"\n",
"Let's group this code into a function."
Expand Down Expand Up @@ -328,7 +328,7 @@
"source": [
"In our new function `solve1d`,\n",
"the arguments for the grid spacing, time step, and diffusivity take default values,\n",
"but `concenctration`, the argument for the diffused quantity, does not.\n",
"but `concentration`, the argument for the diffused quantity, does not.\n",
"\n",
"**Question:** Without looking at the body of the function,\n",
"can you tell what variable type the `concentration` argument should be?\n",
Expand Down Expand Up @@ -555,7 +555,7 @@
"source": [
"## Summary\n",
"\n",
"The process of building larger programs from smaller functions is a key element of scientific programing.\n",
"The process of building larger programs from smaller functions is a key element of scientific programming.\n",
"\n",
"Information from the Python documentation, including the sections\n",
"[Defining Functions](https://docs.python.org/3/tutorial/controlflow.html#defining-functions) and\n",
Expand Down
4 changes: 2 additions & 2 deletions lessons/python/index.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@
"source": [
"## The 2010 Eyjafjallajökull volcano eruption\n",
"\n",
"> On 14 April 2010 a subglacial explosive eruption started in Eyjafjallajökull, situated on the southcentral coast of Iceland. This was a medium‐size eruption but due to the explosive nature and the prevailing winds during that first week, the ash was advected southeastward into the crowded air space of the UK and continental Europe. This caused major disruptions of air traffic. Volcanic eruptions are not uncommon in Iceland but the Eyjafjallajökull eruption has shown different characteristics than usually expected. Instead of peaking during the first few days and then gradually decreasing, the eruption had an explosive phase 14–17 April with mainly tephra and ash production, and a phase of mainly lava production 18–30 April before becoming explosive again. This meant that a continuous reevaluation of the strength of the eruption and the production of tephra and ash was necessary. Because the winds carried the ash a short distance overland, only a small part of Iceland, about 3\\% , was badly affected by ash fall. However, the rural community in the vicinity of the volcano that experienced the worst ash fall is also facing problems with drifting ash.\n",
"> On 14 April 2010 a subglacial explosive eruption started in Eyjafjallajökull, situated on the south-central coast of Iceland. This was a medium‐size eruption but due to the explosive nature and the prevailing winds during that first week, the ash was advected southeastward into the crowded air space of the UK and continental Europe. This caused major disruptions of air traffic. Volcanic eruptions are not uncommon in Iceland but the Eyjafjallajökull eruption has shown different characteristics than usually expected. Instead of peaking during the first few days and then gradually decreasing, the eruption had an explosive phase 14–17 April with mainly tephra and ash production, and a phase of mainly lava production 18–30 April before becoming explosive again. This meant that a continuous reevaluation of the strength of the eruption and the production of tephra and ash was necessary. Because the winds carried the ash a short distance overland, only a small part of Iceland, about 3\\% , was badly affected by ash fall. However, the rural community in the vicinity of the volcano that experienced the worst ash fall is also facing problems with drifting ash.\n",
">\n",
"> ---Guðrún Nína Petersen, Copyright © 2010 Royal Meteorological Society \n",
"\n",
"<figure class=\"image\">\n",
" <img src=\"./media/Eya_vol.png\">\n",
" <figcaption> On 14 April 2010, the Eyjafjallajökull volcano became one of the most famous volcanoes in the world causing major disruption to air traffic in northern Europe.</figcaption>\n",
" <figcaption> On 14 April 2010, the Eyjafjallajökull volcano became one of the most famous volcanos in the world causing major disruption to air traffic in northern Europe.</figcaption>\n",
"</figure>\n",
"\n",
"If you want to learn more about this event, [this is a nice EOS article](https://eos.org/articles/eyjafjallajokul-gave-lava-and-ice-researchers-an-eyeful)."
Expand Down
2 changes: 1 addition & 1 deletion lessons/python/more_fundamentals.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@
"id": "608ad422-8a80-481e-a7d2-344a05662e76",
"metadata": {},
"source": [
"If the conditional expression evalutes to `True`, execute the `if` clause;\n",
"If the conditional expression evaluates to `True`, execute the `if` clause;\n",
"otherwise, execute the `else` clause."
]
},
Expand Down

0 comments on commit 069653e

Please sign in to comment.