Skip to content

Commit

Permalink
Add ability to read data from time series
Browse files Browse the repository at this point in the history
gen_dataset() first reads time series from campaign, then reads any additional
data from history files (from archive or run directory). There's an API change
where, instead of expecting start_date and end_date (strings formatted as
'YYYY-MM'), the function wants integers start_year and end_year. Figuring out
better default values will be necessary to extend this to other CESM runs but
it's a good start.

I split plot_suite_004.ipynb into 4-year segments, as it was choking on 8 years
of output. I also added plot_suite_map notebooks for 004 for years 0006 and
0007 (we're one month shy of 0008).
  • Loading branch information
mnlevy1981 committed Oct 6, 2020
1 parent 5309e40 commit 4c43880
Show file tree
Hide file tree
Showing 18 changed files with 17,195 additions and 3,583 deletions.
20 changes: 12 additions & 8 deletions notebooks/Sanity Check.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
"Last average written at 0001-04-25 00:00:00\n",
"Datasets contain a total of 124 time samples\n",
"Last average written at 0001-05-05 00:00:00\n",
"Datasets contain a total of 151 time samples\n",
"Last average written at 0001-06-01 00:00:00\n",
"Datasets contain a total of 151 time samples\n",
"Last average written at 0001-06-01 00:00:00\n"
"Datasets contain a total of 365 time samples\n",
"Last average written at 0002-01-01 00:00:00\n",
"Datasets contain a total of 365 time samples\n",
"Last average written at 0002-01-01 00:00:00\n"
]
}
],
Expand All @@ -58,13 +58,17 @@
")\n",
"\n",
"cases[\"003\"] = utils.CaseClass(\"g.e22.G1850ECO_JRA_HR.TL319_t13.003\")\n",
"ds_dict[\"003\"] = cases[\"003\"].gen_dataset(\n",
" stream=\"pop.h.nday1\", varnames=varnames, end_date=\"0001-05\"\n",
"ds_dict[\"003\"] = (\n",
" cases[\"003\"]\n",
" .gen_dataset(stream=\"pop.h.nday1\", varnames=varnames, end_year=1)\n",
" .isel(time=slice(0, 151))\n",
")\n",
"\n",
"cases[\"004\"] = utils.CaseClass(\"g.e22.G1850ECO_JRA_HR.TL319_t13.004\")\n",
"ds_dict[\"004\"] = cases[\"004\"].gen_dataset(\n",
" stream=\"pop.h.nday1\", varnames=varnames, end_date=\"0001-05\"\n",
"ds_dict[\"004\"] = (\n",
" cases[\"004\"]\n",
" .gen_dataset(stream=\"pop.h.nday1\", varnames=varnames, end_year=1)\n",
" .isel(time=slice(0, 151))\n",
")"
]
},
Expand Down
2,507 changes: 2,507 additions & 0 deletions notebooks/plot_suite_0005-0008.004.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion notebooks/plot_suite_003.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"dashboard_link=https://jupyterhub.ucar.edu/dav/user/mlevy/proxy/39042/status\n"
"dashboard_link=https://jupyterhub.ucar.edu/dav/user/mlevy/proxy/41634/status\n"
]
},
{
Expand Down
1,534 changes: 287 additions & 1,247 deletions notebooks/plot_suite_004.ipynb

Large diffs are not rendered by default.

Loading

0 comments on commit 4c43880

Please sign in to comment.