diff --git a/notebooks/01-ref-concepts.ipynb b/notebooks/01-ref-concepts.ipynb index b356184..8d6e0ad 100644 --- a/notebooks/01-ref-concepts.ipynb +++ b/notebooks/01-ref-concepts.ipynb @@ -193,7 +193,7 @@ "The REF tracks which datasets are available and which diagnostics have already been run.\n", "\n", "For the public API we do not handle raw CMIP6 datasets directly the evaluations have already\n", - "been run. We will see locally fetched datasets in notebook 04." + "been run. We will see locally fetched datasets in notebook 04. ~mikapfl: I don't undestand what this means" ] }, { diff --git a/notebooks/02-querying-the-api.ipynb b/notebooks/02-querying-the-api.ipynb index 4802d57..2779870 100644 --- a/notebooks/02-querying-the-api.ipynb +++ b/notebooks/02-querying-the-api.ipynb @@ -25,8 +25,7 @@ "The REF API is documented with an [OpenAPI](https://www.openapis.org) schema.\n", "You can browse the interactive docs at .\n", "\n", - "The `climate_ref_client` package is *generated* from that schema (see `scripts/generate_client.sh`). \n", - "The `ref_tutorials` helper builds a client for us:" + "The `ref_tutorials` helper from `climate_ref_client` package builds a client for us:" ] }, { @@ -871,15 +870,14 @@ "from climate_ref_client.api.diagnostics import diagnostics_list_metric_values\n", "from climate_ref_client.models.metric_value_type import MetricValueType\n", "\n", - "diagnostic = next(d for d in diagnostics if d.execution_groups)\n", - "\n", - "values = diagnostics_list_metric_values.sync(\n", - " diagnostic.provider.slug,\n", - " diagnostic.slug,\n", + "result = diagnostics_list_metric_values.sync(\n", + " provider_slug=\"esmvaltool\",\n", + " diagnostic_slug=\"climate-at-global-warming-levels\",\n", " value_type=MetricValueType.SCALAR,\n", " client=client,\n", - ").data\n", - "print(f\"{diagnostic.name}: {len(values)} scalar metric values\")\n", + ")\n", + "values = result.data\n", + "print(f\"Climate at Global Warming Levels: {len(values)} scalar metric values\")\n", "values[0]" ] }, @@ -889,7 +887,8 @@ "metadata": {}, "source": [ "Raw metric values are awkward to work with. The `ref_tutorials` helper flattens them\n", - "into a tidy `pandas.DataFrame` — one column per dimension, plus a `value` column:" + "into a tidy `pandas.DataFrame` — one column per dimension, plus a `value` column:", + "# ~mikapfl: I don't understand *what* is exceeded in the exceedance year - how would I find out?" ] }, { diff --git a/notebooks/04-local-diagnostic-run.ipynb b/notebooks/04-local-diagnostic-run.ipynb index 59891ac..179a68d 100644 --- a/notebooks/04-local-diagnostic-run.ipynb +++ b/notebooks/04-local-diagnostic-run.ipynb @@ -355,7 +355,8 @@ "from ref_tutorials import fetch_sample_data\n", "\n", "sample_data_dir = fetch_sample_data()\n", - "sample_data_dir" + "sample_data_dir\n", + "# ~mikapfl: the logging from fetching the data absolutely kills firefox, Not reasonable, but that's what happens. Can we suppress the logging or so?" ] }, { @@ -1112,7 +1113,8 @@ "import json\n", "\n", "output_file = definition.to_output_path(\"output.json\")\n", - "print(json.dumps(json.loads(output_file.read_text()), indent=2)[:2000])" + "print(json.dumps(json.loads(output_file.read_text()), indent=2)[:2000])\n", + "# ~mikapfl: would be nice to show one of the plots." ] }, {