-
Notifications
You must be signed in to change notification settings - Fork 3
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
[WIP] Initiate GoeMakie branch #25
base: master
Are you sure you want to change the base?
Conversation
May I recommend something...: At least three people invest time making recipes for plotting fields over the earth. @Balinus uses I don't know if Plots supports these geographic projections natively (probably not), so I am not so sure how much use are all these |
I guess we'll have to check for Plots, but when I checked like 12-16 months ago, geographic plotting wasn't well developed. I do not mind adding support for DimensionalArray but as far as I understood, they are not automatically georeferenced arrays, as opposed to GeoData.jl. If we want to add GeoData, we'll have to wait the package to be registered though. For PyPlot uses, it's already a dependency in ClimatePlots, so any function that uses that will be welcomed! I can do specific methods for ClimGrid by using your functions that (I guess) uses DimensionalArray? So, what I'm saying is that I'm all ears to add as much options as possible. However, development time is rather limited right now so I'm concentrating on ClimGrid for now since GeoData is not registered. |
Sure I'll share the PyPlot recipes I have written, just give me some time to polish them up. They use DimArrays but only at a function barrier. The low-level methods only use normal array data that is propagated: |
Take your time! :) Are you able to push on ClimatePlots? Let me know if you can't. ClimGrid methods also mainly uses the same information. Perhaps the main difference is that when I build a ClimGrid, I also build latitude and longitude matrix. This is essential for regional climate models, since they uses projected grids. So I uses the native latitude and longitude grids for plotting purpose. In the end, if the arguments are vector from regular lat-lon grids, it won't be a problem to build it in the plotting function. Is there any metadata contained in DimensionalArray? It's practical to have it for plotting. I use it for some defaults: title, units, automatic colormap based on type of variable, etc... |
No, this is one of the main reasons that GeoData.jl exists (I think, correct me if I am wrong), it adds metadata on top of DimData. DimData by them selves only have a field name as metadata. (I think this is good: the basic low level data structure should be as lean as possible) |
sf = surface!(earthscene, longrid, latgrid, zeros(size(longrid)); color = Cmean, | ||
shading = false, show_axis = false, colorrange = crange, colormap = cmap); | ||
|
||
geoaxis!(earthscene, -180, 180, -90, 90; crs = (src = source, dest = dest,)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be better to use the bounding boxes of the original latgrid
and longrid
here. Also, if ClimateTools.getgrids
returns the original grids, beware that this will mutate them, so you should probably ensure they're copied.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
For this branch, I'm gonna wait for a proper CPU backend. Right now, I develop mostly on a cluster without GPU resources. Hence, I cannot develop/test properly. |
Makes sense. I've made some progress on potentially fixing CairoMakie's meshes, will let you know if / when that happens. |
In the last couple of weeks, we've made significant progress on CairoMakie. Working with reasonably large meshes is now reasonably performant (though vector output is always going to be large). Edit: I should mention that I recently put up a tutorial here which goes over the mesh API around the end. |
What's the downside of using GLMakie? |
GLMakie needs a GPU, and can't do vector output. CairoMakie is slower to render (not too slow, though) and also cannot use |
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" | ||
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may want to change these to CairoMakie and AbstractPlotting, which don't bring in the GLMakie dependency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we only depend on AbstractPlotting and GeoMakie, without enforcing a backend? That's what I do in InteractiveChaos for example (no GeoMakie there)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, that's also doable, there aren't any explicit ties to CairoMakie.
btw @Balinus I've been working more on this code as well as with another code so we can do better now. |
Happy to see some progress on this front! Will try to do some work in the next weeks. |
Using @Datseris code to initiate a GeoMakie branch.
Objective: experimental support of GeoMakie with surface plots and animation.