Fix showcases#175
Merged
Merged
Conversation
jonasbhend
approved these changes
Jun 8, 2026
jonasbhend
left a comment
Contributor
There was a problem hiding this comment.
Thanks Daniele for spotting this. This looks good from a visual inspection. I can run the showcase to confirm, but would rather not as it is still very slow (we probably need to fix that).
jonasbhend
pushed a commit
that referenced
this pull request
Jun 9, 2026
This PR fixes a few recent issues related to the showcase command. - #154 changed `plot_forecast_frame` to output frames for all regions in a single job (to reduce data I/O). However, `make_forecast_animation` was not updated accordingly: its input lambda expanded `rules.plot_forecast_frame.output`, which already has {region} resolved for all regions, causing the `region=wc.region` argument to be silently ignored. As a result, every animation job collected frames from all regions and passed them all to convert, producing incorrect GIFs. - fix: 9fdefc8 - #162 with eartkit-plots 1.0 something broke in drawing the colormap for precip. For the fix I relied heavily on Claude and will need to be double checked. In essence, for `TOT_PREC`, it seems that because the hex color list was passed as a raw kwarg, it was setting `no_style=True`, after which `configure_style` had already popped colors → matplotlib used viridis. Fixed by embedding colors in the `Style` object rather than passing them as kwargs; `get_style` now detects a pre-built `Colormap` and uses earthkit's vmin/vmax path (which handles `Colormap` objects), injecting `levels` directly into `style._kwargs` to bypass interception. - also, `extend` moved into each preset in `colormap_defaults.py` (precipitation uses "max" since values are clipped to ≥ 0) - fix: da014ab - consolidate region domains: 671248e - SLURM jobs timing out because `plot_forecast_frame` tasks were being grouped into batches of 8 per SLURM job, but `--cores 4` limited the inner snakemake to run them sequentially. With 8 tasks running sequentially at ~9 minutes each, they'd exceed the 20-minute SLURM time limit. By removing the batching, each task now runs independently in its own job, allowing them to execute in parallel. - fix: f9ea85c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes a few recent issues related to the showcase command.
Unify regions stations #154 changed
plot_forecast_frameto output frames for all regions in a single job (to reduce data I/O). However,make_forecast_animationwas not updated accordingly: its input lambda expandedrules.plot_forecast_frame.output, which already has {region} resolved for all regions, causing theregion=wc.regionargument to be silently ignored. As a result, every animation job collected frames from all regions and passed them all to convert, producing incorrect GIFs.Migrate to earthkit v1.0 release candidate #162 with eartkit-plots 1.0 something broke in drawing the colormap for precip. For the fix I relied heavily on Claude and will need to be double checked. In essence, for
TOT_PREC, it seems that because the hex color list was passed as a raw kwarg, it was settingno_style=True, after whichconfigure_stylehad already popped colors → matplotlib used viridis. Fixed by embedding colors in theStyleobject rather than passing them as kwargs;get_stylenow detects a pre-builtColormapand uses earthkit's vmin/vmax path (which handlesColormapobjects), injectinglevelsdirectly intostyle._kwargsto bypass interception.extendmoved into each preset incolormap_defaults.py(precipitation uses "max" since values are clipped to ≥ 0)consolidate region domains: 671248e
SLURM jobs timing out because
plot_forecast_frametasks were being grouped into batches of 8 per SLURM job, but--cores 4limited the inner snakemake to run them sequentially. With 8 tasks running sequentially at ~9 minutes each, they'd exceed the 20-minute SLURM time limit. By removing the batching, each task now runs independently in its own job, allowing them to execute in parallel.