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

Drifters (UAF)

Drifters run by Mark Johnson and others out of UAF with various years and drogue depths.

  • 2003: 7.5m (Cook Inlet)

  • 2004: 5m (Cook Inlet)

  • 2005: 5m, 80m (Cook Inlet)

  • 2006: 5m (Cook Inlet)

  • 2012: 1m (Cook Inlet), 15m (Cook Inlet)

  • 2013: 1m (Cook Inlet), 15m (Cook Inlet)

  • 2014: 1m (Cook Inlet)

  • 2019: 1m (Kachemak Bay, Lynn Canal)

  • 2020: 1m (Kachemak Bay, Lynn Canal)

Descriptive summary of later drifter deployment: https://www.alaska.edu/epscor/about/newsletters/May-2022-feature-current-events.php, data portal: https://ak-epscor.portal.axds.co/

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

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
['CIDrifter0001Y2012_MicrostarSurfaceAt1M_deployment1',
 'CIDrifter0001Y2012_MicrostarSurfaceAt1M_deployment2',
 'CIDrifter0001Y2012_MicrostarSurfaceAt1M_deployment3',
 'CIDrifter0001Y2012_MicrostarSurfaceAt1M_deployment4',
 'CIDrifter0001Y2012_MicrostarSurfaceAt1M_deployment5',
 'CIDrifter0001Y2012_MicrostarSurfaceAt1M_deployment6',
 'CIDrifter0001Y2012_MicrostarSurfaceAt1M_deployment7',
 'CIDrifter0002Y2012_MicrostarSurfaceAt1M_deployment1',
 'CIDrifter0002Y2012_MicrostarSurfaceAt1M_deployment2',
 'CIDrifter0002Y2012_MicrostarSurfaceAt1M_deployment3',
 'CIDrifter0002Y2012_MicrostarSurfaceAt1M_deployment4',
 'CIDrifter0002Y2012_MicrostarSurfaceAt1M_deployment5',
 'CIDrifter0002Y2012_MicrostarSurfaceAt1M_deployment6',
 'CIDrifter0003Y2012_MicrostarSurfaceAt1M_deployment1',
 'CIDrifter0003Y2012_MicrostarSurfaceAt1M_deployment2',
 'CIDrifter0003Y2012_MicrostarSurfaceAt1M_deployment3',
 'CIDrifter0003Y2012_MicrostarSurfaceAt1M_deployment4',
 'CIDrifter0005Y2012_MicrostarSurfaceAt1M_deployment1',
 'CIDrifter0005Y2012_MicrostarSurfaceAt1M_deployment3',
 'CIDrifter0005Y2012_MicrostarSurfaceAt1M_deployment4',
 'CIDrifter0005Y2012_MicrostarSurfaceAt1M_deployment8',
 'CIDrifter0006Y2012_MicrostarSurfaceAt1M_deployment1',
 'CIDrifter0006Y2012_MicrostarSurfaceAt1M_deployment2',
 'CIDrifter0006Y2012_MicrostarSurfaceAt1M_deployment3',
 'CIDrifter0006Y2012_MicrostarSurfaceAt1M_deployment4',
 'CIDrifter0007Y2013_MicrostarSurfaceAt1M_deployment1',
 'CIDrifter0008Y2013_MicrostarSurfaceAt1M_deployment2',
 'CIDrifter0008Y2013_MicrostarSurfaceAt1M_deployment3',
 'CIDrifter0008Y2013_MicrostarSurfaceAt1M_deployment4',
 'CIDrifter0009Y2013_MicrostarSurfaceAt1M_deployment1',
 'CIDrifter0009Y2013_MicrostarSurfaceAt1M_deployment2',
 'CIDrifter0009Y2013_MicrostarSurfaceAt1M_deployment3',
 'CIDrifter0010Y2013_MicrostarSurfaceAt1M_deployment2',
 'CIDrifter0010Y2013_MicrostarSurfaceAt1M_deployment3',
 'CIDrifter0010Y2013_MicrostarSurfaceAt1M_deployment5',
 'CIDrifter0010Y2013_MicrostarSurfaceAt1M_deployment6',
 'CIDrifter0011Y2012_SubsurfaceDrogueAt15M_deployment1',
 'CIDrifter0011Y2012_SubsurfaceDrogueAt15M_deployment2',
 'CIDrifter0011Y2012_SubsurfaceDrogueAt15M_deployment3',
 'CIDrifter0011Y2012_SubsurfaceDrogueAt15M_deployment4',
 'CIDrifter0011Y2012_SubsurfaceDrogueAt15M_deployment5',
 'CIDrifter0011Y2012_SubsurfaceDrogueAt15M_deployment6',
 'CIDrifter0011Y2012_SubsurfaceDrogueAt15M_deployment7',
 'CIDrifter0011Y2012_SubsurfaceDrogueAt15M_deployment8',
 'CIDrifter0012Y2012_SubsurfaceDrogueAt15M_deployment1',
 'CIDrifter0012Y2012_SubsurfaceDrogueAt15M_deployment2',
 'CIDrifter0012Y2012_SubsurfaceDrogueAt15M_deployment3',
 'CIDrifter0012Y2012_SubsurfaceDrogueAt15M_deployment4',
 'CIDrifter0012Y2012_SubsurfaceDrogueAt15M_deployment5',
 'CIDrifter0013Y2012_SubsurfaceDrogueAt15M_deployment1',
 'CIDrifter0013Y2012_SubsurfaceDrogueAt15M_deployment2',
 'CIDrifter0013Y2012_SubsurfaceDrogueAt15M_deployment3',
 'CIDrifter0013Y2012_SubsurfaceDrogueAt15M_deployment4',
 'CIDrifter0013Y2012_SubsurfaceDrogueAt15M_deployment5',
 'CIDrifter0013Y2012_SubsurfaceDrogueAt15M_deployment6',
 'CIDrifter0013Y2012_SubsurfaceDrogueAt15M_deployment7',
 'CIDrifter0013Y2012_SubsurfaceDrogueAt15M_deployment8',
 'CIDrifter0013Y2012_SubsurfaceDrogueAt15M_deployment9',
 'CIDrifter0014Y2012_SubsurfaceDrogueAt15M_deployment1',
 'CIDrifter0014Y2012_SubsurfaceDrogueAt15M_deployment2',
 'CIDrifter0014Y2012_SubsurfaceDrogueAt15M_deployment3',
 'CIDrifter0014Y2012_SubsurfaceDrogueAt15M_deployment4',
 'CIDrifter0015Y2012_SubsurfaceDrogueAt15M_deployment1',
 'CIDrifter0015Y2012_SubsurfaceDrogueAt15M_deployment2',
 'CIDrifter0016Y2012_SubsurfaceDrogueAt15M_deployment2',
 'CIDrifter0017Y2013_SubsurfaceDrogueAt15M_deployment1',
 'CIDrifter0018Y2013_SubsurfaceDrogueAt15M_deployment1',
 'CIDrifter0018Y2013_SubsurfaceDrogueAt15M_deployment2',
 'CIDrifter0019Y2013_SubsurfaceDrogueAt15M_deployment1',
 'CIDrifter0019Y2013_SubsurfaceDrogueAt15M_deployment2',
 'CIDrifter0020Y2013_SubsurfaceDrogueAt15M_deployment1',
 'CIDrifter0021Y2013_MicrostarSurfaceAt1M_deployment1',
 'CIDrifter0021Y2013_MicrostarSurfaceAt1M_deployment2',
 'CIDrifter0021Y2013_MicrostarSurfaceAt1M_deployment3',
 'CIDrifter0022Y2014_MicrostarSurfaceAt1M_deployment1',
 'CIDrifter0023Y2014_MicrostarSurfaceAt1M_deployment1',
 'CIDrifter0024Y2014_MicrostarSurfaceAt1M_deployment1',
 'CIDrifter0024Y2014_MicrostarSurfaceAt1M_deployment2',
 'CIDrifter0190Y2005_SubsurfaceDrogueAt5M_deployment1',
 'CIDrifter0192Y2005_SubsurfaceDrogueAt5M_deployment1',
 'CIDrifter0193Y2005_SubsurfaceDrogueAt5M_deployment1',
 'CIDrifter0197Y2005_SubsurfaceDrogueAt5M_deployment1',
 'CIDrifter0227Y2004_SubsurfaceDrogueAt5M_deployment1',
 'CIDrifter0227Y2004_SubsurfaceDrogueAt5M_deployment2',
 'CIDrifter0229Y2004_SubsurfaceDrogueAt5M_deployment1',
 'CIDrifter0230Y2004_SubsurfaceDrogueAt5M_deployment1',
 'CIDrifter0236Y2004_SubsurfaceDrogueAt5M_deployment1',
 'CIDrifter0237Y2004_SubsurfaceDrogueAt5M_deployment1',
 'CIDrifter0246Y2004_SubsurfaceDrogueAt5M_deployment1',
 'CIDrifter0247Y2004_SubsurfaceDrogueAt5M_deployment1',
 'CIDrifter0248Y2004_SubsurfaceDrogueAt5M_deployment1',
 'CIDrifter0248Y2004_SubsurfaceDrogueAt5M_deployment2',
 'CIDrifter0249Y2005_SubsurfaceDrogueAt80M_deployment1',
 'CIDrifter0250Y2005_SubsurfaceDrogueAt80M_deployment1',
 'CIDrifter0250Y2005_SubsurfaceDrogueAt80M_deployment2',
 'CIDrifter0627Y2005_SubsurfaceDrogueAt5M_deployment1',
 'CIDrifter0628Y2005_SubsurfaceDrogueAt5M_deployment1',
 'CIDrifter0629Y2005_SubsurfaceDrogueAt5M_deployment1',
 'CIDrifter0630Y2005_SubsurfaceDrogueAt5M_deployment1',
 'CIDrifter0631Y2005_SubsurfaceDrogueAt5M_deployment1',
 'CIDrifter0632Y2006_SubsurfaceDrogueAt5M_deployment1',
 'CIDrifter0632Y2006_SubsurfaceDrogueAt5M_deployment2',
 'CIDrifter0633Y2005_SubsurfaceDrogueAt5M_deployment1',
 'CIDrifter0634Y2005_SubsurfaceDrogueAt5M_deployment1',
 'CIDrifter0635Y2006_SubsurfaceDrogueAt5M_deployment1',
 'CIDrifter0635Y2006_SubsurfaceDrogueAt5M_deployment2',
 'CIDrifter0635Y2006_SubsurfaceDrogueAt5M_deployment3',
 'CIDrifter0636Y2005_SubsurfaceDrogueAt5M_deployment1',
 'CIDrifter0637Y2005_SubsurfaceDrogueAt5M_deployment1',
 'CIDrifter0637Y2005_SubsurfaceDrogueAt5M_deployment2',
 'CIDrifter0638Y2005_SubsurfaceDrogueAt5M_deployment1',
 'CIDrifter0639Y2005_SubsurfaceDrogueAt5M_deployment1',
 'CIDrifter0639Y2005_SubsurfaceDrogueAt5M_deployment2',
 'CIDrifter0640Y2005_SubsurfaceDrogueAt5M_deployment1',
 'CIDrifter0640Y2005_SubsurfaceDrogueAt5M_deployment2',
 'CIDrifter0641Y2005_SubsurfaceDrogueAt5M_deployment1',
 'CIDrifter0907Y2003_SubsurfaceDrogueAt7p5M_deployment1',
 'CIDrifter0907Y2003_SubsurfaceDrogueAt7p5M_deployment2',
 'CIDrifter0907Y2003_SubsurfaceDrogueAt7p5M_deployment3',
 'CIDrifter0908Y2003_SubsurfaceDrogueAt7p5M_deployment1',
 'CIDrifter0909Y2003_SubsurfaceDrogueAt7p5M_deployment1',
 'CIDrifter0910Y2003_SubsurfaceDrogueAt7p5M_deployment1',
 'CIDrifter0910Y2003_SubsurfaceDrogueAt7p5M_deployment2',
 'CIDrifter0910Y2003_SubsurfaceDrogueAt7p5M_deployment3',
 'CIDrifter0910Y2003_SubsurfaceDrogueAt7p5M_deployment4',
 'CIDrifter0910Y2003_SubsurfaceDrogueAt7p5M_deployment5',
 'CIDrifter0910Y2003_SubsurfaceDrogueAt7p5M_deployment6',
 'CIDrifter0912Y2003_SubsurfaceDrogueAt7p5M_deployment1',
 'CIDrifter0912Y2003_SubsurfaceDrogueAt7p5M_deployment2',
 'CIDrifter0912Y2003_SubsurfaceDrogueAt7p5M_deployment3',
 'CIDrifter0912Y2003_SubsurfaceDrogueAt7p5M_deployment4',
 'CIDrifter0913Y2003_SubsurfaceDrogueAt7p5M_deployment1',
 'CIDrifter0914Y2003_SubsurfaceDrogueAt7p5M_deployment1',
 'CIDrifter0991Y2003_SubsurfaceDrogueAt7p5M_deployment1',
 'CIDrifter0994Y2003_SubsurfaceDrogueAt7p5M_deployment1',
 'CIDrifter0994Y2003_SubsurfaceDrogueAt7p5M_deployment2',
 'CIDrifter0995Y2003_SubsurfaceDrogueAt7p5M_deployment1',
 'CIDrifter0995Y2003_SubsurfaceDrogueAt7p5M_deployment2',
 'CIDrifter0995Y2003_SubsurfaceDrogueAt7p5M_deployment3',
 'CIDrifter0995Y2003_SubsurfaceDrogueAt7p5M_deployment4',
 'CIDrifter0996Y2003_SubsurfaceDrogueAt7p5M_deployment1',
 'CIDrifter0996Y2003_SubsurfaceDrogueAt7p5M_deployment2',
 'CIDrifter0996Y2003_SubsurfaceDrogueAt7p5M_deployment3',
 'CIDrifter0996Y2003_SubsurfaceDrogueAt7p5M_deployment4',
 'CIDrifter0996Y2003_SubsurfaceDrogueAt7p5M_deployment5',
 'CIDrifter0996Y2003_SubsurfaceDrogueAt7p5M_deployment6',
 'CIDrifter0996Y2003_SubsurfaceDrogueAt7p5M_deployment7',
 'CIDrifter0996Y2003_SubsurfaceDrogueAt7p5M_deployment8',
 'CIDrifter0997Y2003_SubsurfaceDrogueAt7p5M_deployment1',
 'CIDrifter0997Y2003_SubsurfaceDrogueAt7p5M_deployment2',
 'CIDrifter0998Y2003_SubsurfaceDrogueAt7p5M_deployment1',
 'CIDrifter0998Y2003_SubsurfaceDrogueAt7p5M_deployment2',
 'CIDrifter0998Y2003_SubsurfaceDrogueAt7p5M_deployment3',
 'CIDrifter0998Y2003_SubsurfaceDrogueAt7p5M_deployment4']

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
CIDrifter0001Y2012_MicrostarSurfaceAt1M_deployment3
Drifter Lat Long U-Vel V-Vel datetime depth_m
0 1 59.58466 -151.37683 -6.371 0.755 2012-07-10 23:00:00 1
1 1 59.58560 -151.37951 -6.149 13.562 2012-07-11 00:00:00 1
2 1 59.59213 -151.38343 -1.693 24.353 2012-07-11 01:00:00 1
3 1 59.60130 -151.38325 1.269 28.917 2012-07-11 02:00:00 1
4 1 59.61053 -151.38163 3.788 28.007 2012-07-11 03:00:00 1
5 1 59.62123 -151.38173 -5.413 37.144 2012-07-11 04:00:00 1
6 1 59.63200 -151.38353 1.393 27.827 2012-07-11 05:00:00 1
7 1 59.63924 -151.38075 4.909 15.468 2012-07-11 06:00:00 1
8 1 59.64241 -151.38025 -4.833 4.373 2012-07-11 07:00:00 1
9 1 59.64214 -151.38561 -8.763 -7.200 2012-07-11 08:00:00 1
10 1 59.63727 -151.39113 -8.982 -20.119 2012-07-11 09:00:00 1
11 1 59.63056 -151.39841 -9.748 -19.183 2012-07-11 10:00:00 1
12 1 59.62461 -151.39960 2.344 -18.167 2012-07-11 11:00:00 1
13 1 59.61866 -151.39772 4.069 -18.505 2012-07-11 12:00:00 1
14 1 59.61363 -151.39389 5.407 -11.645 2012-07-11 13:00:00 1
15 1 59.60979 -151.39443 -5.007 -14.060 2012-07-11 14:00:00 1
16 1 59.60661 -151.39818 -8.260 -2.564 2012-07-11 15:00:00 1
17 1 59.60634 -151.40488 -8.510 -2.467 2012-07-11 16:00:00 1
18 1 59.60394 -151.40704 2.213 -15.340 2012-07-11 17:00:00 1
19 1 59.59496 -151.40925 -22.804 -27.067 2012-07-11 18:00:00 1
20 1 59.59044 -151.43249 -40.144 -3.268 2012-07-11 19:00:00 1
21 1 59.59316 -151.45862 -35.862 15.766 2012-07-11 20:00:00 1
22 1 59.59943 -151.47685 -21.966 20.139 2012-07-11 21:00:00 1
23 1 59.60580 -151.48649 -10.543 18.392 2012-07-11 22:00:00 1
24 1 59.60991 -151.49070 -1.677 7.400 2012-07-11 23:00:00 1
25 1 59.61180 -151.48830 7.858 4.548 2012-07-12 00:00:00 1
26 1 59.61280 -151.48213 8.981 2.092 2012-07-12 01:00:00 1
27 1 59.61401 -151.47789 5.490 4.990 2012-07-12 02:00:00 1
28 1 59.61540 -151.47449 6.051 4.671 2012-07-12 03:00:00 1
29 1 59.61719 -151.47128 2.227 4.574 2012-07-12 04:00:00 1
30 1 59.61861 -151.47125 -1.274 5.165 2012-07-12 05:00:00 1
31 1 59.62016 -151.47177 -0.564 3.726 2012-07-12 06:00:00 1
32 1 59.62093 -151.47276 -1.923 1.644 2012-07-12 07:00:00 1
33 1 59.62120 -151.47331 -0.982 -0.298 2012-07-12 08:00:00 1
34 1 59.62098 -151.47437 -1.149 -0.874 2012-07-12 09:00:00 1
35 1 59.62078 -151.47525 -2.165 -1.871 2012-07-12 10:00:00 1
36 1 59.61914 -151.47630 0.676 -7.734 2012-07-12 11:00:00 1
37 1 59.61610 -151.47360 7.031 -10.149 2012-07-12 12:00:00 1
38 1 59.61246 -151.46857 8.721 -11.825 2012-07-12 13:00:00 1
39 1 59.60853 -151.46018 17.621 -13.012 2012-07-12 14:00:00 1
40 1 59.60355 -151.44828 16.581 -17.924 2012-07-12 15:00:00 1
41 1 59.59718 -151.44060 7.745 -20.093 2012-07-12 16:00:00 1
42 1 59.59108 -151.43679 2.034 -17.138 2012-07-12 17:00:00 1
43 1 59.58796 -151.44106 -12.331 -0.283 2012-07-12 18:00:00 1
44 1 59.58844 -151.45118 -18.579 -2.847 2012-07-12 19:00:00 1
45 1 59.58739 -151.46262 -16.980 3.957 2012-07-12 20:00:00 1
46 1 59.58985 -151.47266 -12.481 6.937 2012-07-12 21:00:00 1

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']