You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Plots the power spectrum of the analysis increments
Adapted code for power spectra
for use with the WeatherGenerator model:
uv run packages/evaluate/src/weathergen/evaluate/example_extras/power_spectra/psd_main.py --run-id gn3gotvh --export-dir /p/home/jusers/owens1/juwels/WeatherGen/gn3gotvh --output-dir /p/home/jusers/owens1/juwels/WeatherGen/gn3gotvh/power_spectra
OR
uv run packages/evaluate/src/weathergen/evaluate/example_extras/power_spectra/psd_main.py --config packages/evaluate/src/weathergen/evaluate/example_extras/power_spectra/psd_config.yml
Please export the inference into a regular gridded netcdf first using the export package:
e.g. uv run export --run-id <INFERENCE_ID> --stream ERA5 --output-dir ../output_nc --format netcdf --regrid-degree 1 --regrid-type regular_ll
Please export the inference into a regular gridded netcdf first using the export package: e.g. uv run export --run-id <INFERENCE_ID> --stream ERA5 --output-dir ../output_nc --format netcdf --regrid-degree 1 --regrid-type regular_ll
Does this also work if we regrid to regular 0.25 deg grid (e.g. when we work with the full resolution ERA5)?
Prerequisties:
Please export the inference into a regular gridded netcdf first using the export package: e.g. uv run export --run-id <INFERENCE_ID> --stream ERA5 --output-dir ../output_nc --format netcdf --regrid-degree 1 --regrid-type regular_ll
Does this also work if we regrid to regular 0.25 deg grid (e.g. when we work with the full resolution ERA5)?
Yes, it's possible to make it a 0.25 degree:
uv run export --run-id bhwuev7l --stream ERA5 --output-dir ../output_nc_bhwuev7l --format netcdf --regrid-degree 0.25 --regrid-type regular_ll --type prediction target
2026-02-06 10:48:00,930 - weathergen.evaluate.export.export_inference - INFO - {'run_id': 'bhwuev7l', 'type': ['prediction', 'target'], 'output_dir': '../output_nc_bhwuev7l', 'output_format': 'netcdf', 'stream': 'ERA5', 'fsteps': None, 'samples': None, 'channels': None, 'n_processes': 8, 'fstep_hours': 6, 'epoch': 0, 'rank': 0, 'quaver_template_folder': None, 'quaver_template_grid_type': 'O96', 'expver': None, 'regrid_degree': 0.25, 'regrid_type': 'regular_ll'}
2026-02-06 10:48:00,931 - weathergen.evaluate.export.export_inference - INFO - Starting processing prediction for run ID bhwuev7l. Detected None samples and None forecast steps.
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [01:11<00:00, 35.74s/it]
2026-02-06 10:49:14,274 - weathergen.evaluate.export.export_inference - INFO - Finished processing prediction for run ID bhwuev7l.
2026-02-06 10:49:14,274 - weathergen.evaluate.export.export_inference - INFO - Starting processing target for run ID bhwuev7l. Detected None samples and None forecast steps.
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [01:08<00:00, 34.26s/it]
2026-02-06 10:50:23,658 - weathergen.evaluate.export.export_inference - INFO - Finished processing target for run ID bhwuev7l.
It takes a bit longer to run the export than for 1 degree. But then you can generate the power spectra in the same way:
to investigate: default which relies on using _REPO_ROOT now doesn't point to the symlinked home repo but instead to the uv_cache_shared i.e. 'output_dir': PosixPath('/p/project1/weatherai/uv_cache_shared/environments-v2/psd-main-e0f8ffb71655b6d4/plots/power_spectra')
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Plots the power spectrum of the analysis increments
Adapted code for power spectra
for use with the WeatherGenerator model:
uv run packages/evaluate/src/weathergen/evaluate/example_extras/power_spectra/psd_main.py --run-id gn3gotvh --export-dir /p/home/jusers/owens1/juwels/WeatherGen/gn3gotvh --output-dir /p/home/jusers/owens1/juwels/WeatherGen/gn3gotvh/power_spectraOR
uv run packages/evaluate/src/weathergen/evaluate/example_extras/power_spectra/psd_main.py --config packages/evaluate/src/weathergen/evaluate/example_extras/power_spectra/psd_config.ymlSee design doc for more info: here
Issue Number
Closes #1710
Checklist before asking for review
./scripts/actions.sh lint./scripts/actions.sh unit-test./scripts/actions.sh integration-testlaunch-slurm.py --time 60