Skip to content

Commit

Permalink
One tutorial for all models; fix aromepi indicators
Browse files Browse the repository at this point in the history
  • Loading branch information
GratienDSX committed Jan 31, 2025
1 parent c1be1f6 commit 774d5e8
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 211 deletions.
3 changes: 0 additions & 3 deletions src/meteole/_arome_instantane.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
"BRIGHTNESS_TEMPERATURE__GROUND_OR_WATER_SURFACE",
"CONVECTIVE_AVAILABLE_POTENTIAL_ENERGY__GROUND_OR_WATER_SURFACE",
"DIAG_GRELE__GROUND_OR_WATER_SURFACE",
"TOTAL_WATER_PRECIPITATION__GROUND_OR_WATER_SURFACE",
"WIND_SPEED_GUST_15MIN__SPECIFIC_HEIGHT_LEVEL_ABOVE_GROUND",
"WIND_SPEED_MAXIMUM_GUST__SPECIFIC_HEIGHT_LEVEL_ABOVE_GROUND",
"WIND_SPEED_GUST__SPECIFIC_HEIGHT_LEVEL_ABOVE_GROUND",
"RELATIVE_HUMIDITY__SPECIFIC_HEIGHT_LEVEL_ABOVE_GROUND",
"MOCON__GROUND_OR_WATER_SURFACE",
Expand Down
185 changes: 0 additions & 185 deletions tutorial/Fetch_PIAF_forecasts.ipynb

This file was deleted.

8 changes: 3 additions & 5 deletions tutorial/Fetch_forecast_for_multiple_indicators.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"source": [
"import random\n",
"\n",
"from meteole import ArpegeForecast"
"from meteole import ArpegeForecast # or AromeForecast, AromePIForecast"
]
},
{
Expand Down Expand Up @@ -60,9 +60,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Init Client Arpege\n",
"\n",
"To get Arome Forecast, import `AromeForecast`"
"## Init Client"
]
},
{
Expand All @@ -71,7 +69,7 @@
"metadata": {},
"outputs": [],
"source": [
"client = ArpegeForecast(application_id=APP_ID)"
"client = ArpegeForecast(application_id=APP_ID) # or AromeForecast, AromePIForecast"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"source": [
"import random\n",
"\n",
"from meteole import AromeForecast"
"from meteole import PiafForecast # or ArpegeForecast, PiafForecast, AromePIForecast"
]
},
{
Expand Down Expand Up @@ -59,9 +59,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Init Client Arome\n",
"\n",
"To get Arome Forecast, import `AromeForecast`"
"## Init Client"
]
},
{
Expand All @@ -71,7 +69,7 @@
"outputs": [],
"source": [
"# init client\n",
"arome = AromeForecast(application_id=APP_ID)"
"client = PiafForecast(application_id=APP_ID) # or ArpegeForecast, PiafForecast, AromePIForecast"
]
},
{
Expand All @@ -81,7 +79,7 @@
"outputs": [],
"source": [
"# pick a random indicator\n",
"random_indicator = random.choice(arome.INDICATORS)\n",
"random_indicator = random.choice(client.INDICATORS)\n",
"print(f\"Indicator: {random_indicator}\")"
]
},
Expand All @@ -91,7 +89,7 @@
"metadata": {},
"outputs": [],
"source": [
"arome.INDICATORS"
"client.INDICATORS"
]
},
{
Expand All @@ -107,7 +105,7 @@
"metadata": {},
"outputs": [],
"source": [
"arome.get_coverage(random_indicator)"
"client.get_coverage(random_indicator)"
]
},
{
Expand All @@ -126,7 +124,7 @@
"outputs": [],
"source": [
"# First parameters to create a coverage_id (run and interval)\n",
"df_capabilities = arome.get_capabilities()\n",
"df_capabilities = client.get_capabilities()\n",
"\n",
"list_run_valid = list(df_capabilities[df_capabilities[\"indicator\"] == random_indicator][\"run\"].unique())\n",
"list_interval_valid = list(df_capabilities[df_capabilities[\"indicator\"] == random_indicator][\"interval\"].unique())\n",
Expand All @@ -140,19 +138,12 @@
"outputs": [],
"source": [
"# Then other parameters from a coverage_id\n",
"description = arome.get_coverage_description(list_coverage_id_valid[0])\n",
"description = client.get_coverage_description(list_coverage_id_valid[0])\n",
"\n",
"list_forecast_horizons_valid = description.get(\"forecast_horizons\", [])\n",
"list_height_valid = description.get(\"heights\", [])\n",
"list_pressure_id_valid = description.get(\"pressures\", [])"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand All @@ -171,7 +162,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.11"
"version": "undefined.undefined.undefined"
},
"toc": {
"base_numbering": 1,
Expand Down

0 comments on commit 774d5e8

Please sign in to comment.