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

Drifters (EcoFOCI)

EcoFOCI Project.

As described on the main project website for EcoFOCI:

We study the ecosystems of the North Pacific Ocean, Bering Sea and U.S. Arctic to improve understanding of ecosystem dynamics and we apply that understanding to the management of living marine resources. EcoFOCI scientists integrate field, laboratory and modeling studies to determine how varying biological and physical factors influence large marine ecosystems within Alaskan waters.

EcoFOCI is a joint research program between the Alaska Fisheries Science Center (NOAA/ NMFS/ AFSC) and the Pacific Marine Environmental Laboratory (NOAA/ OAR/ PMEL).

Drifter data are being pulled from this webpage: https://www.ecofoci.noaa.gov/drifters/efoci_drifterData.shtml which also has a plot available for each drifter dataset.

Several years of EcoFOCI drifter data are also available in a private Research Workspace project: https://researchworkspace.com/project/41531085/files.

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

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
['106696_y2012_withTandIce',
 '106697_y2012_withTandIce',
 '111968_y2012_withTandIce',
 '111969_y2013_withT',
 '111970_y2013_withT',
 '111971_y2013_withT',
 '111973_y2013_withT',
 '111974_y2013_withT',
 '111976_y2013_withT',
 '113633_y2012_withT',
 '113634_y2012_withT',
 '113635_y2012_withTandIce',
 '113636_y2012_withTandIce',
 '113637_y2012_withTandIce',
 '113638_y2012_withTandIce',
 '113639_y2012_withTandIce',
 '113640_y2012_withTandIce',
 '113641_y2012_withTandIce',
 '113642_y2012_withTandIce',
 '119593_y2012_withTandIce',
 '119594_y2012_withTandIce',
 '119595_y2012_withTandIce',
 '119596_y2012_withTandIce',
 '119597_y2012_withTandIce',
 '119598_y2012_withTandIce',
 '119599_y2012_withTandIce',
 '119600_y2012_withTandIce',
 '122532_y2013_withT',
 '122533_y2013_withT',
 '122534_y2013_withTandIce',
 '122535_y2013_withTandIce',
 '122536_y2013_withTandIce',
 '122537_y2013_withTandIce',
 '122538_y2013_withTandIce',
 '122539_y2013_withTandIce',
 '122540_y2013_withTandIce',
 '122541_y2013_withTandIce',
 '122542_y2013_withT',
 '122543_y2013',
 '122843_y2013_withTandIce',
 '122844_y2013_withTandIce',
 '122845_y2013_withT',
 '122846_y2013_withTandIce',
 '122847_y2013_withTandIce',
 '128951_y2013_withTandIce',
 '128952_y2013_withT',
 '128954_y2013_withTandIce',
 '128955_y2013_withTandIce',
 '136871_y2014_withTandIce',
 '136873_y2014_withT',
 '136874_y2014_withT',
 '36254_y2003',
 '37478_y2003',
 '37484_y2003',
 '37485_y2003',
 '37486_y2003',
 '37487_y2003',
 '37488_y2003',
 '37489_y2003',
 '37490_y2003',
 '37491_y2003',
 '37492_y2003',
 '37493_y2003',
 '37494_y2003',
 '37495_y2003',
 '37496_y2003',
 '37497_y2003',
 '37498_y2003',
 '37499_y2003',
 '37500_y2003',
 '37501_y2003',
 '37504_y2003',
 '37505_y2003',
 '37506_y2003',
 '37507_y2003',
 '37508_y2003',
 '37509_y2003',
 '37510_y2003',
 '37511_y2003',
 '37512_y2003',
 '37513_y2003',
 '37514_y2003',
 '37516_y2003',
 '37520_y2003',
 '43698_y2004',
 '43700_y2004',
 '43701_y2004',
 '43702_y2004',
 '43703_y2004',
 '43704_y2004',
 '43705_y2004',
 '43706_y2004',
 '43707_y2004',
 '43709_y2004',
 '43710_y2004',
 '43711_y2004',
 '43712_y2004',
 '43713_y2004',
 '43714_y2004',
 '43715_y2004',
 '43716_y2004',
 '43717_y2004',
 '43718_y2004',
 '43719_y2004',
 '43720_y2004',
 '43721_y2004',
 '43722_y2004',
 '43723_y2004',
 '43725_y2004',
 '43726_y2004',
 '43727_y2004',
 '43728_y2004',
 '43729_y2004',
 '43730_y2004',
 '43731_y2004',
 '43732_y2004',
 '43733_y2004',
 '43734_y2004',
 '43735_y2004',
 '43737_y2004',
 '43738_y2004',
 '43820_y2003',
 '43821_y2003',
 '53287_y2004',
 '53288_y2004',
 '53289_y2004',
 '53290_y2005',
 '53291_y2004',
 '53292_y2004',
 '53293_y2004',
 '53294_y2005',
 '53295_y2005',
 '53296_y2005',
 '53297_y2006',
 '53298_y2005',
 '53299_y2005',
 '53300_y2005',
 '53302_y2005',
 '53303_y2005',
 '53304_y2005',
 '53306_y2005',
 '53307_y2006',
 '53308_y2005',
 '53309_y2005',
 '53310_y2005',
 '53311_y2005',
 '53312_y2005',
 '53313_y2006',
 '53314_y2006',
 '53315_y2005',
 '53316_y2005',
 '53317_y2005',
 '53318_y2005',
 '53319_y2005',
 '53320_y2005',
 '53321_y2005',
 '57863_y2006',
 '57866_y2006',
 '57867_y2006',
 '57868_y2006',
 '57869_y2006',
 '57870_y2005',
 '57872_y2005',
 '57873_y2006',
 '57874_y2005',
 '57875_y2006',
 '57876_y2005',
 '57878_y2005',
 '57879_y2005',
 '57880_y2005',
 '57881_y2005',
 '57883_y2006',
 '57885_y2005',
 '57887_y2005',
 '57888_y2006',
 '57889_y2005']

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
111968_y2012_withTandIce
latitude_N longitude_E depth_m datetime
0 67.903 -168.232 30 2012-08-19 02:04:00
1 67.906 -168.233 30 2012-08-19 02:47:00
2 67.907 -168.227 30 2012-08-19 03:21:00
3 67.910 -168.224 30 2012-08-19 03:47:00
4 67.909 -168.229 30 2012-08-19 04:31:00
... ... ... ... ...
13077 73.645 -202.764 30 2013-10-21 04:49:00
13078 73.644 -202.759 30 2013-10-21 05:02:00
13079 73.644 -202.753 30 2013-10-21 05:21:00
13080 73.650 -202.743 30 2013-10-21 05:44:00
13081 73.648 -202.734 30 2013-10-21 06:00:00

13082 rows × 4 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']