import intake
import hvplot.pandas
import hvplot.xarray
import cook_inlet_catalogs as cic
import holoviews as hv

Drifters (Lake Clark)

Project: Lake Clark Physical Oceanographic Assessment

  • PIs: Tyler Hennon (UAF), Tahzay Jones (NPS), Seth Danielson (UAF)

  • Deployment Vessels: Norseman II (drifters 01-05), Island C (06-18)

  • Drifter Model: STC (surface drogued)

cat = intake.open_catalog(cic.utils.cat_path("drifters_lake_clark"))

Plot all datasets in catalog

dd, ddlabels = cic.utils.combine_datasets_for_map(cat)
dd.hvplot(**cat.metadata["map"]) * ddlabels.hvplot(**cat.metadata["maplabels"])
WARNING:param.project_path: While projecting a Path element from a PlateCarree coordinate reference system (crs) to a Mercator projection none of the projected paths were contained within the bounds specified by the projection. Ensure you have specified the correct coordinate system for your data.

List available datasets in the catalog

dataset_ids = list(cat)
dataset_ids
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18]

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
3
time longitude latitude drifter depth
0 29-May-2021 03:46:40 -152.57756 60.09387 3 0
1 29-May-2021 03:52:06 -152.57715 60.09287 3 0
2 29-May-2021 03:57:06 -152.57638 60.09175 3 0
3 29-May-2021 04:02:06 -152.57458 60.09021 3 0
4 29-May-2021 04:06:41 -152.57276 60.08850 3 0
... ... ... ... ... ...
942 01-Jun-2021 22:06:33 -153.00135 59.62765 3 0
943 01-Jun-2021 22:11:33 -153.00513 59.62615 3 0
944 01-Jun-2021 22:16:28 -153.00888 59.62453 3 0
945 01-Jun-2021 22:21:28 -153.01283 59.62303 3 0
946 01-Jun-2021 22:26:28 -153.01326 59.62719 3 0

947 rows × 5 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']