import intake
import hvplot.pandas
import hvplot.xarray
import cook_inlet_catalogs as cic
import holoviews as hv
Moorings (KBNERR): Lower Cook Inlet MooringΒΆ
Lower Cook Inlet Mooring from: Seasonality of Boundary Conditions for Cook Inlet, Alaska
CIRCAC is the Cook Inlet Regional Citizens Advisory Council. It was funded by MMS (pre-BOEM), OCS Study MMS 2009-041 funneled through the Coastal Marine Institute (University of Alaska Fairbanks).
Part of the project: Seasonality of Boundary Conditions for Cook Inlet, Alaska Steve Okkonen Principal Investigator Co-principal Investigators: Scott Pegau Susan Saupe Final Report OCS Study MMS 2009-041 August 2009 Report: https://researchworkspace.com/files/39885971/2009_041.pdf

cat = intake.open_catalog(cic.utils.cat_path("moorings_kbnerr"))
Plot all datasets in catalogΒΆ
dd, ddlabels = cic.utils.combine_datasets_for_map(cat)
dd.hvplot(**cat.metadata["map"]) * ddlabels.hvplot(**cat.metadata["maplabels"])
List available datasets in the catalogΒΆ
dataset_ids = list(cat)
dataset_ids
['Deployment1', 'Deployment2']
Select one dataset to investigateΒΆ
try:
dataset_id = dataset_ids[2]
except:
dataset_id = dataset_ids[0]
print(dataset_id)
dd = cat[dataset_id].read()
dd
Deployment1
/home/docs/checkouts/readthedocs.org/user_builds/cook-inlet-catalogs/conda/latest/lib/python3.11/site-packages/intake/readers/readers.py:176: UserWarning: Could not infer format, so each element will be parsed individually, falling back to `dateutil`. To ensure parsing is consistent and as-expected, please specify a format.
return self._func(**kw)
| Date-time | Depth | Temperature | Salinity | longitude_deg | latitude_deg | |
|---|---|---|---|---|---|---|
| 0 | 2006-08-12 18:22:00 | 24.206 | 10.4205 | 30.7309 | -151.847667 | 59.202683 |
| 1 | 2006-08-12 18:37:00 | 23.798 | 10.1794 | 30.8498 | -151.847667 | 59.202683 |
| 2 | 2006-08-12 18:52:00 | 23.449 | 10.1135 | 30.8655 | -151.847667 | 59.202683 |
| 3 | 2006-08-12 19:07:00 | 23.095 | 10.0045 | 30.8905 | -151.847667 | 59.202683 |
| 4 | 2006-08-12 19:22:00 | 22.746 | 9.9801 | 30.8863 | -151.847667 | 59.202683 |
| ... | ... | ... | ... | ... | ... | ... |
| 7356 | 2006-10-28 09:22:00 | 22.667 | 8.6647 | 29.5591 | -151.847667 | 59.202683 |
| 7357 | 2006-10-28 09:37:00 | 22.602 | 8.6701 | 29.5770 | -151.847667 | 59.202683 |
| 7358 | 2006-10-28 09:52:00 | 22.492 | 8.6686 | 29.5701 | -151.847667 | 59.202683 |
| 7359 | 2006-10-28 10:07:00 | 22.409 | 8.6619 | 29.6094 | -151.847667 | 59.202683 |
| 7360 | 2006-10-28 10:22:00 | 22.354 | 8.6703 | 29.6480 | -151.847667 | 59.202683 |
7361 rows Γ 6 columns
Plot one datasetΒΆ
keys = list(cat[dataset_id].metadata["plots"].keys())
print(keys)
plots = []
for key in keys:
plot_kwargs = cat[dataset_id].metadata["plots"][key]
if "clim" in plot_kwargs and isinstance(plot_kwargs["clim"], list):
plot_kwargs["clim"] = tuple(plot_kwargs["clim"])
if "dynamic" in plot_kwargs:
plot_kwargs["dynamic"] = False
plots.append(cat[dataset_id].ToHvPlot(**plot_kwargs).read())
hv.Layout(plots).cols(1)
['data']
/home/docs/checkouts/readthedocs.org/user_builds/cook-inlet-catalogs/conda/latest/lib/python3.11/site-packages/intake/readers/readers.py:176: UserWarning: Could not infer format, so each element will be parsed individually, falling back to `dateutil`. To ensure parsing is consistent and as-expected, please specify a format.
return self._func(**kw)