Skip to content

Commit

Permalink
update usage notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
aulemahal committed Jan 25, 2024
1 parent 854e44d commit 0d73287
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions docs/notebooks/usage.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Finally, `xclim` also allows us to call indicators using datasets and variable names."
"`xclim` also allows us to call indicators using datasets and variable names."
]
},
{
Expand All @@ -255,6 +255,26 @@
"gdd"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Finally, we can also get datasets as an output with the `as_dataset` option."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"with xclim.set_options(as_dataset=True, cf_compliance=\"log\"):\n",
" gdd_ds = xclim.atmos.growing_degree_days(\n",
" tas=daily_ds.air, thresh=\"10 degC\", freq=\"YS\", date_bounds=(\"04-01\", \"09-30\")\n",
" )\n",
"gdd_ds"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -367,9 +387,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.10"
"version": "3.11.7"
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}

0 comments on commit 0d73287

Please sign in to comment.