Skip to content

MRB-650 maps simplified#92

Draft
jonasbhend wants to merge 59 commits intomainfrom
MRB-650-Maps-simplified
Draft

MRB-650 maps simplified#92
jonasbhend wants to merge 59 commits intomainfrom
MRB-650-Maps-simplified

Conversation

@jonasbhend
Copy link
Contributor

@jonasbhend jonasbhend commented Jan 7, 2026

Add maps of forecast verification scores

Changes

  • score components for maps in verif.nc
  • Make verif.nc temporary to avoid storage of large data volumes
  • The domains which are originally called "centraleurope" and "switzerland" are mostly the same. I suggest making domain "switzerland" much smaller, so that more spatial detail can be seen, especially in the complex topography of the alps.

@Louis-Frey Louis-Frey force-pushed the MRB-650-Maps-simplified branch from 2185fd6 to 9eb4643 Compare January 22, 2026 12:43
jonasbhend and others added 29 commits January 27, 2026 16:28
summary statistics. (No changes to code yet.)
For Bias, RMSE and MAE map plots.
Francesco. Got a long way towards the png plots.

Co-authored-by: Francesco Zanetta <francesco.zanetta@meteoswiss.ch>
properly working). Output written to .png now
working.
detailed inspection of results at smaller spatial
scale.
@Louis-Frey Louis-Frey requested a review from frazane February 9, 2026 13:41
@frazane
Copy link
Contributor

frazane commented Feb 9, 2026

Make verif.nc temporary to avoid storage of large data volumes

By doing this, verification will have to be re-computed for every run, every time the workflow is executed. I don't think we want this, no?

@Louis-Frey
Copy link
Contributor

Make verif.nc temporary to avoid storage of large data volumes

By doing this, verification will have to be re-computed for every run, every time the workflow is executed. I don't think we want this, no?

Yes, that could be problematic. Jonas introduced it and I haven't given it much thought, should I change it back?

@Louis-Frey
Copy link
Contributor

Ok I most likely fixed problem 2. See commit 7b50809

@Louis-Frey
Copy link
Contributor

And I just tried again an evalml experiment config/forecasters-ich1.yaml, which ran without an error. So issue 1. is not reproducible.

@dnerini dnerini marked this pull request as ready for review February 12, 2026 12:07
# The domains which are originally called "centraleurope" and "switzerland"
# are mostly the same. I suggest making domain "switzerland" much smaller,
# so that more spatial detail can be seen, especially in the complex
# topography of the alps.
Copy link
Member

Choose a reason for hiding this comment

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

it's a good idea! please move tihs comment to the description of your PR where you summarize the main changes introudced by this PR

Copy link
Contributor

Choose a reason for hiding this comment

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

The description is the top post in this thread I guess? I put it there too.


# Load, de-duplicate lead_time, and keep best provider per source (same logic as verif_plot_metrics)
dfs = [xr.open_dataset(f) for f in args.verif_files]
drop_variables = ["TOT_PREC.MAE.spatial", "TOT_PREC.RMSE.spatial", "TOT_PREC.BIAS.spatial",
Copy link
Member

Choose a reason for hiding this comment

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

instead of hardcoding the variables names, why not just opening the first dataset in the verif_files list and extract all variable names including the keyword "spatial"?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, I'll do that.

ds,
forbidden_dims=("values",), # critical!
metric_dims=("source", "season", "init_hour", "region", "lead_time", "eps"),
)
Copy link
Member

Choose a reason for hiding this comment

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

what's the purpose of this change? the spatial fields should have no impact on this part of the code, or am I missing something?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, the spatial fields don't matter here, but they caused memory problems in the past when this rule was executed. I therefore implemented this work-around so that the spatial parts of the verification files are not loaded into memory in the first place. Chat-GPT assisted in the creation of this code, so forgive me if something is off.

Copy link
Member

Choose a reason for hiding this comment

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

OK I see, but I wonder if you need it? I mean, at that point you don't expect any spatial field to be present, since those were all filtered out with drop_variables no?

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, yes I tried that. But using drop_variables alone did not solve the problem, the spatial data were still loaded into memory. So I had to add the rest of this code.

Copy link
Member

Choose a reason for hiding this comment

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

then it'd be good to understand why that isn't behaving as expected and use only one single strategy to get rid of the spatial fields

@Louis-Frey Louis-Frey marked this pull request as draft February 12, 2026 12:53
Copy link
Contributor

@frazane frazane left a comment

Choose a reason for hiding this comment

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

Beware you added some log files and some notebooks, I don't know if this was intended!

@Louis-Frey
Copy link
Contributor

Beware you added some log files and some notebooks, I don't know if this was intended!

Thanks for pointing out. No, it was not. I will do a cleanup commit at the end where this will be removed.

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.

4 participants