Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion notebooks/4-taylor-diagrams.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"source": [
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"import pandas as pd\n",
"import xarray as xr\n",
"\n",
"import cftime\n",
Expand Down Expand Up @@ -144,7 +145,9 @@
"source": [
"# Change hourly data to monthly\n",
"era5 = era5.rename({'initial_time0_hours': 'time'}) # Changing dimension name for convenience\n",
"era5_resampled = era5.resample(time='MS', loffset='15D').mean() # loffsest to set resampling to the center of each month as in CMIP5 data\n",
"era5_resampled = era5.resample(time='MS').mean()\n",
"offset = pd.tseries.frequencies.to_offset('15D') # use offsest to adjust to the center of each month as in CMIP5 data\n",
"era5_resampled['time'] = era5_resampled.get_index('time') + offset\n",
"\n",
"era5_resampled"
]
Expand Down
4 changes: 2 additions & 2 deletions notebooks/7-animation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,8 @@
"metadata": {},
"outputs": [],
"source": [
"vmin = t.min()\n",
"vmax = t.max()\n",
"vmin = t.min().values\n",
"vmax = t.max().values\n",
"levels = 30\n",
"\n",
"# create initial plot that we will update\n",
Expand Down
Loading