-
Notifications
You must be signed in to change notification settings - Fork 33
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
Different vertical advection schemes #362
Conversation
Difference between upwind third order (top, 3-point stencil) and upwind fifth order (bottom, 5-point stencil) upwind5-upwind3.mp4 |
This is awesome!! The Jablonowski test case (see also #265) can now be run as follows using SpeedyWeather
# no mountains, no physics
spectral_grid = SpectralGrid(trunc=31,nlev=8)
orography = NoOrography(spectral_grid);
# I believe I deviated slightly here from the Jablonowski initial temperature profile for the stratosphere, will check
initial_conditions = ZonalWind()
model = PrimitiveDryModel(;spectral_grid,orography,initial_conditions,physics=false);
simulation = initialize!(model);
run!(simulation,n_days=10) |
julia> initial_conditions = ZonalWind()
ZonalWind <: InitialConditions:
η₀::Float64 = 0.252
u₀::Float64 = 35.0
perturb_lat::Float64 = 40.0
perturb_lon::Float64 = 20.0
perturb_uₚ::Float64 = 1.0
perturb_radius::Float64 = 0.1
ΔT::Float64 = 0.0
Tmin::Float64 = 200.0
pressure_on_orography::Bool = false But I think they use another |
The results seem to be roughly the same with all advection schemes in this case (probably, there is not much influence of the vertical advection). Is there a way to validate the exactness of the solution (i.e., a reference solution?) Or is there a particularly unstable case we can test to see if there is some stability improvement? |
Using spectral_grid = SpectralGrid(trunc=170,nlev=40) and 30 day time integration vorticity.mp4temperature.mp4 |
@simone-silvestri is there anything you wanted to add here? Have you checked that it's not allocating? |
In https://speedyweather.github.io/SpeedyWeather.jl/previews/PR365/primitiveequation/#Vertical-advection (may need some minutes to build) you can see the current state of the documentation. I won't go into details of the reconstruction and what schemes that means, but if you could have a look at that section and feel free to add anything that's important to understand the code! ❤️ |
I think it is ready to go. I will check that it does not allocate but it shouldn't (only tuples) |
This seems to be ready, should I merge and look at the docs in your new PR? Should I add some tests before? |
…dyWeather.jl into ss/vertical_upwinding
The objective of this PR is to implement some stable vertical advection schemes (Upwinding and WENO)
Following http://www.gfdl.noaa.gov/idealized-spectral-models-quickstart, it looks like upwinding with semi-implicit time stepping requires reconstructing advected variables from previous time steps.
An example of 10 days simulation with third order upwinding (left) and second order centered advection (right)