-
Notifications
You must be signed in to change notification settings - Fork 0
MRB-422 Generate plots for inference output #50
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
Conversation
|
I started working on using earthkit-plots to plot the data and also using the colortable files from NLC, building on the code that @cosunae wrote. I didn't manage to finish the work before my holidays, here is the status, hope that helps :) : Color tables
Plots with earthkit-plots
2t, Orthographic projection, Europe 2t, Orthographic projection, Globe 2t, PlateCarree projection, Europe 2t, PlateCarree projection, Globe |
* Adopt more atomic approach Also use marimo for interactive editing * Move notebook to dedicated folder * Remove original script * Add example config * Revert some wrong changes
|
@clairemerker I merged #54 into this branch to refactor the plotting code and lean on Snakemake’s strengths. The result is hopefully a cleaner workflow that showcases how Snakemake can simplify orchestration, remove boilerplate, and make the pipeline easier to maintain and extend. |
|
I am not very happy with how earthkit-plots does not allow reusing a pre-computed Triangulation object. In my original implementation here the triangulation was only performed once and reused for every field, but now it is recomputed every time which is wasteful. Am I understanding this correctly @clairemerker @cosunae ? Would it make sense to open an issue on earthkit-plots? |
* Adopt more atomic approach Also use marimo for interactive editing * Move notebook to dedicated folder * add plot rule * Revert some wrong changes * Solve bugs adopt grib * Replace by plot_forecast_frame.py * Rename * Fix number of points cosmo 1e * Remove globe because it doesn't seem right * Add possibility to set region to none for global plots * Review * Update workflow/scripts/src/plotting.py * Simplify code
|
@frazane @OpheliaMiralles I'm getting a keyerror with the current version of the code: despite the variable However, I can load the right temperature variable using "T_2M" notation, which is a bit confusing. Do you know what's going on here? Is it meteodata-lab automatically renaming to COSMO/ICON variable names? |
| analysis: | ||
| label: COSMO KENDA | ||
| analysis_zarr: /scratch/mch/fzanetta/data/anemoi/datasets/mch-co2-an-archive-0p02-2015-2020-6h-v3-pl13.zarr | ||
|
|
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.
Do we need baselines and analysis for the showcases?
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.
config handling clearly needs some more attention. Currently we require everything in all the configs (i.e. baseline, analysis, stratification even for showcases). This doesn't make a lot of sense. Instead we should either combine experiment and showcase configs, or allow showcase configs to be a lot simpler.
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.
In my opinion we should have different config schemas for different commands. It's a minor inconvenience to have different configs (we will have max 3-4 commands in the end, I suppose), but we get:
- better separation of concerns
- clearer config schema-driven development
- simpler configs for each command
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 we leave it as is and discuss how the we expect the showcases command to evolve. #74 introduces meteograms for which baselines and analyses would be a useful addition and reference. If we integrate this with the showcases command, we are back to the full config (minus the stratification by region).
|
I broke the showcase by merging main with the plotting by region into this branch. I can have a look later, sorry :-/ |
Co-authored-by: Jonas Bhend <jonasbhend@users.noreply.github.com>
|
Great, thanks @OpheliaMiralles for integrating precip. When I run this with the M-1 forecaster only, I get a very small crop over switzerland for the global domain (e.g. output/showcases/d0846032f/202002030000/202002030000_tp_globe.gif): This is my config: |
|
This happens because earthkit plos automatically adjusts the extend of the displayed domain to the presence of data (note how it's an exact bounding box of the values). |
Yes in the case of "globe" region, no cropping is done so it is adjusted to coordinates in the data. @jonasbhend are you sure this is |
OpheliaMiralles
left a comment
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 have self-reviewed and it looks fine! @dnerini at this stage I suggest to ask review from someone else maybe
|
Thanks Ophélia! I suggest to ask for a final review from @clairemerker next week |
Co-authored-by: Daniele Nerini <daniele.nerini@meteoswiss.ch>
| { name = "Francesco Zanetta", email = "francesco.zanetta@meteoswiss.ch" }, | ||
| { name = "Daniele Nerini", email = "daniele.nerini@meteoswiss.ch" }, |
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.
| { name = "MeteoSwiss" }, |
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 we leave it as is and discuss how the we expect the showcases command to evolve. #74 introduces meteograms for which baselines and analyses would be a useful addition and reference. If we integrate this with the showcases command, we are back to the full config (minus the stratification by region).
| # extent [lon_min, lon_max, lat_min, lat_max] in PlateCarree coordinates | ||
| DOMAINS = { | ||
| "globe": { | ||
| "extent": None, # full globe view |
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.
Here we could specify the extent, no? So that the globe projection is the same irrespective of the presence of global data or not.
dnerini
left a comment
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 this is good to go. There are still a few open points and certainly a lot of room for improvements, but the basic functionality is there and performs well. I suggest to merge as it is.











Uh oh!
There was an error while loading. Please reload this page.