Skip to content

Fix showcases#175

Merged
dnerini merged 8 commits into
mainfrom
fix/showcases
Jun 8, 2026
Merged

Fix showcases#175
dnerini merged 8 commits into
mainfrom
fix/showcases

Conversation

@dnerini

@dnerini dnerini commented Jun 7, 2026

Copy link
Copy Markdown
Member

This PR fixes a few recent issues related to the showcase command.

  • Unify regions stations #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.

  • 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 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.

@jonasbhend jonasbhend left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Comment thread config/interpolators-ich1.yaml
@dnerini dnerini merged commit b8c6ed1 into main Jun 8, 2026
4 checks passed
@dnerini dnerini deleted the fix/showcases branch June 8, 2026 19:23
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants