Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add space after semicolon #477

Merged
merged 2 commits into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ With v0.6 the interface to SpeedyWeather.jl consist of 4 steps: define the grid,

```julia
spectral_grid = SpectralGrid(trunc=31, Grid=OctahedralGaussianGrid, nlev=8)
model = PrimitiveDryModel(;spectral_grid, orography = EarthOrography(spectral_grid))
model = PrimitiveDryModel(; spectral_grid, orography = EarthOrography(spectral_grid))
simulation = initialize!(model)
run!(simulation, period=Day(10), output=true)
```
Expand Down
6 changes: 3 additions & 3 deletions docs/src/callbacks.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function SpeedyWeather.initialize!(
callback.maximum_surface_wind_speed = zeros(progn.clock.n_timesteps + 1)

# where surface (=lowermost model layer) u, v on the grid are stored
(;u_grid, v_grid) = diagn.layers[diagn.nlev].grid_variables
(; u_grid, v_grid) = diagn.layers[diagn.nlev].grid_variables

# maximum wind speed of initial conditions
callback.maximum_surface_wind_speed[1] = max_2norm(u_grid, v_grid)
Expand Down Expand Up @@ -124,7 +124,7 @@ function SpeedyWeather.callback!(
i = callback.timestep_counter

# where surface (=lowermost model layer) u, v on the grid are stored
(;u_grid, v_grid) = diagn.layers[diagn.nlev].grid_variables
(; u_grid, v_grid) = diagn.layers[diagn.nlev].grid_variables

# maximum wind speed at current time step
callback.maximum_surface_wind_speed[i] = max_2norm(u_grid, v_grid)
Expand Down Expand Up @@ -188,7 +188,7 @@ Meaning that callbacks can be added before and after model construction
```@example callbacks
spectral_grid = SpectralGrid()
callbacks = CallbackDict(:callback_added_before => NoCallback())
model = PrimitiveWetModel(;spectral_grid, callbacks)
model = PrimitiveWetModel(; spectral_grid, callbacks)
add!(model.callbacks, :callback_added_afterwards => NoCallback())
```
Let us add two more meaningful callbacks
Expand Down
16 changes: 8 additions & 8 deletions docs/src/forcing_drag.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,9 @@ be used throughout model integration.
But in SpeedyWeather we typically use the [SpectralGrid](@ref) object to pass on the information of
the resolution (and number format) so we want a generator function like
```@example extend
function StochasticStirring(SG::SpectralGrid;kwargs...)
(;trunc, nlat) = SG
return StochasticStirring{SG.NF}(;trunc, nlat, kwargs...)
function StochasticStirring(SG::SpectralGrid; kwargs...)
(; trunc, nlat) = SG
return StochasticStirring{SG.NF}(; trunc, nlat, kwargs...)
end
```
Which allows us to do
Expand All @@ -275,7 +275,7 @@ function SpeedyWeather.initialize!( forcing::StochasticStirring,
model::ModelSetup)

# precompute forcing strength, scale with radius^2 as is the vorticity equation
(;radius) = model.spectral_grid
(; radius) = model.spectral_grid
A = radius^2 * forcing.strength

# precompute noise and auto-regressive factor, packed in RefValue for mutability
Expand All @@ -285,7 +285,7 @@ function SpeedyWeather.initialize!( forcing::StochasticStirring,
forcing.b[] = exp(-dt/τ)

# precompute the latitudinal mask
(;Grid, nlat_half) = model.spectral_grid
(; Grid, nlat_half) = model.spectral_grid
latd = RingGrids.get_latd(Grid, nlat_half)

for j in eachindex(forcing.lat_mask)
Expand Down Expand Up @@ -366,7 +366,7 @@ function forcing!( diagn::DiagnosticVariablesLayer,
a = forcing.a[] # = sqrt(1 - exp(-2dt/τ))
b = forcing.b[] # = exp(-dt/τ)

(;S) = forcing
(; S) = forcing
for lm in eachindex(S)
# Barnes and Hartmann, 2011 Eq. 2
Qi = 2rand(Complex{NF}) - (1 + im) # ~ [-1, 1] in complex
Expand All @@ -381,7 +381,7 @@ function forcing!( diagn::DiagnosticVariablesLayer,
RingGrids._scale_lat!(S_grid, forcing.lat_mask)

# back to spectral space
(;vor_tend) = diagn.tendencies
(; vor_tend) = diagn.tendencies
SpeedyTransforms.spectral!(vor_tend, S_grid, spectral_transform)

return nothing
Expand Down Expand Up @@ -443,7 +443,7 @@ and just put them together as you like, and as long as you follow some rules.
spectral_grid = SpectralGrid(trunc=42, nlev=1)
stochastic_stirring = StochasticStirring(spectral_grid, latitude=-45)
initial_conditions = StartFromRest()
model = BarotropicModel(;spectral_grid, initial_conditions, forcing=stochastic_stirring)
model = BarotropicModel(; spectral_grid, initial_conditions, forcing=stochastic_stirring)
simulation = initialize!(model)
run!(simulation)
```
Expand Down
2 changes: 1 addition & 1 deletion docs/src/grids.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ changes when `dealiasing` is passed onto `SpectralGrid` on the `FullGaussianGrid
| 42 | 3 | 192x96 |
| ... | ... | ... |

You will obtain this information every time you create a `SpectralGrid(;Grid, trunc, dealiasing)`.
You will obtain this information every time you create a `SpectralGrid(; Grid, trunc, dealiasing)`.

## [Full Gaussian grid](@id FullGaussianGrid)

Expand Down
8 changes: 4 additions & 4 deletions docs/src/how_to_run_speedy.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,11 @@ also `Δt` which is a scaled time step used internally, because SpeedyWeather.jl
[scales the equations](@ref scaled_swm) with the radius of the Earth,
but this is largely hidden (except here) from the user. With this new
`Leapfrog` time stepper constructed we can create a model by passing
on the components (they are keyword arguments so either use `;time_stepping`
on the components (they are keyword arguments so either use `; time_stepping`
for which the naming must match, or `time_stepping=my_time_stepping` with
any name)
```@example howto
model = ShallowWaterModel(;spectral_grid, time_stepping)
model = ShallowWaterModel(; spectral_grid, time_stepping)
```
This logic continues for all model components. See the [Model setups](@ref)
for examples. All model components are also subtype (i.e. `<:`) of
Expand Down Expand Up @@ -156,9 +156,9 @@ parameterizations. Conceptually you construct these different models with
spectral_grid = SpectralGrid(trunc=..., ...)
component1 = SomeComponent(spectral_grid, parameter1=..., ...)
component2 = SomeOtherComponent(spectral_grid, parameter2=..., ...)
model = BarotropicModel(;spectral_grid, all_other_components..., ...)
model = BarotropicModel(; spectral_grid, all_other_components..., ...)
```
or `model = ShallowWaterModel(;spectral_grid, ...)`, etc.
or `model = ShallowWaterModel(; spectral_grid, ...)`, etc.

## [Model initialization](@id initialize)

Expand Down
10 changes: 5 additions & 5 deletions docs/src/output.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The output writer is a component of every Model, i.e. `BarotropicModel`, `Shallo
using SpeedyWeather
spectral_grid = SpectralGrid()
output = OutputWriter(spectral_grid, ShallowWater)
model = ShallowWaterModel(;spectral_grid, output=output)
model = ShallowWaterModel(; spectral_grid, output=output)
nothing # hide
```

Expand All @@ -28,7 +28,7 @@ Then we can also pass on further keyword arguments. So let's start with an examp
If we want to increase the frequency of the output we can choose `output_dt` (default `=Hour(6)`) like so
```@example netcdf
output = OutputWriter(spectral_grid, ShallowWater, output_dt=Hour(1))
model = ShallowWaterModel(;spectral_grid, output=output)
model = ShallowWaterModel(; spectral_grid, output=output)
nothing # hide
```
which will now output every hour. It is important to pass on the new output writer `output` to the
Expand All @@ -45,7 +45,7 @@ seconds. Depending on the output frequency (we chose `output_dt = Hour(1)` above
this will be slightly adjusted during model initialization:
```@example netcdf
output = OutputWriter(spectral_grid, ShallowWater, output_dt=Hour(1))
model = ShallowWaterModel(;spectral_grid, time_stepping, output)
model = ShallowWaterModel(; spectral_grid, time_stepping, output)
simulation = initialize!(model)
model.time_stepping.Δt_sec
```
Expand All @@ -60,7 +60,7 @@ time_stepping.Δt_sec
and a little info will be printed to explain that even though you wanted
`output_dt = Hour(1)` you will not actually get this upon initialization:
```@example netcdf
model = ShallowWaterModel(;spectral_grid, time_stepping, output)
model = ShallowWaterModel(; spectral_grid, time_stepping, output)
simulation = initialize!(model)
```

Expand All @@ -77,7 +77,7 @@ which is a bit ugly, that's why `adjust_with_output=true` is the default. In tha
```@example netcdf
time_stepping = Leapfrog(spectral_grid, adjust_with_output=true)
output = OutputWriter(spectral_grid, ShallowWater, output_dt=Hour(1))
model = ShallowWaterModel(;spectral_grid, time_stepping, output)
model = ShallowWaterModel(; spectral_grid, time_stepping, output)
simulation = initialize!(model)
run!(simulation, period=Day(1), output=true)
id = model.output.id
Expand Down
16 changes: 8 additions & 8 deletions docs/src/setups.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ complicated setups.
spectral_grid = SpectralGrid(trunc=63, nlev=1)
still_earth = Earth(spectral_grid, rotation=0)
initial_conditions = StartWithRandomVorticity()
model = BarotropicModel(;spectral_grid, initial_conditions, planet=still_earth)
model = BarotropicModel(; spectral_grid, initial_conditions, planet=still_earth)
simulation = initialize!(model)
run!(simulation, period=Day(20))
```
Expand Down Expand Up @@ -46,7 +46,7 @@ horizontal wavenumber, and the amplitude is ``10^{-5}\text{s}^{-1}``.
Now we want to construct a `BarotropicModel`
with these
```@example barotropic_setup
model = BarotropicModel(;spectral_grid, initial_conditions, planet=still_earth)
model = BarotropicModel(; spectral_grid, initial_conditions, planet=still_earth)
nothing # hide
```
The `model` contains all the parameters, but isn't initialized yet, which we can do
Expand All @@ -71,7 +71,7 @@ with default settings. More options on output in [NetCDF output](@ref).
spectral_grid = SpectralGrid(trunc=63, nlev=1)
orography = NoOrography(spectral_grid)
initial_conditions = ZonalJet()
model = ShallowWaterModel(;spectral_grid, orography, initial_conditions)
model = ShallowWaterModel(; spectral_grid, orography, initial_conditions)
simulation = initialize!(model)
run!(simulation, period=Day(6))
```
Expand All @@ -97,7 +97,7 @@ initial_conditions = ZonalJet()
The jet sits at 45˚N with a maximum velocity of 80m/s and a perturbation as described in their paper.
Now we construct a model, but this time a `ShallowWaterModel`
```@example galewsky_setup
model = ShallowWaterModel(;spectral_grid, orography, initial_conditions)
model = ShallowWaterModel(; spectral_grid, orography, initial_conditions)
simulation = initialize!(model)
run!(simulation, period=Day(6))
```
Expand Down Expand Up @@ -164,7 +164,7 @@ Same as before, create a model, initialize into a simulation, run. This time dir
compare with the last plot

```@example galewsky_setup
model = ShallowWaterModel(;spectral_grid, orography, initial_conditions)
model = ShallowWaterModel(; spectral_grid, orography, initial_conditions)
simulation = initialize!(model)
run!(simulation, period=Day(12), output=true)
```
Expand Down Expand Up @@ -206,7 +206,7 @@ spectral_grid = SpectralGrid(trunc=63, nlev=1)
forcing = JetStreamForcing(spectral_grid, latitude=60)
drag = QuadraticDrag(spectral_grid)
output = OutputWriter(spectral_grid, ShallowWater, output_dt=Hour(6), output_vars=[:u, :v, :pres, :orography])
model = ShallowWaterModel(;spectral_grid, output, drag, forcing)
model = ShallowWaterModel(; spectral_grid, output, drag, forcing)
simulation = initialize!(model)
model.feedback.verbose = false # hide
run!(simulation, period=Day(20)) # discard first 20 days
Expand Down Expand Up @@ -259,7 +259,7 @@ implicit = SpeedyWeather.ImplicitShallowWater(spectral_grid, α=0.5)
orography = EarthOrography(spectral_grid, smoothing=false)
initial_conditions = SpeedyWeather.RandomWaves()
output = OutputWriter(spectral_grid, ShallowWater, output_dt=Hour(12), output_vars=[:u, :pres, :div, :orography])
model = ShallowWaterModel(;spectral_grid, orography, output, initial_conditions, implicit, time_stepping)
model = ShallowWaterModel(; spectral_grid, orography, output, initial_conditions, implicit, time_stepping)
simulation = initialize!(model)
model.feedback.verbose = false # hide
run!(simulation, period=Day(2), output=true)
Expand Down Expand Up @@ -323,7 +323,7 @@ using SpeedyWeather
spectral_grid = SpectralGrid(trunc=31, nlev=8, Grid=FullGaussianGrid, dealiasing=3)
orography = ZonalRidge(spectral_grid)
initial_conditions = ZonalWind()
model = PrimitiveDryModel(;spectral_grid, orography, initial_conditions, physics=false)
model = PrimitiveDryModel(; spectral_grid, orography, initial_conditions, physics=false)
simulation = initialize!(model)
model.feedback.verbose = false # hide
run!(simulation, period=Day(9), output=true)
Expand Down
2 changes: 1 addition & 1 deletion docs/src/spectral_transform.md
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ as further described in [Radius scaling](@ref scaling).

## References

[^Malardel2016]: Malardel S, Wedi N, Deconinck W, Diamantakis M, Kühnlein C, Mozdzynski G, Hamrud M, Smolarkiewicz P. A new grid for the IFS. ECMWF newsletter. 2016;146(23-28):321. doi: [10.21957/zwdu9u5i](https://doi.org/10.21957/zwdu9u5i)
[^Malardel2016]: Malardel S, Wedi N, Deconinck W, Diamantakis M, Kühnlein C, Mozdzynski G, Hamrud M, Smolarkiewicz P. A new grid for the IFS. ECMWF newsletter. 2016; 146(23-28):321. doi: [10.21957/zwdu9u5i](https://doi.org/10.21957/zwdu9u5i)
[^Gorski2004]: Górski, Hivon, Banday, Wandelt, Hansen, Reinecke, Bartelmann, 2004. _HEALPix: A FRAMEWORK FOR HIGH-RESOLUTION DISCRETIZATION AND FAST ANALYSIS OF DATA DISTRIBUTED ON THE SPHERE_, The Astrophysical Journal. doi:[10.1086/427976](https://doi.org/10.1086/427976)
[^Willmert2020]: Justin Willmert, 2020. [justinwillmert.com](https://justinwillmert.com/)
- [Introduction to Associated Legendre Polynomials (Legendre.jl Series, Part I)](https://justinwillmert.com/articles/2020/introduction-to-associated-legendre-polynomials/)
Expand Down
2 changes: 1 addition & 1 deletion docs/src/speedytransforms.md
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ using SpeedyWeather
spectral_grid = SpectralGrid(trunc=31, nlev=1)
forcing = SpeedyWeather.JetStreamForcing(spectral_grid)
drag = QuadraticDrag(spectral_grid)
model = ShallowWaterModel(;spectral_grid, forcing, drag)
model = ShallowWaterModel(; spectral_grid, forcing, drag)
model.feedback.verbose = false # hide
simulation = initialize!(model);
run!(simulation, period=Day(30))
Expand Down
2 changes: 1 addition & 1 deletion src/LowerTriangularMatrices/plot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ function plot(L::LowerTriangularMatrix{T}; mode::Function=abs) where T
width=width,
height=height))

return UnicodePlots.heatmap(Lplot;plot_kwargs...)
return UnicodePlots.heatmap(Lplot; plot_kwargs...)
end
2 changes: 1 addition & 1 deletion src/RingGrids/grids_general.jl
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ $(TYPEDSIGNATURES)
Returns a vector `nlons` for the number of longitude points per latitude ring, north to south.
Provide grid `Grid` and its resolution parameter `nlat_half`. For both_hemisphere==false only
the northern hemisphere (incl Equator) is returned."""
function get_nlons(Grid::Type{<:AbstractGrid}, nlat_half::Integer;both_hemispheres::Bool=false)
function get_nlons(Grid::Type{<:AbstractGrid}, nlat_half::Integer; both_hemispheres::Bool=false)
n = both_hemispheres ? get_nlat(Grid, nlat_half) : nlat_half
return [get_nlon_per_ring(Grid, nlat_half, j) for j in 1:n]
end
Expand Down
4 changes: 2 additions & 2 deletions src/RingGrids/interpolation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,8 @@ function update_locator!( I::AbstractInterpolator{NF, Grid}, # GridGeometry

# find latitude ring indices corresponding to interpolation points
(; latd ) = I.geometry # latitudes of rings including north and south pole
(; js, Δys ) = I.locator # to be updated: ring indices js, and meridional weights Δys
find_rings!(js, Δys, θs, latd;unsafe) # next ring at or north of θ
(; js, Δys ) = I.locator # to be updated: ring indices js, and meridional weights Δys
find_rings!(js, Δys, θs, latd; unsafe) # next ring at or north of θ

# find grid incides ij for top, bottom and left, right grid points around (θ, λ)
find_grid_indices!(I, λs) # next points left and right of λ on rings north and south
Expand Down
6 changes: 3 additions & 3 deletions src/RingGrids/octahealpix.jl
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ full_grid(::Type{<:OctaHEALPixGrid}) = FullOctaHEALPixGrid # the full grid wi

matrix_size(grid::OctaHEALPixGrid) = (2grid.nlat_half, 2grid.nlat_half)
matrix_size(::Type{OctaHEALPixGrid}, nlat_half::Integer) = (2nlat_half, 2nlat_half)
Base.Matrix(G::OctaHEALPixGrid{T};kwargs...) where T = Matrix!(zeros(T, matrix_size(G)...), G;kwargs...)
Base.Matrix(G::OctaHEALPixGrid{T}; kwargs...) where T = Matrix!(zeros(T, matrix_size(G)...), G; kwargs...)

"""
Matrix!(M::AbstractMatrix,
Expand All @@ -134,10 +134,10 @@ Every quadrant of the grid `G` is rotated as specified in `quadrant_rotation`,
eastward starting from 0˚E. The grid quadrants are moved into the matrix quadrant
(i, j) as specified. Defaults are equivalent to centered at 0˚E and a rotation
such that the North Pole is at M's midpoint."""
Matrix!(M::AbstractMatrix, G::OctaHEALPixGrid;kwargs...) = Matrix!((M, G);kwargs...)
Matrix!(M::AbstractMatrix, G::OctaHEALPixGrid; kwargs...) = Matrix!((M, G); kwargs...)

"""
Matrix!(MGs::Tuple{AbstractMatrix{T}, OctaHEALPixGrid}...;kwargs...)
Matrix!(MGs::Tuple{AbstractMatrix{T}, OctaHEALPixGrid}...; kwargs...)

Like `Matrix!(::AbstractMatrix, ::OctaHEALPixGrid)` but for simultaneous
processing of tuples `((M1, G1), (M2, G2), ...)` with matrices `Mi` and grids `Gi`.
Expand Down
6 changes: 3 additions & 3 deletions src/RingGrids/octahedral.jl
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ full_grid(::Type{<:OctahedralClenshawGrid}) = FullClenshawGrid # the full gri

matrix_size(G::OctahedralClenshawGrid) = (2*(4+G.nlat_half), 2*(4+G.nlat_half))
matrix_size(::Type{OctahedralClenshawGrid}, nlat_half::Integer) = (2*(4+nlat_half), 2*(4+nlat_half))
Base.Matrix(G::OctahedralClenshawGrid{T};kwargs...) where T = Matrix!(zeros(T, matrix_size(G)...), G;kwargs...)
Base.Matrix(G::OctahedralClenshawGrid{T}; kwargs...) where T = Matrix!(zeros(T, matrix_size(G)...), G; kwargs...)

"""
Matrix!(M::AbstractMatrix,
Expand All @@ -164,10 +164,10 @@ Every quadrant of the grid `G` is rotated as specified in `quadrant_rotation`,
eastward starting from 0˚E. The grid quadrants are moved into the matrix quadrant
(i, j) as specified. Defaults are equivalent to centered at 0˚E and a rotation
such that the North Pole is at M's midpoint."""
Matrix!(M::AbstractMatrix, G::OctahedralClenshawGrid;kwargs...) = Matrix!((M, G);kwargs...)
Matrix!(M::AbstractMatrix, G::OctahedralClenshawGrid; kwargs...) = Matrix!((M, G); kwargs...)

"""
Matrix!(MGs::Tuple{AbstractMatrix{T}, OctahedralClenshawGrid}...;kwargs...)
Matrix!(MGs::Tuple{AbstractMatrix{T}, OctahedralClenshawGrid}...; kwargs...)

Like `Matrix!(::AbstractMatrix, ::OctahedralClenshawGrid)` but for simultaneous
processing of tuples `((M1, G1), (M2, G2), ...)` with matrices `Mi` and grids `Gi`.
Expand Down
2 changes: 1 addition & 1 deletion src/RingGrids/scaling.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ scale_coslat²!( A::AbstractGrid) = _scale_coslat!(A, power=2)
scale_coslat⁻¹!(A::AbstractGrid) = _scale_coslat!(A, power=-1)
scale_coslat⁻²!(A::AbstractGrid) = _scale_coslat!(A, power=-2)

function _scale_coslat!(A::Grid;power=1) where {Grid<:AbstractGrid}
function _scale_coslat!(A::Grid; power=1) where {Grid<:AbstractGrid}
coslat = sin.(get_colat(Grid, A.nlat_half)) # sin(colat) = cos(lat)
coslat .^= power
return _scale_lat!(A, coslat)
Expand Down
8 changes: 4 additions & 4 deletions src/RingGrids/show.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ function Base.array_summary(io::IO, grid::AbstractGrid, inds::Tuple{Vararg{Base.
Base.showarg(io, grid, true)
end

function plot(A::AbstractGrid;title::String="$(get_nlat(A))-ring $(typeof(A))")
function plot(A::AbstractGrid; title::String="$(get_nlat(A))-ring $(typeof(A))")
A_full = interpolate(full_grid(typeof(A)), A.nlat_half, A)
plot(A_full;title)
plot(A_full; title)
end

function plot(A::AbstractFullGrid;title::String="$(get_nlat(A))-ring $(typeof(A))")
function plot(A::AbstractFullGrid; title::String="$(get_nlat(A))-ring $(typeof(A))")

A_matrix = Matrix(A)
nlon, nlat = size(A_matrix)
Expand All @@ -33,5 +33,5 @@ function plot(A::AbstractFullGrid;title::String="$(get_nlat(A))-ring $(typeof(A)
colorbar=true,
width=width,
height=height))
return UnicodePlots.heatmap(A_view';plot_kwargs...)
return UnicodePlots.heatmap(A_view'; plot_kwargs...)
end
2 changes: 1 addition & 1 deletion src/SpeedyTransforms/aliasing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Returns an integer `m >= n` with only small prime factors 2, 3 (default, others
with the keyword argument `small_primes`) to obtain an efficiently fourier-transformable number of
longitudes, m = 2^i * 3^j * 5^k >= n, with i, j, k >=0.
"""
function roundup_fft(n::Integer;small_primes::Vector{T}=[2, 3, 5]) where {T<:Integer}
function roundup_fft(n::Integer; small_primes::Vector{T}=[2, 3, 5]) where {T<:Integer}
factors_not_in_small_primes = true # starting condition for while loop
n += isodd(n) ? 1 : 0 # start with an even n
while factors_not_in_small_primes
Expand Down
Loading
Loading