From 424656e03096ec81f17df6a27459028250f27f33 Mon Sep 17 00:00:00 2001 From: Zeitsperre <10819524+Zeitsperre@users.noreply.github.com> Date: Thu, 23 Jan 2025 15:26:19 -0500 Subject: [PATCH 1/2] use explicit chunking configuration --- .../03_Extracting_forcing_data.ipynb | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/docs/notebooks/03_Extracting_forcing_data.ipynb b/docs/notebooks/03_Extracting_forcing_data.ipynb index 80844c9b..c0e458cc 100644 --- a/docs/notebooks/03_Extracting_forcing_data.ipynb +++ b/docs/notebooks/03_Extracting_forcing_data.ipynb @@ -104,11 +104,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "jupyter": { - "outputs_hidden": false - } - }, + "metadata": {}, "outputs": [], "source": [ "# We will add a wrapper to ensure that the following operations will preserve the original data attributes, such as units and variable names.\n", @@ -117,9 +113,14 @@ " ds.sel(time=slice(reference_start_day, reference_stop_day)), basin_contour\n", " )\n", " ERA5_tas = ERA5_reference[\"t2m\"].resample(time=\"1D\")\n", - " ERA5_tmin = ERA5_tas.min().chunk(-1, -1, -1)\n", - " ERA5_tmax = ERA5_tas.max().chunk(-1, -1, -1)\n", - " ERA5_pr = ERA5_reference[\"tp\"].resample(time=\"1D\").sum().chunk(-1, -1, -1)\n", + " ERA5_tmin = ERA5_tas.min().chunk({\"latitude\": -1, \"longitude\": -1, \"time\": -1})\n", + " ERA5_tmax = ERA5_tas.max().chunk({\"latitude\": -1, \"longitude\": -1, \"time\": -1})\n", + " ERA5_pr = (\n", + " ERA5_reference[\"tp\"]\n", + " .resample(time=\"1D\")\n", + " .sum()\n", + " .chunk({\"latitude\": -1, \"longitude\": -1, \"time\": -1})\n", + " )\n", "\n", "ERA5_pr" ] @@ -231,7 +232,7 @@ "metadata": {}, "source": [ "### Here we will write the files to disk in a temporary folder since the root folder containing these notebooks is read-only.\n", - "You can change the path here to your own preferred path in your writable workspace. Alternatively, if you copy this notebook to your writable-workspace as shown in the introduction documentation, you can save just the filename (no absolute path) and the file will appear \"beside\" the notebooks, ready to be read by the next series of notebooks. \n", + "You can change the path here to your own preferred path in your writable workspace. Alternatively, if you copy this notebook to your writable-workspace as shown in the introduction documentation, you can save just the filename (no absolute path) and the file will appear \"beside\" the notebooks, ready to be read by the next series of notebooks.\n", "\n", "For this case, you will want to use the second provided option in which all variables are stored in the same netcdf file. This will make the data much easier to find for Raven and prevent some errors, such as if Raven needs to calculate daily average temperature. This will be possible with all variables in the same file, but will cause an error if max and min temperature are in two seperate files." ] From 0038ce52b9fdfebe150fb0594d56db9b6488d8a4 Mon Sep 17 00:00:00 2001 From: "bumpversion[bot]" Date: Thu, 23 Jan 2025 20:44:10 +0000 Subject: [PATCH 2/2] =?UTF-8?q?Bump=20version:=200.16.2-dev.4=20=E2=86=92?= =?UTF-8?q?=200.16.2-dev.5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .cruft.json | 2 +- pyproject.toml | 2 +- src/ravenpy/__init__.py | 2 +- tests/test_ravenpy.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.cruft.json b/.cruft.json index 799eadeb..fb584d3f 100644 --- a/.cruft.json +++ b/.cruft.json @@ -10,7 +10,7 @@ "project_slug": "ravenpy", "project_short_description": "A Python wrapper to setup and run the hydrologic modelling framework Raven.", "pypi_username": "CSHS-CWRA", - "version": "0.16.2-dev.4", + "version": "0.16.2-dev.5", "use_pytest": "y", "use_black": "y", "use_conda": "y", diff --git a/pyproject.toml b/pyproject.toml index d0099817..606a7bab 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -168,7 +168,7 @@ target-version = [ ] [tool.bumpversion] -current_version = "0.16.2-dev.4" +current_version = "0.16.2-dev.5" commit = true commit_args = "--no-verify" tag = false diff --git a/src/ravenpy/__init__.py b/src/ravenpy/__init__.py index e2748adf..95001976 100644 --- a/src/ravenpy/__init__.py +++ b/src/ravenpy/__init__.py @@ -30,4 +30,4 @@ __author__ = """David Huard""" __email__ = "huard.david@ouranos.ca" -__version__ = "0.16.2-dev.4" +__version__ = "0.16.2-dev.5" diff --git a/tests/test_ravenpy.py b/tests/test_ravenpy.py index dbaf4d79..bf0d61bb 100644 --- a/tests/test_ravenpy.py +++ b/tests/test_ravenpy.py @@ -43,4 +43,4 @@ def test_package_metadata(): contents = f.read() assert """David Huard""" in contents assert '__email__ = "huard.david@ouranos.ca"' in contents - assert '__version__ = "0.16.2-dev.4"' in contents + assert '__version__ = "0.16.2-dev.5"' in contents