Skip to content

Add meteogram and centralise plot style#192

Open
clairemerker wants to merge 8 commits into
paper-figuresfrom
paper-figures-meteogram
Open

Add meteogram and centralise plot style#192
clairemerker wants to merge 8 commits into
paper-figuresfrom
paper-figures-meteogram

Conversation

@clairemerker

@clairemerker clairemerker commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

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_obs_from_peakweather data_download_eckit_geo_grids \
  --forcerun publication_meteogram publication_figures

Current version of the plots:

image image

- observations in red; x-axis as lead time (h), no rotated labels
- dashed gridlines (24h major / 6h minor); larger fonts (13/16pt)
- "Init time" in title; DD_10M drawn as markers on a 0-360 axis
- fix baseline CLI key (baselines->baseline) so --baseline is honored
- submit publication_meteogram via SLURM (compute node) instead of localrule
- one place for colors, markers, line styles, font sizes, and full variable names
- palette: obs #4ecb8d, ICON-CH1 #008dff, ICON-CH2 #003a7d, Varda #d83034
- observations drawn as green dots; full-name panel labels (e.g. "2m temperature")
- precip grey shading derived from axes tight bboxes (font-robust, no skew)
- both publication_figures.py and publication_meteogram.py import the shared module
@clairemerker clairemerker requested a review from jonasbhend June 19, 2026 10:18
Comment thread src/evalml/config.py

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.

Can't we reuse the existing MeteogramConfig class?

@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 for pushing this. Really like the suggested colours. I think we should adopt the matplotlib style sheets for better readability.

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.

I don't understand. Why do we need this on top of the meteogram functionality that is already available in the showcases module / part? Seems like an unnecessary duplication to me.

Comment on lines +46 to +49
if "SP_10M" in display_params and have_uv:
ds["SP_10M"] = wind_speed(ds["U_10M"], ds["V_10M"])
if "DD_10M" in display_params and have_uv:
ds["DD_10M"] = wind_direction_deg(ds["U_10M"], ds["V_10M"])

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.

Should an error be raised if something we cannot compute wind speed and direction (but would like to)?

"""Flatten a single-station dataset to long form.

Returns columns [source, valid_time, param, value]. The time coordinate is
`valid_time` if present, else `time`. Params absent from `ds` are skipped.

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.

Here again, should we raise an error if absent?

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.

I like the idea behind this. unfortunately I have only now discovered the matplotlib style sheets (https://matplotlib.org/stable/users/explain/customizing.html), that probably would be more suitable, what do you think?

Comment thread workflow/Snakefile
Comment on lines -230 to -237
rule publication_all:
"""Target rule for publication figures workflow."""
input:
(
rules.publication_figures.output
if config.get("publication", {}).get("enabled", False)
else []
),

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.

All the other integral rules are in the top-level snakefile (e.g. experiment_all, ...). Is it necessary to move this one into the specific rule file?

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