-
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
Using GeoMakie #23
Comments
Really nice contribution (and figure)! Do you want to do a PR? I can do it in the next couple of weeks on my end, probably around mid-march (some vacations I'm taking with the kids) |
One possible caveat to adding geomakie as a dependency at this stage is that users may not be able to compile the package though -- at least on my Mac it fails miserably every time I try to use geomakie |
I can (and will) do a PR once we have a round of releases into all the packages that go into this process (they are like 6 of them!). At the moment @gaelforget has a very solid point. The good thing is that if there are working stable releases, we don't have to care about what breakages happen on master! Although it is best to wait a bit because @asinghvi17 may create a simpler interface to using projections. |
@gaelforget could you post the error on GeoMakie? There will be some warnings, but I haven't seen any explicit failures to compile. |
Will do but it might take me a few days to get back to it. Might just have to do with some library that I don't know I need to install or something like that ... |
So, I made it work with one of the simulation I have on hand (CanESM2 CMIP5 simulation)! Yay! I did get an error though on the using following source and dest (my data is on a -180 to 180 reference. source = Projection("+proj=lonlat +lon_0=0")
dest = Projection("+proj=$projection +lon_0=0") coastlines!(earthscene, 1; crs = (src = source, dest = dest,));
ERROR: MethodError: no method matching coastlines!(::LScene, ::Int64; crs=(src = Projection("+proj=lonlat +lon_0=0 +ellps=GRS80"), dest = Projection("+proj=moll +lon_0=0 +ellps=GRS80")))
Closest candidates are:
coastlines!(::Union{AbstractScene, AbstractPlotting.ScenePlot}; attributes...) at /home/proy/.julia/packages/GeoMakie/4QOPe/src/recipes/stock.jl:34
coastlines!(::Attributes, ::Any...; kw_attributes...) at /home/proy/.julia/packages/GeoMakie/4QOPe/src/recipes/stock.jl:48
coastlines!(::Union{AbstractScene, AbstractPlotting.ScenePlot}, ::Attributes, ::Any...; kw_attributes...) at /home/proy/.julia/packages/GeoMakie/4QOPe/src/recipes/stock.jl:53
Stacktrace:
[1] #plotfield#19(::Symbol, ::String, ::typeof(plotfield), ::Array{Float32,2}, ::Tuple{Float32,Float32}) at ./REPL[196]:11
[2] (::var"#kw##plotfield")(::NamedTuple{(:titletext,),Tuple{String}}, ::typeof(plotfield), ::Array{Float32,2}, ::Tuple{Float32,Float32}) at ./none:0
[3] top-level scope at REPL[197]:1 |
ok, it worked with the following call! (removed second positional argument) coastlines!(earthscene; crs = (src = source, dest = dest,)); |
Perhaps a simple question: how do we reverse the colormap? |
You can pass |
Thanks! I knew there was something simple! |
I've read somewhere that |
Unfortunately there's no plan yet, but you can use meshes to simulate a surface. I can whip up an updated example later today. |
Yes, if I can fallback on meshes, that would be quite useful! |
Getting to this now -- sorry it's taken me longer than hoped to get things back on track after OSM20 ... |
Thanks, @gaelforget! @Balinus, unfortunately Cairo meshes are not performant at all, and to generate even a 360x180 grid crashes CairoMakie. I'll look into this at Vizcon with the help of Simon, and perhaps work on a GR backend for Makie with the help of Josef Heinen, but till then if you don't have a GPU, you're out of luck. Will let you know if there's any more progress on that front. |
Happy to report that I have been using One of my initial tests was this animation of ocean transports at 300m depth. Next on my todo list would be to test |
The problem with Binder is that it often doesn't have GPUs, which GeoMakie needs. You could try nextjournal.com? That offers free GPU compute. |
Here is a code example I use to animate my fields over the earth (and also do a single plot of their time averages). In the following assume that
A
is a 3D matrix with dimensions lon x lat x t , with lon lat in degrees andt
in months. Because mylon
data are structured starting in 0 and ending in 360, you will notice acircshift
operation is necessary. This requiresmaster
branch versions of all packages I use, but I hope MakieOrg/GeoMakie.jl#29 will be resolved soon and we will get some stability.here goes:
this produces
and
Importantly, actually producing the animation requires as much time as looking at it, instead of the around 30 minutes it needs with cartopy.
The text was updated successfully, but these errors were encountered: