-
Notifications
You must be signed in to change notification settings - Fork 29
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
Dealiasing parameter for quad,cub truncation #290
Conversation
For some reason this still throws an error in the first spectral transform julia> run_speedy(PrimitiveDryCore,Grid=HEALPixGrid,dealiasing=2)
ERROR: BoundsError
Stacktrace:
[1] gridded!(map::HEALPixGrid{Float64}, alms::LowerTriangularMatrix{ComplexF64}, S::SpectralTransform{Float64}; unscale_coslat::Bool)
@ Main.SpeedyWeather.SpeedyTransforms ~/git/SpeedyWeather.jl/src/SpeedyTransforms/spectral_transform.jl:355
[2] gridded!
@ ~/git/SpeedyWeather.jl/src/SpeedyTransforms/spectral_transform.jl:340 [inlined]
[3] initialize_orography!(orog::Main.SpeedyWeather.Orography{Float64, HEALPixGrid{Float64}}, #unused#::EarthOrography, P::Parameters{PrimitiveDryCore}, S::SpectralTransform{Float64}, G::Geometry{Float64}) |
The last commit resolves the issue that HEALPix errored with quadratic truncation. However, there are clearly issues with the HEALPixGrid when using quadratic truncation: This is T63 with
Note all the aliasing with HEALPix, which however goes basically away with OctaHEALPix! 🎉 |
Great work! Thank you, Milan! Meridional quadrature in HEALPixGrid and OctaHEALPixGrid are inexact by design, so it is natural that you see visibly different results with HEALPixGrid at a relatively low resolution of T63. I found it surprising that T63 on H48 did not blow up (albeit with easily recognizable aliasing noises)! It's great that this problem goes away with OctaHEALPix. It is exactly for this reason that I suggested OctaHEALPix, so it is just consistent with the theory, but it is always nice to see that an implementation actually works as expected from theory. Thank you! and Congratulations! |
@hottad this introduces
dealiasing
as a parameter (1=linear, 2=quadratic, 3=cubic) but you can also chose anything in between and it chooses the right grid size given the truncationtrunc
(anddealiasing
). I therefore removed anything that related to the spectral resolution fromRingGrids
andSpeedyTransforms
now has the following methodsto match spectral and grid-point resolution as desired.