Skip to content

Commit

Permalink
Checked whether reanalysis data includes rain seasons
Browse files Browse the repository at this point in the history
  • Loading branch information
valentijn7 committed Dec 13, 2024
1 parent 1ca0667 commit 1a08cb2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions GoogleFloodHub/src/GRRR.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@
},
{
"cell_type": "code",
"execution_count": 62,
"execution_count": 599,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -1513,7 +1513,7 @@
},
{
"cell_type": "code",
"execution_count": 69,
"execution_count": 602,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -1561,6 +1561,11 @@
" :param ds: the reanalysis dataset\n",
" :return: the dataset with annual maximum values\n",
" \"\"\"\n",
" # exclude non-complete years from the reanalysis dataset, because\n",
" # these might not include the rain season, and, consequently, neither\n",
" # the annual water rises and/or floodings, and thus the annual maxima\n",
" # ... this subsetting procedure is moved elsewhere\n",
"\n",
" if not pd.api.types.is_datetime64_any_dtype(ds['time']):\n",
" ds['time'] = pd.to_datetime(ds['time'].values)\n",
" return ds['streamflow'].resample(time = 'Y').max()\n",
Expand Down

0 comments on commit 1a08cb2

Please sign in to comment.