Skip to content

Commit

Permalink
Revert changes to HRES T0 notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
wesselb committed Sep 15, 2024
1 parent 3fa5c47 commit 5ee8f7c
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions docs/example_hres_t0.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,17 @@
"source": [
"## Downloading Static Variables from ERA5 Data\n",
"\n",
"The static variables are not available in WeatherBench2, so we need to download them from ERA5, just like we did [in the example for ERA5](example_era5.ipynb#downloading-the-data).\n",
"To do so, register an account with the [Climate Data Store](https://cds.climate.copernicus.eu/) and create `$HOME/.cdsapirc` with the following content:\n",
"The static variables are not available in WeatherBench2, so we need to download them from ERA5, just like we did [in the example for ERA5](example_era5#downloading-the-data).\n",
"To do so, register an account with the [Climate Data Store](https://cds-beta.climate.copernicus.eu/) and create `$HOME/.cdsapirc` with the following content:\n",
"\n",
"```\n",
"url: https://cds.climate.copernicus.eu/api/v2\n",
"key: <UID>:<API key>\n",
"url: https://cds-beta.climate.copernicus.eu/api\n",
"key: <API key>\n",
"```\n",
"\n",
"You can find your UID and API key on your account page."
"You can find your API key on your account page.\n",
"\n",
"In order to be able to download ERA5 data, you need to accept the terms of use in the [dataset page](https://cds-beta.climate.copernicus.eu/datasets/reanalysis-era5-single-levels?tab=download)."
]
},
{
Expand Down Expand Up @@ -220,8 +222,8 @@
" # Converting to `datetime64[s]` ensures that the output of `tolist()` gives\n",
" # `datetime.datetime`s. Note that this needs to be a tuple of length one:\n",
" # one value for every batch element.\n",
" time=(surf_vars_ds.time.values.astype(\"datetime64[s]\").tolist()[i],),\n",
" atmos_levels=tuple(int(level) for level in atmos_vars_ds.level.values),\n",
" time=(surf_vars_ds.valid_time.values.astype(\"datetime64[s]\").tolist()[i],),\n",
" atmos_levels=tuple(int(level) for level in atmos_vars_ds.pressure_level.values),\n",
" ),\n",
")"
]
Expand All @@ -246,7 +248,7 @@
"from aurora import Aurora, rollout\n",
"\n",
"model = Aurora()\n",
"model.load_checkpoint(\"wbruinsma/aurora\", \"aurora-0.25-finetuned.ckpt\")\n",
"model.load_checkpoint(\"microsoft/aurora\", \"aurora-0.25-finetuned.ckpt\")\n",
"\n",
"model.eval()\n",
"model = model.to(\"cuda\")\n",
Expand Down

0 comments on commit 5ee8f7c

Please sign in to comment.