Skip to content

Commit

Permalink
Add notebook for HRES 0.1 deg predictions (#9)
Browse files Browse the repository at this point in the history
* Fix link to ERA5 notebook.

* Added util.py file for notebooks

* Added notebook for 0.1 model

* Typo

* Typo.

* Fix util.py

* Update pre-commit

* Fix docstrings.

* Adjust filenames

* Fixed imports

* Added function to download static vars from RDA

* Added function to download static vars from RDA

* Updated 0.1deg notebook

* Fix link to ERA5 notebook in HRES T0 notebook

* Clean up 0.1 notebook

* Add regridding

* RM

* v2

* Add notebook

* Fix

* Rm interpolate function

* Update notebook

* Fix

* Revert changes to HRES T0 notebook

* Simplify data loading

* Run notebook

* Add warning about adjustment of statistics

---------

Co-authored-by: Wessel Bruinsma <[email protected]>
  • Loading branch information
a-lucic and wesselb authored Sep 15, 2024
1 parent 00a1a7a commit a3a0c44
Show file tree
Hide file tree
Showing 3 changed files with 298 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,5 @@ repos:
rev: "v1.11.0"
hooks:
- id: mypy
additional_dependencies:
- "types-requests"
9 changes: 9 additions & 0 deletions aurora/model/aurora.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import contextlib
import dataclasses
import warnings
from datetime import timedelta
from functools import partial
from typing import Optional
Expand Down Expand Up @@ -112,6 +113,14 @@ def __init__(
self.surf_stats = surf_stats or dict()
self.autocast = autocast

if self.surf_stats:
warnings.warn(
f"The normalisation statics for the following surface-level variables are manually "
f"adjusted: {', '.join(sorted(self.surf_stats.keys()))}. "
f"Please ensure that this is right!",
stacklevel=2,
)

self.encoder = Perceiver3DEncoder(
surf_vars=surf_vars,
static_vars=static_vars,
Expand Down
287 changes: 287 additions & 0 deletions docs/example_hres_0.1.ipynb

Large diffs are not rendered by default.

0 comments on commit a3a0c44

Please sign in to comment.