Skip to content

Commit cc002dd

Browse files
committed
fix: update notebooks
1 parent 93c0bb9 commit cc002dd

4 files changed

Lines changed: 1812 additions & 404 deletions

File tree

notebooks/01-ref-concepts.ipynb

Lines changed: 49 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,11 @@
88
"# 01 — REF concepts\n",
99
"\n",
1010
"This notebook introduces the core vocabulary of the **Rapid Evaluation Framework (REF)**.\n",
11-
"By the end you will know what a *diagnostic*, *provider*, *execution*, *metric* and *dataset* are,\n",
12-
"and how they fit together.\n",
11+
"By the end you will know what a *diagnostic*, *provider*, *execution*, *metric* and *dataset* are, and how they fit together.\n",
1312
"\n",
1413
"**Prerequisites:** none. This is the place to start.\n",
1514
"\n",
16-
"**What you need:** an internet connection we read live examples from the public REF API."
15+
"**What you need:** an internet connection as we read from the public REF API."
1716
]
1817
},
1918
{
@@ -23,20 +22,22 @@
2322
"source": [
2423
"## What is the REF?\n",
2524
"\n",
26-
"The REF runs calculations against climate datasets, much like a CI/CD pipeline runs tests\n",
27-
"against code. As new climate model output is published, the REF evaluates it against\n",
28-
"reference data and produces figures and metrics — in near-real time.\n",
25+
"The REF performs evaluation of climate datasets, much like a CI/CD pipeline runs tests against code. \n",
26+
"As new climate model output is published, the REF evaluates it against reference data \n",
27+
"and produces figures and metrics — in near-real time.\n",
2928
"\n",
30-
"The public deployment evaluates CMIP7 Assessment Fast Track data. Its results are served\n",
31-
"from a website (<https://climate-ref.org>) and a public API (<https://api.climate-ref.org>).\n",
29+
"The public deployment currently evaluates CMIP6 dataset, but will include CMIP7 Assessment Fast Track data\n",
30+
"as they become available.\n",
31+
"Results are served from a website (<https://dashboard.climate-ref.org>) and a public API (<https://api.climate-ref.org>).\n",
3232
"\n",
33-
"Throughout these notebooks we talk to that API. The `ref_tutorials` helper package (shipped\n",
34-
"with this repository) builds the API client for us:"
33+
"Throughout these notebooks we talk to the API via an \"SDK\".\n",
34+
"This SDK allows us to make requests to the API without having to directly make HTTP requests.\n",
35+
"The `ref_tutorials` helper package (shipped with this repository) builds the API client for us."
3536
]
3637
},
3738
{
3839
"cell_type": "code",
39-
"execution_count": 1,
40+
"execution_count": 2,
4041
"id": "05ac27ad",
4142
"metadata": {},
4243
"outputs": [
@@ -46,7 +47,7 @@
4647
"Client(raise_on_unexpected_status=False, _base_url='https://api.climate-ref.org', _cookies={}, _headers={}, _timeout=None, _verify_ssl=True, _follow_redirects=False, _httpx_args={}, _client=None, _async_client=None)"
4748
]
4849
},
49-
"execution_count": 1,
50+
"execution_count": 2,
5051
"metadata": {},
5152
"output_type": "execute_result"
5253
}
@@ -65,15 +66,15 @@
6566
"source": [
6667
"## Diagnostics\n",
6768
"\n",
68-
"A **diagnostic** is a single, well-defined evaluation — for example \"the global mean\n",
69-
"surface temperature timeseries\" or \"the Atlantic overturning circulation strength\".\n",
69+
"A **diagnostic** is a single, well-defined evaluation to understand a component of the earth system.\n",
70+
"For example \"the global mean surface temperature timeseries\" or \"the Atlantic overturning circulation strength\".\n",
7071
"\n",
7172
"Let's list the diagnostics the REF currently provides:"
7273
]
7374
},
7475
{
7576
"cell_type": "code",
76-
"execution_count": 2,
77+
"execution_count": 3,
7778
"id": "8196f36e",
7879
"metadata": {},
7980
"outputs": [
@@ -116,7 +117,7 @@
116117
},
117118
{
118119
"cell_type": "code",
119-
"execution_count": 3,
120+
"execution_count": 4,
120121
"id": "3389ca04",
121122
"metadata": {},
122123
"outputs": [
@@ -144,16 +145,23 @@
144145
"source": [
145146
"## Providers\n",
146147
"\n",
147-
"Diagnostics are grouped into **providers**. A provider is a package that knows how to\n",
148-
"compute a family of diagnostics — examples include ESMValTool, the PCMDI Metrics Package\n",
149-
"(PMP), and ILAMB. The REF orchestrates providers; it does not compute diagnostics itself.\n",
148+
"Diagnostics are grouped into **providers**. A **provider** is a package that knows how to compute a family of diagnostics.\n",
149+
"\n",
150+
"For the Assessment Fast Track we use:\n",
151+
"\n",
152+
"- ESMValTool\n",
153+
"- PCMDI Metrics Package (PMP)\n",
154+
"- ILAMB/IOMB\n",
155+
"\n",
156+
"The REF orchestrates providers and does not compute diagnostics itself.\n",
157+
"Each provider is a thin wrapper around the upstream diagnostics package.\n",
150158
"\n",
151159
"Each diagnostic tells you which provider it belongs to:"
152160
]
153161
},
154162
{
155163
"cell_type": "code",
156-
"execution_count": 4,
164+
"execution_count": 5,
157165
"id": "45bfc188",
158166
"metadata": {},
159167
"outputs": [
@@ -181,11 +189,10 @@
181189
"source": [
182190
"## Datasets\n",
183191
"\n",
184-
"A diagnostic needs **datasets** to run against: the climate model output under evaluation,\n",
185-
"and the reference (often observational) data it is compared to. The REF tracks which\n",
186-
"datasets are available and which combinations a diagnostic requires.\n",
192+
"A diagnostic needs **datasets** to run against: the climate model output under evaluation, and the reference data it is compared to.\n",
193+
"The REF tracks which datasets are available and which diagnostics have already been run.\n",
187194
"\n",
188-
"For the public API we do not handle raw datasets directly the evaluations have already\n",
195+
"For the public API we do not handle raw CMIP6 datasets directly the evaluations have already\n",
189196
"been run. We will see locally fetched datasets in notebook 04."
190197
]
191198
},
@@ -197,15 +204,17 @@
197204
"## Executions\n",
198205
"\n",
199206
"An **execution** is one run of a diagnostic against one specific group of datasets.\n",
200-
"A single diagnostic is typically executed many times — once per model, experiment, or\n",
201-
"scenario — so it has many executions, organised into *execution groups*.\n",
207+
"\n",
208+
"A single diagnostic is typically executed many times. This generally depends what is being calculated, but this is often once per model variant.\n",
209+
"Each of these individual groups is an *execution group*.\n",
210+
"If any datasets in an execution group change, then a new execution is performed.\n",
202211
"\n",
203212
"Here are the execution groups of one diagnostic:"
204213
]
205214
},
206215
{
207216
"cell_type": "code",
208-
"execution_count": 5,
217+
"execution_count": 6,
209218
"id": "e06e64b8",
210219
"metadata": {},
211220
"outputs": [
@@ -233,13 +242,14 @@
233242
"\n",
234243
"An execution produces output. That output comes in two main shapes:\n",
235244
"\n",
236-
"- **Metric values** — numbers that summarise a property of a model. A *scalar* is a single\n",
237-
" number (e.g. a root-mean-square error); a *series* is a number per index point\n",
245+
"- **Metric values** — numbers that summarise a property of a model. \n",
246+
" A *scalar* is a single number (e.g. a root-mean-square error) or a *series* is a number per index point\n",
238247
" (e.g. a seasonal cycle).\n",
239248
"- **Files** — NetCDF data and figures for deeper analysis or custom plotting.\n",
240249
"\n",
241-
"Notebook 02 shows how to retrieve metric values, and notebook 03 turns them into a\n",
242-
"publication-ready figure."
250+
"The REF ingests all of these outputs into its database so they can be queried by the API.\n",
251+
"\n",
252+
"Notebook 02 shows how to retrieve metric values, and notebook 03 turns them into a figure."
243253
]
244254
},
245255
{
@@ -249,13 +259,13 @@
249259
"source": [
250260
"## Recap\n",
251261
"\n",
252-
"| Term | Meaning |\n",
253-
"|------|---------|\n",
254-
"| **Provider** | A package that computes a family of diagnostics (ESMValTool, PMP, ILAMB, ...) |\n",
255-
"| **Diagnostic** | A single well-defined evaluation |\n",
256-
"| **Dataset** | Climate model output or reference data a diagnostic runs against |\n",
257-
"| **Execution** | One run of a diagnostic against one group of datasets |\n",
258-
"| **Metric value** | A scalar or series result summarising a model |\n",
262+
"| Term | Meaning |\n",
263+
"| ------------------- | ----------------------------------------------------------------------------- |\n",
264+
"| **Provider** | A package that computes a family of diagnostics (ESMValTool, PMP, ILAMB, ...) |\n",
265+
"| **Diagnostic** | A single well-defined evaluation |\n",
266+
"| **Dataset** | Climate model output or reference data a diagnostic runs against |\n",
267+
"| **Execution** | One run of a diagnostic against one group of datasets |\n",
268+
"| **Metric value** | A scalar or series result summarising a model |\n",
259269
"\n",
260270
"**Next:** [02 — Querying the REF API](02-querying-the-api.ipynb)."
261271
]
@@ -271,7 +281,7 @@
271281
],
272282
"metadata": {
273283
"kernelspec": {
274-
"display_name": "Python 3 (ipykernel)",
284+
"display_name": "climate-ref-tutorials (3.14.4)",
275285
"language": "python",
276286
"name": "python3"
277287
},

0 commit comments

Comments
 (0)