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

GeoMakie extension and interactive 3D grid visualisation on the sphere #600

Merged
merged 33 commits into from
Nov 11, 2024

Conversation

milankl
Copy link
Member

@milankl milankl commented Oct 29, 2024

fixes #599

@milankl milankl added user interface 🎹 How users use our user interface grid 🌐 Points on a sphere labels Oct 29, 2024
@milankl
Copy link
Member Author

milankl commented Oct 29, 2024

@asinghvi17 this is so cool

julia> using SpeedyWeather

julia> using GLMakie, GeoMakie

julia> globe(OctahedralGaussianGrid, 24)

image

@asinghvi17
Copy link
Contributor

That's slick! I'm kind of inspired to try to write a GlobeAxis now, so that this can be more general :D

@milankl
Copy link
Member Author

milankl commented Oct 29, 2024

@navidcy I feel like you'd love that! Where is the interactive 3D plotting on the cubed sphere 😝

@milankl
Copy link
Member Author

milankl commented Nov 5, 2024

So I’m thinking about a function that just return for every grid cell index the n corners/vertices (it’s mostly 4 though) then we can either use them to define a vector of polygons or Iwecan concatenate them with a NaN point in between to plot the grid lines with a single lines! call. However, then we would essentially plot every line twice, but that sounds like much less work as we can reuse a lot of functionality between plotting the grid lines and plotting data on that grid in the form of polygons.

@milankl
Copy link
Member Author

milankl commented Nov 8, 2024

If we follow the same definition of the vertices for full grids as for the reduced grids, the full grids actually look like this

image

with these diamond shapes instead of rectangles, I guess that's a totally valid alternative definition of a full grid. But probably best not to confuse people too much and so the last commit adds a method for full grid that defines the vertices as

image

@milankl
Copy link
Member Author

milankl commented Nov 8, 2024

Now plotting data directly on the native grid, sweet!

image

@milankl
Copy link
Member Author

milankl commented Nov 11, 2024

Not merging because of MakieOrg/GeoMakie.jl#282

Copy link
Contributor

@asinghvi17 asinghvi17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once JuliaRegistries/General#119185 is merged you should be able to rely on GeoMakie for this until we get the Makie PRs in.

Project.toml Outdated Show resolved Hide resolved
ext/SpeedyWeatherGeoMakieExt/faces.jl Outdated Show resolved Hide resolved
@milankl
Copy link
Member Author

milankl commented Nov 11, 2024

@asinghvi17 created a little video from some random data on the OctahedralGaussianGrid

Screen.Recording.2024-11-11.at.11.56.46.AM.mov

@milankl milankl merged commit 5aac1b2 into main Nov 11, 2024
5 checks passed
rivwgk pushed a commit to rivwgk/SpeedyWeather.jl that referenced this pull request Nov 13, 2024
SpeedyWeather#600)

* make Geometry parametric with Grid

* GeoMakie extension, globe for interactive 3D visualisation

* add Geodesy as weak dependency too

* ext deps as markdown list

* function args typo

* export globe

* changelog updated

* update docs toml

* remove Geodesy dependency

* move ext into folder

* _faces typo

* add OctahedralGaussian method for _faces

* remove equator for even rings

* include octahedral clenshaw grids

* faces, facesr not returned

* get_vertices for RingGrids

* globe options

* vertices for full grids just rectangles, not diamonds

* globe for data

* extend not overwrite globe

* import Polygon and docstrings

* import Polygon through GeoMakie

* interactive bool

* title corrected

* change vertices definiton to ESWN

* use globe function in docs

* Update Project.toml

Co-authored-by: Anshul Singhvi <[email protected]>

* more globe calls in docs

* docs typo

* Update ext/SpeedyWeatherGeoMakieExt/faces.jl

Co-authored-by: Anshul Singhvi <[email protected]>

---------

Co-authored-by: Anshul Singhvi <[email protected]>
milankl added a commit that referenced this pull request Nov 28, 2024
* adds height to Rossby-Haurwitz initial condition

* GeoMakie extension and interactive 3D grid visualisation on the sphere (#600)

* make Geometry parametric with Grid

* GeoMakie extension, globe for interactive 3D visualisation

* add Geodesy as weak dependency too

* ext deps as markdown list

* function args typo

* export globe

* changelog updated

* update docs toml

* remove Geodesy dependency

* move ext into folder

* _faces typo

* add OctahedralGaussian method for _faces

* remove equator for even rings

* include octahedral clenshaw grids

* faces, facesr not returned

* get_vertices for RingGrids

* globe options

* vertices for full grids just rectangles, not diamonds

* globe for data

* extend not overwrite globe

* import Polygon and docstrings

* import Polygon through GeoMakie

* interactive bool

* title corrected

* change vertices definiton to ESWN

* use globe function in docs

* Update Project.toml

Co-authored-by: Anshul Singhvi <[email protected]>

* more globe calls in docs

* docs typo

* Update ext/SpeedyWeatherGeoMakieExt/faces.jl

Co-authored-by: Anshul Singhvi <[email protected]>

---------

Co-authored-by: Anshul Singhvi <[email protected]>

* uses proper model variables for planet independent Rossby-Haurwitz waves

* makes filtering the height anomaly shallow water exclusive

* adds documentation draft for Rossby-Haurwitz wave

* slight changes to the docs

* renames variable for consistency

---------

Co-authored-by: Milan Klöwer <[email protected]>
Co-authored-by: Anshul Singhvi <[email protected]>
@milankl milankl deleted the mk/globe branch December 2, 2024 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
grid 🌐 Points on a sphere user interface 🎹 How users use our user interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Interactive 3D data visualisation directly on the grid
2 participants