Skip to content

Paper figures - #199

Draft
jonasbhend wants to merge 71 commits into
mainfrom
paper-figures
Draft

Paper figures#199
jonasbhend wants to merge 71 commits into
mainfrom
paper-figures

Conversation

@jonasbhend

Copy link
Copy Markdown
Contributor

WIP on figures used for Varda-Single publication

clairemerker and others added 24 commits June 11, 2026 11:34
AI-assisted implementation!

This PR adds meteograms for publication, centralises some ploting style
things, uses long names for variables and tries out some colors :)

Any feedback and changes welcome!

To run only plotting: 
```
evalml publication config/Varda-Single_paper.yaml -- \
  --allowed-rules publication_all publication_meteogram publication_figures \
                  data_download_eckit_geo_grids \
  --forcerun publication_meteogram publication_figures
``` 

Current version of the plots:

<img width="2957" height="1685" alt="image"
src="https://github.com/user-attachments/assets/218f849e-4bd3-41d2-b19d-124dfe156e50"
/>
<img width="2335" height="2056" alt="image"
src="https://github.com/user-attachments/assets/25d1d544-996a-4adf-869c-54ae054cfcf8"
/>

---------

Co-authored-by: Jonas Bhend <jonas.bhend@meteoswiss.ch>
Co-authored-by: Daniele Nerini <daniele.nerini@meteoswiss.ch>
Co-authored-by: Michele Cattaneo <44707621+MicheleCattaneo@users.noreply.github.com>
Co-authored-by: Jonas Bhend <jonasbhend@users.noreply.github.com>
)

AI assisted implementation!

- Derive the jretrievedwh obs marker from --station inside the script
instead of passing a separate --obs argument. The marker value contains
'=' (e.g. jretrievedwh:locations=KLO), which marimo's cli_args drops, so
obs silently fell back to the KLO default and any non-KLO station was
broken (also via the snakemake rule). The rule no longer passes --obs.
- Import `time` in the entry cell and thread it through: the timing log
lines used time.perf_counter() but `time` was never imported (NameError
at runtime).
jonasbhend and others added 5 commits June 26, 2026 11:06
AI assisted implementation! 

Changes the plotting workflow for publication
to be able to generate them from the snakemake workflow as well as
interactively rendering through a manifest .

A documentation is currently available in `docs/publication_figures.md`
jonasbhend and others added 10 commits August 11, 2026 08:59
The publication target of snakemake now only writes a manifest, figures
are produced by standalone Jupyter notebooks that read that manifest.

### Changes

- `evalml publication <config>` → now runs one cheap rule
(`publication_manifest`) to create the manifests. Deleted the three
figure rules and the `python -m evalml.publication` renderer CLI to
simplify the code.
- Result NC files (verification, scoremaps) come from `evalml
experiment` as before, the publication target no longer pulls them.
- New notebooks
`notebooks/publication/{leadtime,meteogram,scoremaps}.ipynb` load the
manifest via `evalml.publication.resolver.Manifest`, style with the
packaged `evalml.publication.style`, and write to
`output/figures/<truth>/<figure>/`.
- Shared style promoted into the package; `plot_meteogram_region.py`
repointed, old marimo scripts removed.
- Added an opt-in `notebooks` dependency group
(jupyterlab/nbconvert/ipykernel), core deps and
inference/verification/hashing untouched.

### Usage
```
evalml experiment  config/varda-single_paper_stations.yaml   # produce results
evalml publication config/varda-single_paper_stations.yaml   # write manifest

# interactive:
EVALML_MANIFEST=output/publication/<truth>/manifest.json jupyter lab notebooks/publication/

# headless (render without opening the notebook):
EVALML_MANIFEST=output/publication/<truth>/manifest.json \
  jupyter nbconvert --to notebook --execute --inplace notebooks/publication/leadtime.ipynb
```

See [docs/publication_figures.md](docs/publication_figures.md) for the
full workflow, config options, and troubleshooting.

---------

Co-authored-by: Francesco Zanetta <62377868+frazane@users.noreply.github.com>
Co-authored-by: Jonas Bhend <jonas.bhend@meteoswiss.ch>
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.

3 participants