Skip to content

Commit

Permalink
Merge cf62642 into 3868797
Browse files Browse the repository at this point in the history
  • Loading branch information
juliettelavoie committed Feb 21, 2024
2 parents 3868797 + cf62642 commit c1b0150
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
23 changes: 15 additions & 8 deletions docs/notebooks/figanos_docs.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -767,14 +767,13 @@
" 'https://pavics.ouranos.ca/twitcher/ows/proxy/thredds/dodsC/birdhouse/ouranos/portraits-clim-1.1/IPSL-CM5B-LR_rcp85_prcptot_monthly.nc',\n",
" ]\n",
"ens = ensembles.create_ensemble(urls)\n",
"fut = ens.sel(time=slice(\"2020\", \"2050\"))\n",
"ref = ens.sel(time=slice(\"1990\", \"2020\"))\n",
"delta = fut.mean(\"time\") - ref.mean(\"time\")\n",
"chng_f, pos_f = ensembles.change_significance(\n",
" delta, test=\"threshold\", abs_thresh=2\n",
")\n",
"sup_8 = chng_f.where(chng_f.prcptot>0.8)\n",
"inf_5 = chng_f.where(chng_f.prcptot<0.5)\n",
"fut = ens.sel(time=slice(\"2020\", \"2050\")).prcptot\n",
"ref = ens.sel(time=slice(\"1990\", \"2020\")).prcptot\n",
"chng_f= ensembles.robustness_fractions(\n",
" fut, ref, test=\"threshold\", abs_thresh=2\n",
").changed\n",
"sup_8 = chng_f.where(chng_f>0.8)\n",
"inf_5 = chng_f.where(chng_f<0.5)\n",
"\n",
"ens_stats = ensembles.ensemble_mean_std_max_min(ens)\n",
"\n",
Expand Down Expand Up @@ -1188,6 +1187,14 @@
" line_kw={'lw':2}\n",
")\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "75349096",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
2 changes: 1 addition & 1 deletion environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dependencies:
- pyyaml
- scikit-image
- xarray
- xclim >=0.38
- xclim >=0.47
# To make the package and notebooks usable
- dask
- h5py
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ dependencies = [
"seaborn",
"scikit-image",
"xarray",
"xclim>=0.38"
"xclim>=0.47"
]

[project.optional-dependencies]
Expand Down

0 comments on commit c1b0150

Please sign in to comment.