Skip to content

Commit

Permalink
Merge branch 'master' into no-generate-pdf
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeitsperre authored Jan 23, 2025
2 parents c18c794 + 0038ce5 commit 3d44564
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .cruft.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
19 changes: 10 additions & 9 deletions docs/notebooks/03_Extracting_forcing_data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
]
Expand Down Expand Up @@ -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."
]
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/ravenpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@

__author__ = """David Huard"""
__email__ = "[email protected]"
__version__ = "0.16.2-dev.4"
__version__ = "0.16.2-dev.5"
2 changes: 1 addition & 1 deletion tests/test_ravenpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ def test_package_metadata():
contents = f.read()
assert """David Huard""" in contents
assert '__email__ = "[email protected]"' in contents
assert '__version__ = "0.16.2-dev.4"' in contents
assert '__version__ = "0.16.2-dev.5"' in contents

0 comments on commit 3d44564

Please sign in to comment.