Skip to content

Commit

Permalink
fix missing dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
coxipi committed Jun 6, 2024
1 parent 099d29a commit 6976fec
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions docs/notebooks/figanos_multiplots.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -219,18 +219,22 @@
"from xclim.core.units import convert_units_to\n",
"\n",
"ds = open_dataset(\"sdba/CanESM2_1950-2100.nc\").sel(time=slice(\"1950\", \"2013\"))\n",
"ds2 = open_dataset(\"sdba/ahccd_1950-2013.nc\")\n",
"ds1 = open_dataset(\"sdba/ahccd_1950-2013.nc\")\n",
"ds2 = open_dataset(\"sdba/nrcan_1950-2013.nc\")\n",
"for v in ds.data_vars: \n",
" ds1[v] = convert_units_to(ds1[v], ds[v], context=\"hydro\")\n",
" ds2[v] = convert_units_to(ds2[v], ds[v], context=\"hydro\")\n",
"tx_ref = ds.tasmax.isel(location=0)\n",
"tx_sim = ds2.tasmax.isel(location=0)\n",
"tx_sim = ds1.tasmax.isel(location=0)\n",
"tx_sim2 = ds2.tasmax.isel(location=0)\n",
"out = {}\n",
"out[\"sim\"] = sdba.measures.taylordiagram(ref=tx_ref, sim=tx_sim, dim=\"time\")\n",
"out[\"sim2\"] = sdba.measures.taylordiagram(ref=tx_ref, sim=tx_sim2, dim=\"time\")\n",
"# In the default behaviour of `fg.taylordiagram`, the keys of the dictionary of \n",
"# DataArray are used for the legend\n",
"# A single DataArray can also be passed.\n",
"fg.taylordiagram(out)\n"
"fg.taylordiagram(out)\n",
"\n"
]
},
{
Expand Down

0 comments on commit 6976fec

Please sign in to comment.