Skip to content

Add timeseries plotting#2435

Open
SavvasMel wants to merge 6 commits into
ecmwf:developfrom
SavvasMel:SavvasMel/develop/timeseries
Open

Add timeseries plotting#2435
SavvasMel wants to merge 6 commits into
ecmwf:developfrom
SavvasMel:SavvasMel/develop/timeseries

Conversation

@SavvasMel

@SavvasMel SavvasMel commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Description

With this PR, we allow plotting of timeseries per variable and sample. Example use:

default_streams:
  ERA5:
    regions: ["global"]
    channels: ["2t", "10u"] #, "10v", "z_500", "t_850", "u_850", "v_850", "q_850", ]
    evaluation:
      forecast_step: "all"
      sample: "all"
    plotting:
      sample: "all"
      forecast_step: "all" #supported: "all", [1,2,3,...], "1-50" (equivalent of [1,2,3,...50])
      plot_maps: false
      plot_bias: false
      plot_target: false
      plot_histograms: false
      plot_animations: false
      plot_timeseries: true        <--------------------------

Issue Number

Closes #1933

Is this PR a draft? Mark it as draft.

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
Copy Markdown
Contributor Author
image

@github-actions github-actions Bot added the eval anything related to the model evaluation pipeline label Jun 2, 2026
@SavvasMel SavvasMel mentioned this pull request Jun 8, 2026
7 tasks

@iluise iluise 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 implementing this. I tested it and it works very well. I added some style comments to make it more compact

Comment thread packages/evaluate/src/weathergen/evaluate/plotting/timeseries.py Outdated
Comment thread packages/evaluate/src/weathergen/evaluate/plotting/timeseries.py Outdated
Comment thread packages/evaluate/src/weathergen/evaluate/plotting/timeseries.py Outdated
Comment thread packages/evaluate/src/weathergen/evaluate/plotting/plot_orchestration.py Outdated
Comment thread packages/evaluate/src/weathergen/evaluate/plotting/plot_orchestration.py Outdated
Comment thread packages/evaluate/src/weathergen/evaluate/plotting/timeseries.py
Comment thread packages/evaluate/src/weathergen/evaluate/plotting/timeseries.py Outdated
@SavvasMel SavvasMel closed this Jun 11, 2026
@SavvasMel SavvasMel force-pushed the SavvasMel/develop/timeseries branch from efffc29 to 283f73a Compare June 11, 2026 09:59
@SavvasMel SavvasMel reopened this Jun 11, 2026
@SavvasMel SavvasMel force-pushed the SavvasMel/develop/timeseries branch from 6c0ea7b to 52d66e8 Compare June 11, 2026 10:42

@iluise iluise 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.

Approving it, Savvas can you add the plot_timeseries flag to the config?

I tested it on ATOS and I get these warnings:

In a future version of xarray the default value for coords will change from coords='different' to coords='minimal'. This is likely to lead to different results when multiple datasets have matching variables with overlapping values. To opt in to new defaults and get rid of these warnings now use `set_options(use_new_combine_kwarg_defaults=True) or set coords explicitly.
  xr.concat(preds_steps, dim="forecast_step"),
/etc/ecmwf/nfs/dh2_home_a/ecm9336/WeatherGenerator/packages/evaluate/src/weathergen/evaluate/plotting/timeseries.py:58: FutureWarning: In a future version of xarray the default value for coords will change from coords='different' to coords='minimal'. This is likely to lead to different results when multiple datasets have matching variables with overlapping values. To opt in to new defaults and get rid of these warnings now use `set_options(use_new_combine_kwarg_defaults=True) or set coords explicitly.
  xr.concat(preds_steps, dim="forecast_step"),
/etc/ecmwf/nfs/dh2_home_a/ecm9336/WeatherGenerator/packages/evaluate/src/weathergen/evaluate/plotting/timeseries.py:59: FutureWarning: In a future version of xarray the default value for coords will change from coords='different' to coords='minimal'. This is likely to lead to different results when multiple datasets have matching variables with overlapping values. To opt in to new defaults and get rid of these warnings now use `set_options(use_new_combine_kwarg_defaults=True) or set coords explicitly.
  xr.concat(tars_steps, dim="forecast_step"),
/etc/ecmwf/nfs/dh2_home_a/ecm9336/WeatherGenerator/packages/evaluate/src/weathergen/evaluate/plotting/timeseries.py:59: FutureWarning: In a future version of xarray the default value for coords will change from coords='different' to coords='minimal'. This is likely to lead to different results when multiple datasets have matching variables with overlapping values. To opt in to new defaults and get rid of these warnings now use `set_options(use_new_combine_kwarg_defaults=True) or set coords explicitly.
  xr.concat(tars_steps, dim="forecast_step"),
[Parallel(n_jobs=2)]: Done 2 out of 2 | elapsed:    4.8s finished

Can you take a look?

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.

Plot 1D timeseries plots of channels

2 participants