-
Notifications
You must be signed in to change notification settings - Fork 195
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
Cubed sphere tracer advection script #3266
Conversation
…ties on the cubed sphere
…ty to prescribed hydrostatic velocity fields
multi_region_tracer_advection_latlon.mp4 |
However, it doesn't work when the tracer passes over a corner: multi_region_tracer_advection_latlon.mp4 |
(Note that the two videos above are with |
It might've just been a CFL issue (here at coarser resolution, with a time-step estimated based on the minimum grid spacing): multi_region_tracer_advection_latlon.mp4 |
Now with WENO(order=9) multi_region_tracer_advection_latlon.mp4 |
…b.com/CliMA/Oceananigans.jl into ncc-glw/cubed-sphere-tracer-advection
Let's leave the |
Co-authored-by: Gregory L. Wagner <wagner.greg@gmail.com>
There seems to be some artifacty things introduced by the corners. See the below which starts with a tracer: θ₀ = 1
Δφ = 20
θᵢ(λ, φ, z) = - θ₀ * cosd(4λ) * exp(-φ^2 / 2Δφ^2) advected by streamfunction that corresponds to solid-body rotation about axis that passes via (lat, lon) = (0, 0). φʳ = 0 # Latitude pierced by the axis of rotation
α = 90 - φʳ # Angle between axis of rotation and north pole (degrees)
ψᵣ(λ, φ, z) = - U * R * (sind(φ) * cosd(α) - cosd(λ) * cosd(φ) * sind(α)) cubed_sphere_tracer_advection.mp4 |
I think we need stretched WENO with 2D coefficients. Now It will be straightforward to update WENO once everything is in place |
Good point. So if I fall back to the default scheme for tracers then it should be OK? |
A centered second order advection should be okay but you have to pair it with some diffusion otherwise oscillatory errors will break your solution |
True! At least we know what's going on. Thanks @simone-silvestri! Here it is without any diffusion: cubed_sphere_tracer_advection.mp4And here it is with cubed_sphere_tracer_advection.mp4You can still "see" the corner. |
Some remarks:
It seems like there is a topology problem. For
We also decided to leave making broadcasting work for So, with this and that, we should merge this PR at its current state. |
* Add fill halo regions for zero and constant field * Cosmetic stuff * Generalize HydrostaticFreeSurfaceVelocityFields for prescribed velocities on the cubed sphere * Add a tracer advection script * Disambiguate replace velocities and generate TODO to move functionality to prescribed hydrostatic velocity fields * Generate TODO to refactor multi region to appear before Models * Much clean up * Implement getindex and first for niceities * Cosmetic improvement * rename replace_horizontal_velocity_halos! -> replace_horizontal_vector_halos! * fix docstring * code alignment * Get rid of practically useless PrescribedField test * velocity -> vector * add minimum_spacing method for MultiRegionGrid * don't import deprecated PrescribedField * replace_horizontal_velocity_halos -> replace_horizontal_vector_halos * add convenience radius(::ConformalCubedSphereGrid) * cleanup, correct angle units, another IC * code alignment * replace_horizontal_velocity_halos -> replace_horizontal_vector_halos * use heatlatlon! from Imaginocean.jl * Imaginocean instructions * use Imaginocean * declutter show for MultiRegionField * remove extra line * some updates * Notes on braodcasting for cu bed pshere * cleaner minimum_spacing for `MultiRegionGrid` Co-authored-by: Gregory L. Wagner <wagner.greg@gmail.com> * even cleaner minimum_spacing for * remove extra empty line * add convenience functions for multiregion fields * code alignment * use multiregion field conveniences * add number_of_regions(::MultiRegionGrid) convenience * remove placeholder broadcasting code for multiregion * fix signature in docstring --------- Co-authored-by: Navid C. Constantinou <navidcy@users.noreply.github.com>
Some TODOs:
set!
work forFace, Face, Center
fields (eg streamfunctions)With the above and fixing the tests then I think we are ready to merge.
Supersedes #3221; closes #3204