{
"cells": [
{
"cell_type": "markdown",
"id": "4d88ed3b",
"metadata": {},
"source": [
""
]
},
{
"cell_type": "markdown",
"id": "3d236c61",
"metadata": {},
"source": [
"
"
]
},
{
"cell_type": "markdown",
"id": "fd5dbf9e",
"metadata": {},
"source": [
"# Seasonal Forecast Verification"
]
},
{
"cell_type": "markdown",
"id": "88d5a2a8",
"metadata": {},
"source": [
"### About"
]
},
{
"cell_type": "markdown",
"id": "ddb2c373",
"metadata": {},
"source": [
"This notebook provides a practical introduction on how to produce some verification metrics and scores for seasonal forecasts with data from the Copernicus Climate Change Service (C3S). C3S seasonal forecast products are based on data from several state-of-the-art seasonal prediction systems. In this notebook, as an example, we will focus on data produced by [CMCC SPSv3.5 system](https://confluence.ecmwf.int/display/CKB/Description+of+CMCC-CM2-v20191201+C3S+contribution), which is one of the forecasting systems available through C3S.\n",
"\n",
"The tutorial will demonstrate how to access retrospective forecast (hindcast) data of 2-metre temperature initialized in the period 1993-2016, with a forecast start date in the 1st of March. All these forecasts are 6 months long (from March to August). More details about the role of the hindcasts can be found in [this Copernicus Knowledge Base article](https://confluence.ecmwf.int/display/CKB/Seasonal+forecasts+and+the+Copernicus+Climate+Change+Service). Observation data (ERA5 reanalysis) for the same reference period, 1993 to 2016, and the same months will also be obtained from the CDS. The tutorial will then show how to compute some deterministic products (anomalies) and some probabilistic products (probabilities for tercile categories). In addition to the 1-month average data retrieved from the CDS, 3-months aggregations will be also produced. Finally, verification metrics (correlation, area under the ROC curve, and RPS) will be calculated and visualised in a set of plots."
]
},
{
"cell_type": "markdown",
"id": "07976f3e",
"metadata": {},
"source": [
"The notebook has the following outline:\n",
"* 1 - Request data from the CDS using CDS API\n",
" * 1a - Retrieve hindcast data\n",
" * 1b - Retrieve observations data (ERA5) \n",
"* 2 - Compute deterministic and probabilistic products from the hindcast data\n",
" * 2a - Anomalies\n",
" * 2b - Probabilities for tercile categories\n",
"* 3 - Compute deterministic and probabilistic scores\n",
" * 3a - Read observations data into a xr.Dataset\n",
" * 3b - Compute deterministic scores\n",
" * 3c - Compute probabilistic scores for tercile categories\n",
"* 4 - Visualize verification plots\n",
"\n",
" "
]
},
{
"cell_type": "markdown",
"id": "e82da11c",
"metadata": {},
"source": [
"Please see here the full documentation of the [C3S Seasonal Forecast Datasets](https://confluence.ecmwf.int/display/CKB/C3S+Seasonal+Forecasts%3A+datasets+documentation). This notebook will use data from the CDS dataset [seasonal forecast monthly statistics on single levels](https://cds.climate.copernicus.eu/cdsapp#!/dataset/seasonal-monthly-single-levels?tab=overview) (as opposed to multiple levels in the atmosphere)."
]
},
{
"cell_type": "markdown",
"id": "372e33e2",
"metadata": {},
"source": [
"
Show API request
icon, which allows to copy-paste a snippet of code equivalent to the one used below.xarray/cfgrib
keywords for the real start date of each member (time
) and for the nominal start date (indexing_time
) which is the one we would need to use for those systems initializing their members with a lagged start date approach.\n",
" The following line of code will take care of that as long as we include the value config['isLagged']=True
in the config dictionary as defined in section 1.\n",
"number
in the hindcast xr.Dataset
object will indicate we have a full ensemble (or an ensemble mean).