Skip to content

Conversation

@14renus
Copy link
Collaborator

@14renus 14renus commented Aug 11, 2025

add spatial_mse to DeterministicMetrics:
eval_multistep.py supports

  • Era5DeterministicMetrics
  • running on multistep=1 (no prediction_timedelta dimension)

@14renus 14renus requested a review from a team as a code owner August 11, 2025 19:54
@14renus 14renus requested a review from gcouairon August 11, 2025 20:05
@14renus 14renus force-pushed the feature/add_spatial_rmse branch from bd66376 to 2d51778 Compare August 13, 2025 17:13
* Added flexibility for more variables. Added normalization statistics from graphcast as json files, refactored metrics, datasets and tests as well as lightning modules. The latter have to account for nans in the data when including sea-ice-fraction and others

* Added code to zero out NaNs in ground truth values for loss calculation

* Renamed stats to norm, changed variable output for label wrapper, applied changes to configs

* Removed import that causes error

* Replaced norm scheme in graphcast statsconfig

* Fixed bug in load_module due to missing stats_cfg and changed behaviour of to_xarray routines to account for levels

* Added softlinks recommended by geoarches doc to .gitignore and removed pushed softlinks

* Addressed issues with paramaters interpolate_nans and warning_on_nans

* Added tensordict utility to test predictions for NaNs

* Added documentation to the normalization module, changed name of norm file and norm module according to reviews, adapted norm files

* Changes loss_coffs to compute_loss_coeffs_args for clarity, added test for graphcast stats

* Added dimension names of the dataset as arguments for the dataloaders, added comment to test of era5 loaders with graphcast norm scheme

* Fixed Bug in dcpp test due to missing dimension names

* Added more flexibility for data naming (either names have leading zeros or not)

* Refactored code to use dimension indexers for selecting dimensions and converting between tensordict and xarray, modified tests

* Fixed bug with multistep rollout due to missing next-states, added torch.int64 to allow dates after 2038

* Changed behaviour of dimension indexers, added description, adapted eval_multistep and test files

* fixed format problems

---------

Co-authored-by: Renu Singh <[email protected]>
@14renus 14renus force-pushed the feature/add_spatial_rmse branch from 2d51778 to 3255e23 Compare August 15, 2025 14:17
@14renus 14renus requested a review from robert-DL as a code owner August 15, 2025 14:17
@14renus 14renus force-pushed the feature/add_spatial_rmse branch 4 times, most recently from 8fd6795 to c326000 Compare August 15, 2025 18:19
@14renus 14renus force-pushed the feature/add_spatial_rmse branch from c326000 to 49f4b02 Compare August 18, 2025 09:47
@14renus 14renus force-pushed the feature/add_spatial_rmse branch 2 times, most recently from dcee04d to f1a69a1 Compare August 19, 2025 12:20
@14renus 14renus force-pushed the feature/add_spatial_rmse branch from f1a69a1 to fce4efa Compare August 19, 2025 12:28
cmap="plasma",
origin="upper",
extent=[-180, 180, -90, 90],
transform=ccrs.PlateCarree(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Robinson gives the curved projection, but matter of taste


spatial_datas = []
for base_dir in base_dirs:
spatial_data = torch.load(
Copy link
Collaborator

Choose a reason for hiding this comment

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

To be consistent, I would argue that deciding for a storage format, e.g. netcdf, seems desirable to me.

Copy link
Collaborator

@robert-DL robert-DL left a comment

Choose a reason for hiding this comment

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

Just minor comments. If we agree on the changes, we can do them in a separate merge request

fig = plt.figure(figsize=(4, 2))
num_plots = len(spatial_datas)
fig, axes = plt.subplots(
1, num_plots, figsize=(6 * num_plots, 5), subplot_kw={"projection": ccrs.PlateCarree()}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think single plots are better, one can align them later in latex files

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.

3 participants