Skip to content

Aurora Atmospheric/Weather Forecasting Models #2823

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

isaaccorley
Copy link
Collaborator

@isaaccorley isaaccorley commented Jun 7, 2025

Adding the Aurora Atmospheric/Weather Forecasting models from https://github.com/microsoft/aurora!

See their docs and paper for more info!

cc: @wesselb @crisbodnar @megstanley

@github-actions github-actions bot added documentation Improvements or additions to documentation models Models and pretrained weights testing Continuous integration testing dependencies Packaging and dependencies labels Jun 7, 2025
model = aurora.Aurora(*args, **kwargs)
else:
model = getattr(aurora, weights.meta['model'])(*args, **kwargs)
model.load_checkpoint()
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This still needs some work because the aurora package automatically downloads the checkpoint from huggingface however it downloads from main and we want to download from a commit hash.

)


def aurora_swin_unet(
Copy link
Collaborator Author

@isaaccorley isaaccorley Jun 7, 2025

Choose a reason for hiding this comment

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

Not sure how to name this because the package is named aurora so I can't also name the model aurora. Any suggestions on this @adamjstewart?

@@ -0,0 +1,57 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Don't review this yet because this entire script needs to be revamped to load dummy test data as xarray.

@@ -106,6 +106,9 @@ datasets = [
# xarray 0.12.3+ required for pandas 1.3.3 support
"xarray>=0.12.3",
]
models = [
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@adamjstewart I added this new extras group but not sure if I'm missing something else in the repo that I need to update as well.

@isaaccorley isaaccorley requested review from Copilot, adamjstewart and calebrob6 and removed request for Copilot and adamjstewart June 7, 2025 20:10
@isaaccorley isaaccorley removed the models Models and pretrained weights label Jun 7, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces the Aurora Climate Models into TorchGeo, providing pre-trained weights and a new aurora_swin_unet model function. Key changes include:

  • A new file (torchgeo/models/aurora.py) defining Aurora_Weights and the aurora_swin_unet model with related metadata.
  • Integration of Aurora models into the API (torchgeo/models/api.py, init.py, hubconf.py) and documentation, along with updates to tests and project dependencies.
  • Addition of tests for the Aurora model in tests/models/test_aurora.py.

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
torchgeo/models/aurora.py New Aurora model and weights definitions with metadata and transforms.
torchgeo/models/api.py Included aurora_swin_unet and Aurora_Weights in model registries.
torchgeo/models/init.py Exported the new Aurora API components.
tests/models/test_aurora.py Added tests to validate the Aurora model functionality.
pyproject.toml Updated dependencies to include "microsoft-aurora".
hubconf.py Exposed aurora_swin_unet in the hub configuration.
docs/api/weights/climate.csv Documented Aurora weight configurations.
docs/api/models.rst Updated API documentation to include Aurora models.
Comments suppressed due to low confidence (1)

torchgeo/models/api.py:106

  • [nitpick] Consider adding a comment to clarify why 'aurora_swin_unet' is entered both as a function key and a string key in the _model_weights dictionary. This will help future maintainers understand the intent behind the dual mapping.
'aurora_swin_unet': Aurora_Weights,

@isaaccorley isaaccorley added the models Models and pretrained weights label Jun 7, 2025
@isaaccorley isaaccorley added this to the 0.8.0 milestone Jun 7, 2025
@adamjstewart
Copy link
Collaborator

adamjstewart commented Jun 8, 2025

Last I knew, Aurora only supports medium-range weather forecasting (2 hrs–2 wks), not climate modeling (decadal scale). Would be good to confirm with the authors. We need to be very careful with naming here, as there is a huge distinction between data-driven stateful models and physics-driven statistical distribution models.

@isaaccorley isaaccorley changed the title Aurora Climate Models Aurora Atmospheric Models Jun 8, 2025
@isaaccorley
Copy link
Collaborator Author

Last I knew, Aurora only supports medium-range weather forecasting (2 hrs–2 wks), not climate modeling (decadal scale). Would be good to confirm with the authors. We need to be very careful with naming here, as there is a huge distinction between data-driven stateful models and physics-driven statistical distribution models.

You're correct, the paper specifically says "forecasting of weather and atmospheric processes". I'll make sure to not use the term "climate modeling".

@isaaccorley isaaccorley changed the title Aurora Atmospheric Models Aurora Atmospheric/Weather Forecasting Models Jun 8, 2025
@wesselb
Copy link

wesselb commented Jun 11, 2025

@adamjstewart, @isaaccorley, you're correct that Aurora only does medium-term forecasting (up to 10 days in 6 hour steps). Note, however, that it doesn't just do weather forecasting: we have models for ocean waves and air pollution too.

@adamjstewart adamjstewart mentioned this pull request Jun 11, 2025
56 tasks
@adamjstewart
Copy link
Collaborator

@cnagda can you review?

Copy link

@cnagda cnagda left a comment

Choose a reason for hiding this comment

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

Looks good to me. For load_checkpoint , can we override to use commit hash / have our own version of it in this file?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Filename: atmospheric.csv?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Add column for nowcasting vs. medium-range weather forecasting vs. S2S vs. decadal-scale climate. Could use a key under the table and keys like N/MWF/S2S/C.

Copy link
Collaborator Author

@isaaccorley isaaccorley Jun 20, 2025

Choose a reason for hiding this comment

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

I'm actually not 100% sure but I think these are all going to be nowcasting right since they are only forecasting less than a day out in hours? but you can do it autoregressively so technically you can also do MWF

Copy link
Collaborator Author

@isaaccorley isaaccorley Jun 20, 2025

Choose a reason for hiding this comment

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

Also what do you think the column should be named? Task maybe?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, they're designed for up to 10 days at 6 hr increments, so definitely MWF. Task seems fine.

@isaaccorley
Copy link
Collaborator Author

Looks good to me. For load_checkpoint , can we override to use commit hash / have our own version of it in this file?

Planning to upstream this fix directly to the aurora repo microsoft/aurora#114

@isaaccorley isaaccorley force-pushed the models/aurora-climate branch from ba9a06a to 9821bc1 Compare June 20, 2025 01:57
isaaccorley and others added 2 commits June 24, 2025 14:08
Co-authored-by: Adam J. Stewart <[email protected]>
Co-authored-by: Adam J. Stewart <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Packaging and dependencies documentation Improvements or additions to documentation models Models and pretrained weights testing Continuous integration testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants