diff --git a/notebooks/01a-griddap.ipynb b/notebooks/01a-griddap.ipynb index b4c1f83..94ee236 100644 --- a/notebooks/01a-griddap.ipynb +++ b/notebooks/01a-griddap.ipynb @@ -71,8 +71,7 @@ "CAVEAT: Note that ERDDAP can serve gridded data with longitudes in the 0–360 format or -180–180.\n", "The user must inspect the dataset and modify your query accordingly.\n", "\n", - "Information on the griddap dataset is fetched with `griddap_initialize`.\n", - "This fills in the `variables` and `constraints` properties for that dataset." + "Information on the griddap dataset is fetched automatically and the `variables` and `constraints` properties for that dataset are filled using ERDDAP's defaults." ] }, { @@ -83,10 +82,9 @@ "source": [ "import json\n", "\n", - "e.griddap_initialize()\n", + "constraints = json.dumps(e.constraints, indent=1)\n", "\n", "print(f\"variables in this dataset:\\n\\n{e.variables}\")\n", - "constraints = json.dumps(e.constraints, indent=1)\n", "print(f\"\\nconstraints of this dataset:\\n\\n{constraints}\")" ] }, @@ -94,13 +92,45 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "The default behaviour is to use erddap standard subsetting to return all variables at the most recent timestep and every point of the remaining dimensions.\n", + "ERDDAP's standard subsetting return all variables at the most recent timestep and every point of the remaining dimensions.\n", "\n", "This can result in large data requests!\n", "However, the values of the constraints can be changed and variables dropped before data set is downloaded.\n", "Here we will download only one variable from that list." ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "e.constraints[\"latitude_step\"] = 10\n", + "e.constraints[\"longitude_step\"] = 10\n", + "\n", + "constraints = json.dumps(e.constraints, indent=1)\n", + "print(f\"\\nconstraints of this dataset:\\n\\n{constraints}\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The user can reset to the defaults with `griddap_initialize()`." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "e.griddap_initialize()\n", + "\n", + "constraints = json.dumps(e.constraints, indent=1)\n", + "print(f\"\\nconstraints of this dataset:\\n\\n{constraints}\")" + ] + }, { "cell_type": "code", "execution_count": null, @@ -258,13 +288,6 @@ "e.dataset_id = \"etopo5_lon180\"" ] }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "The data can be downloaded immediately, no need to run `griddap_initialize`\n" - ] - }, { "cell_type": "code", "execution_count": null, @@ -332,7 +355,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.12.5" + "version": "3.13.0" } }, "nbformat": 4,