-
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
Add ClimaExplorer #42
base: main
Are you sure you want to change the base?
Conversation
ce1ce84
to
4342880
Compare
36cda5d
to
0bf6969
Compare
I see for now ClimaExplorer is not using Observables makes things a bit smoother because it only updates one object (e.g., a dot or a line) and does not recreate parent objects (a figure, an axis, etc.). Currently ClimaExplorer recreates everything each time, which can be slow and clunky (resizing everything each time for example). Note that sometime you do want to recreate the whole figure, in which case SpecApi is more responsive. - but I think in our case we want Observables ideally |
docs/src/explorer.md
Outdated
|
||
Once you installed `ClimaExplorer`, you can start the server with | ||
```sh | ||
julia --project=ClimaAnalysis.jl/climaexplorer ClimaAnalysis.jl/climaexplorer/explorer.jl PATH_OF_OUTPUT |
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.
Maybe it would be nice to have an example output file inside of ClimaAnalysis that works out of the box?
I wanted to test it, followed these docs, and realized I don't have an output path to test
climaexplorer/libexplorer.jl
Outdated
|
||
fig = map(var) do sliced_var | ||
fig = CairoMakie.Figure(size=(1200, 760), fontsize=30) | ||
ClimaAnalysis.Visualize.contour2D_on_globe!(fig, sliced_var) |
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.
I think the way to go to make this a plot element (contour) Observable
is to make distinct functions for the creation of the Axis (GeoAxis here), and the function ClimaAnalysis.Visualize.contour2D_on_globe!
taking fig and axis as arguments, so that only the plot element (contour) gets updated dynamically - fig and axis remain the same, and don't need to be updated here (so fig should be out too, and defined only once)
49667d9
to
60d98dd
Compare
6aaa99c
to
bae39ec
Compare
This commit adds an interactive viewer for ClimaAnalysis [skip ci][ci skip]
[skip ci]
bae39ec
to
44c9fea
Compare
ClimaExplorer/explorer.jl
Outdated
# Create server | ||
IPa = "127.0.0.1" | ||
port = 8080 | ||
server = Server(IPa, port; proxy_url = "http://localhost:9384") |
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.
Note:
This is valid only for the remote cluster method.
If run locally, you only need server = Server(IPa, port)
OR server = Server(IPa, port; proxy_url = "http://localhost:8080")
otherwise it will return a broken pipe error
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.
When run explorer.jl on my computer like this, it works
EDIT, or maybe no...
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.
For me it just loses interactivity (but initial figure shows)
|
||
Once you installed `ClimaExplorer`, you can start the server with | ||
```sh | ||
julia --project=ClimaAnalysis.jl/ClimaExplorer ClimaAnalysis.jl/ClimaExplorer/explorer.jl |
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.
This will currently crash, see my comment above.
``` | ||
Then, instantiate the `climaexplorer` environment | ||
```sh | ||
julia --project=ClimaAnalysis.jl/ClimaExplorer -e 'using Pkg; Pkg.instantiate()' |
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.
This currently needs to be dev
, until we make a release
3140a7b and c5d50d2 switch to WGLMakie, but all I did is copy-paste the CairoMakieExt and replace with WGLMakie, likewise in scripts. This works, and the app is much faster and more responsive. However, you may want a different design (compatibility with both CairoMakie and WGLMakie? or no duplicate of code in Ext?) so feel free to update or delete this commit and rework it (Note, I wanted to squash these 2 commits into one, and I did locally, but I am a bit worried that if I do git push -f it will remove previous commits, so for now I leave these 2) |
axis_kwargs = pairs(axis_kwargs_dict) | ||
end | ||
|
||
WGLMakie.Axis(place[p_loc...]; title, xlabel, ylabel, axis_kwargs...) |
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.
I think we will need to have separate function to create Axis and elements (like heatmap), in order to create the Axis only once outside of the interaction
I think there should be a way to have a single |
This commit adds an interactive viewer for ClimaAnalysis.
Work in progress!
lol.webm