Skip to content

MRB-650 maps simplified#92

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

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

Conversation

@jonasbhend
Copy link
Copy Markdown
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 marked this pull request as draft February 12, 2026 12:53
Copy link
Copy Markdown
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
Copy Markdown
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.

Louis-Frey and others added 13 commits March 20, 2026 12:56
The verification files (verif.nc) do now not contain spatial information
any more. Instead, this information is read from the forecast and truth
data (grib / zarr), aggregated over forecasts and written into a
verif_spatial directory for every run. This has the following advantages:

- The spatial information (redundant because it already pre-exists in
  .grib and .zarr files) is now not unnecessarily written to disk.
- The spatial verification pipeline is now separated to some degree
  from the normal one, meaning that the normal one could be run without
  the heavier spatial one.
- aggregation over forecasts now needs to be performed only for the
  parameters and lead times for which it is actually requested, instead
  of for all. This speeds up computations when only a specific subset of
  maps is of interest.

Co-authored-by: Francesco Zanetta <francesco.zanetta@meteoswiss.ch>
(not thoroughly tested)
handling of the special case when a map is all-NaN
(then a uniform grey map is plotted, with an annotation).
TOT_PREC GRIB values are cumulative totals that are disaggregated via
diff(lead_time) inside load_fct_data_from_grib. Loading only the
requested step meant the diff had a single element and always returned
NaN, producing all-NaN error maps for all seasons.

Fix: detect cumulative params via _CUMULATIVE_PARAMS and load the
preceding available GRIB step alongside the requested one, so the diff
produces a valid result at the target lead time.

Also add first-iteration debug logging (fcst/truth/mapped/error shape,
range, NaN count) and a per-iteration warning when the error is
all-NaN, to make similar issues immediately diagnosable from the logs.
Introduce a dedicated `spatial_all` Snakemake target and a new
`--spatial` flag on `evalml experiment`. Spatial verification
(aggregation + map plots) is now only triggered on explicit request,
keeping the default experiment run lean.

Spatial parameters (params, leadtimes, metrics, regions, seasons)
are configured via an optional `spatial_verification:` block in the
config YAML, backed by a new `SpatialVerificationConfig` Pydantic
model with sensible defaults. All existing configs have been updated
with the block for easy customisation.
Remove later, only for frl development (feel free to use).
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