Skip to content

Commit

Permalink
documentation: spell checking
Browse files Browse the repository at this point in the history
  • Loading branch information
milankl committed Sep 14, 2023
1 parent 071938b commit 31b42e4
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
5 changes: 4 additions & 1 deletion docs/src/how_to_run_speedy.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# How to run SpeedyWeather.jl

Creating a SpeedyWeather.jl simulation and running it consists conceptually of 4 steps
Creating a SpeedyWeather.jl simulation and running it consists conceptually of 4 steps.
In contrast to many other models, these steps are bottom-up rather then top-down.
There is no monolithic interface to SpeedyWeather.jl, instead all options that a
user may want to adjust are chosen and live in their respective model components.

1. Create a [SpectralGrid](@ref) which defines the grid and spectral resolution.
2. [Create model components](@ref create_model_components) and combine to a [model](@ref create_model).
Expand Down
4 changes: 2 additions & 2 deletions docs/src/shallowwater.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ In spectral space ``\nabla^2`` is a diagonal operator, meaning that there is no
harmonics and its inversion is therefore easily done on a mode-by-mode basis of the harmonics.

This can be made use of when facing time stepping constraints with explicit schemes, where
ridiculuously small time steps to resolve fast waves would otherwise result in a horribly slow simulation.
ridiculously small time steps to resolve fast waves would otherwise result in a horribly slow simulation.
In the shallow water system there are gravity waves that propagate at a wave speed of ``\sqrt{gH}``
(typically 300m/s), which, in order to not violate the
[CFL criterion](https://en.wikipedia.org/wiki/Courant%E2%80%93Friedrichs%E2%80%93Lewy_condition)
Expand Down Expand Up @@ -219,7 +219,7 @@ The idea of the semi-implicit time stepping is now as follows:
Some notes on the semi-implicit time stepping

- The inversion of the semi-implicit time stepping depends on ``\delta t``, that means every time the time step changes, the inversion has to be recalculated.
- You may choose ``\alpha = 1/2`` to dampen gravity waves but initialisation shocks still usually kick off many gravity waves that propagate around the sphere for many days.
- You may choose ``\alpha = 1/2`` to dampen gravity waves but initialization shocks still usually kick off many gravity waves that propagate around the sphere for many days.
- With increasing ``\alpha > 1/2`` these waves are also slowed down, such that for ``\alpha = 1`` they quickly disappear in several hours.
- Using the [scaled shallow water equations](@ref scaled_swm) the time step ``\delta t`` has to be the scaled time step ``\tilde{\Delta t} = \delta t/R`` which is divided by the radius ``R``. Then we use the normalized eigenvalues ``-l(l+1)`` which also omit the ``1/R^2`` scaling, see [scaled shallow water equations](@ref scaled_swm) for more details.

Expand Down
7 changes: 4 additions & 3 deletions docs/src/spectral_transform.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ number ``m`` times imaginary ``i``.
### Meridional derivative

The meridional derivative of the spherical harmonics is a derivative of the Legendre polynomials for which the following
recursion relation applies[^Randall2021],[^Durran2010],[^GFDL]
recursion relation applies[^Randall2021],[^Durran2010],[^GFDL],[^Orszag70]

```math
\cos\theta \frac{dP_{l,m}}{d\theta} = -l\epsilon_{l+1,m}P_{l+1,m} + (l+1)\epsilon_{l,m}P_{l-1,m}.
Expand Down Expand Up @@ -394,7 +394,7 @@ degree ``l``, but scalar quantities should not make use of it. Equivalently, the
set to zero before the time integration, which only advances scalar quantities.


In SpeedyWeather.jl vector quantities
In SpeedyWeather.jl, vector quantities
like ``u,v`` use therefore one more meridional mode than scalar quantities such as vorticity ``\zeta`` or stream
function ``\Psi``. The meridional derivative in SpeedyWeather.jl also omits the ``1/R``-scaling as explained for
the [Zonal derivative](@ref) and in [Radius scaling](@ref scaling).
Expand Down Expand Up @@ -443,7 +443,7 @@ The spectral Laplacian is easily applied to the coefficients ``\Psi_{lm}`` of a
as the spherical harmonics are eigenfunctions of the Laplace operator ``\nabla^2`` in spherical
coordinates with eigenvalues ``-l(l+1)`` divided by the radius squared ``R^2``, i.e.
``\nabla^2 \Psi`` becomes ``\tfrac{-l(l+1)}{R^2}\Psi_{lm}`` in spectral space. For example,
vorticity ``\zeta`` and streamfunction ``\Psi`` are related by ``\zeta = \nabla^2\Psi``
vorticity ``\zeta`` and stream function ``\Psi`` are related by ``\zeta = \nabla^2\Psi``
in the barotropic vorticity model. Hence, in spectral space this is equivalent for every
spectral mode of degree ``l`` and order ``m`` to

Expand Down Expand Up @@ -502,3 +502,4 @@ as further described in [Radius scaling](@ref scaling).
[^GFDL]: Geophysical Fluid Dynamics Laboratory, [The barotropic vorticity equation](https://www.gfdl.noaa.gov/wp-content/uploads/files/user_files/pjp/barotropic.pdf).
[^FFT]: Depending on the implementation of the Fast Fourier Transform ([Cooley-Tukey algorithm](https://en.wikipedia.org/wiki/Cooley%E2%80%93Tukey_FFT_algorithm), or or the [Bluestein algorithm](https://en.wikipedia.org/wiki/Chirp_Z-transform#Bluestein.27s_algorithm)) *easily Fourier-transformable* can mean different things: Vectors of the length ``n`` that is a power of two, i.e. ``n = 2^i`` is certainly easily Fourier-transformable, but for most FFT implementations so are ``n = 2^i3^j5^k`` with ``i,j,k`` some positive integers. In fact, [FFTW](http://fftw.org/) uses ``O(n \log n)`` algorithms even for prime sizes.
[^Bourke72]: Bourke, W. An Efficient, One-Level, Primitive-Equation Spectral Model. Mon. Wea. Rev. 100, 683–689 (1972). doi:[10.1175/1520-0493(1972)100<0683:AEOPSM>2.3.CO;2](https://doi.org/10.1175/1520-0493(1972)100<0683:AEOPSM>2.3.CO;2)
[^Orszag70]: Orszag, S. A., 1970: Transform Method for the Calculation of Vector-Coupled Sums: Application to the Spectral Form of the Vorticity Equation. J. Atmos. Sci., 27, 890–895, [10.1175/1520-0469(1970)027<0890:TMFTCO>2.0.CO;2](https://doi.org/10.1175/1520-0469(1970)027<0890:TMFTCO>2.0.CO;2).
6 changes: 3 additions & 3 deletions docs/src/speedytransforms.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ map = gridded(alms)
```
By default, the `gridded` transforms onto a [`FullGaussianGrid`](@ref FullGaussianGrid) unravelled here
into a vector west to east, starting at the prime meridian, then north to south, see [RingGrids](@ref).
We can visualize `map` quickly with a unicodeplot via `plot` (see [Visualising RingGrid data](@ref))
We can visualize `map` quickly with a UnicodePlot via `plot` (see [Visualising RingGrid data](@ref))
```@example speedytransforms
plot(map)
```
Expand Down Expand Up @@ -108,7 +108,7 @@ Note that because we chose `dealiasing=3` (cubic truncation) we now match a T5 s
with a 12-ring octahedral Gaussian grid, instead of the 8 rings as above. So going from
`dealiasing=2` (default) to `dealiasing=3` increased our resolution on the grid while the
spectral resolution remains the same. The `SpectralTransform` also has options for the
recomputation or precomputation of the Legendre polynomials, fore more information see
recomputation or pre-computation of the Legendre polynomials, fore more information see
[(P)recompute Legendre polynomials](@ref).

Passing on `S` the `SpectralTransform` now allows us to transform directly on the grid
Expand Down Expand Up @@ -164,7 +164,7 @@ m = Matrix(map) # hide
m
```
You hopefully know which grid this data comes on, let us assume it is a regular
latitde-longitude grid, which we call the `FullClenshawGrid`. Note that for the spectral
latitude-longitude grid, which we call the `FullClenshawGrid`. Note that for the spectral
transform this should not include the poles, so the 96x47 matrix size here corresponds
to

Expand Down

0 comments on commit 31b42e4

Please sign in to comment.