Skip to content

Comments

Fix _assign_time_coord crash when lead_time is not 1D along forecast_step#1897

Merged
SavvasMel merged 4 commits intoecmwf:developfrom
jehangirawan:fix/restore-qq-analysis
Feb 24, 2026
Merged

Fix _assign_time_coord crash when lead_time is not 1D along forecast_step#1897
SavvasMel merged 4 commits intoecmwf:developfrom
jehangirawan:fix/restore-qq-analysis

Conversation

@jehangirawan
Copy link
Contributor

@jehangirawan jehangirawan commented Feb 21, 2026

Description

Fixes a crash in _assign_time_coord when lead_time is not 1D along forecast_step. The fix adds a stricter check before attempting swap_dims and falls back to forecast_step gracefully instead of crashing.

Changes

  • _assign_time_coord now validates lead_time shape and dims before swap_dims, falls back to forecast_step if not compatible

Closes Issue #1898

Checklist before asking for review

  • I have performed a self-review of my code
  • My changes comply with basic sanity checks:
    • I have fixed formatting issues with ./scripts/actions.sh lint
    • I have run unit tests with ./scripts/actions.sh unit-test
    • I have documented my code and I have updated the docstrings.
    • I have added unit tests, if relevant
  • I have tried my changes with data and code:
    • I have run the integration tests with ./scripts/actions.sh integration-test
    • (bigger changes) I have run a full training and I have written in the comment the run_id(s): launch-slurm.py --time 60
    • (bigger changes and experiments) I have shared a hegdedoc in the github issue with all the configurations and runs for this experiments
  • I have informed and aligned with people impacted by my change:
    • for config changes: the MatterMost channels and/or a design doc
    • for changes of dependencies: the MatterMost software development channel

@SavvasMel
Copy link
Contributor

I am a bit confused, all the recent PRs include the QuantilePlot Class, I do not see any commit not including the changes in #1734.

@jehangirawan jehangirawan force-pushed the fix/restore-qq-analysis branch from 966c7f0 to ba457c2 Compare February 21, 2026 17:42
@jehangirawan jehangirawan changed the title Restore qq_analysis plotting lost after #1734 Fix _assign_time_coord crash when lead_time is not 1D along forecast_step Feb 21, 2026
@jehangirawan
Copy link
Contributor Author

Narrowed the scope after investigation — QuantilePlots is already in develop. The actual issue is the _assign_time_coord crash. @SavvasMel

@github-actions github-actions bot added the eval anything related to the model evaluation pipeline label Feb 23, 2026
SavvasMel and others added 2 commits February 24, 2026 17:43
@SavvasMel SavvasMel marked this pull request as ready for review February 24, 2026 16:49
@SavvasMel
Copy link
Contributor

Perfect! Many thanks for the hot fix @jehangirawan!

@SavvasMel SavvasMel merged commit 9485c93 into ecmwf:develop Feb 24, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

eval anything related to the model evaluation pipeline

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants