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

Underway CTD (GWA): Towed CTD

Environmental Drivers: Continuous Plankton Recorders, Gulf Watch Alaska

This project is a component of the integrated Long-term Monitoring of Marine Conditions and Injured Resources and Services submitted by McCammon et. al. Many important species, including herring, forage outside of Prince William Sound for at least some of their life history (salmon, birds and marine mammals for example) so an understanding of the productivity of these shelf and offshore areas is important to understanding and predicting fluctuations in resource abundance. The Continuous Plankton Recorder (CPR) has sampled a continuous transect extending from the inner part of Cook Inlet, onto the open continental shelf and across the shelf break into the open Gulf of Alaska monthly through spring and summer since 2004. There are also data from 2000-2003 from a previous transect. The current transect intersects with the outer part of the Seward Line and provides complementary large scale data to compare with the more local, finer scale plankton sampling on the shelf and in PWS. Resulting data will enable us to identify where the incidences of high or low plankton are, which components of the community are influenced, and whether the whole region is responding in a similar way to meteorological variability. Evidence from CPR sampling over the past decade suggests that the regions are not synchronous in their response to ocean climate forcing. The data can also be used to try to explain how the interannual variation in ocean food sources creates interannual variability in PWS zooplankton, and when changes in ocean zooplankton are to be seen inside PWS. The CPR survey is a cost-effective, ship-of-opportunity based sampling program supported in the past by the EVOS TC that includes local involvement and has a proven track record.

Nominal 7m depth, 2017-2020. 2017 and 2018 have salinity and temperature, 2019 and 2020 have only temperature.

Project overview: https://gulf-of-alaska.portal.aoos.org/#metadata/87f56b09-2c7d-4373-944e-94de748b6d4b/project

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

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
['2017-04-30',
 '2017-05-30',
 '2017-08-01',
 '2017-09-03',
 '2017-10-03',
 '2018-04-17',
 '2018-05-19',
 '2018-06-18',
 '2018-07-21',
 '2019-04-13',
 '2019-05-13',
 '2019-08-17',
 '2019-09-16',
 '2020-07-07',
 '2020-08-09',
 '2020-09-08']

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
2017-08-01
date_time lat lon Temperature Chlorophyll a Depth Salinity jday distance [km]
0 2017-08-01 01:35:00 58.810000 -150.520000 14.040000 -0.115000 6.460000 30.770000 213.067361 0.000000
1 2017-08-01 01:40:00 58.823333 -150.560000 13.523333 -0.120000 6.566667 30.916667 213.070833 2.747297
2 2017-08-01 01:45:00 58.835000 -150.605000 12.750000 -0.140000 6.505000 31.165000 213.074306 5.653269
3 2017-08-01 01:50:00 58.846667 -150.650000 12.563333 -0.136667 6.410000 31.306667 213.077778 8.558461
4 2017-08-01 01:55:00 58.860000 -150.690000 13.290000 -0.130000 6.430000 31.120000 213.081250 11.303710
5 2017-08-01 02:00:00 58.873333 -150.736667 12.946667 -0.126667 6.323333 31.430000 213.084722 14.378725
6 2017-08-01 02:05:00 58.885000 -150.780000 13.015000 -0.130000 6.470000 31.610000 213.088194 17.195728
7 2017-08-01 02:10:00 58.900000 -150.823333 12.943333 -0.133333 6.446667 31.680000 213.091667 20.201336
8 2017-08-01 02:15:00 58.915000 -150.870000 12.725000 -0.145000 6.600000 31.820000 213.095139 23.367506
9 2017-08-01 02:20:00 58.926667 -150.913333 12.713333 -0.150000 6.640000 32.093333 213.098611 26.181846
10 2017-08-01 02:25:00 58.940000 -150.960000 12.730000 -0.140000 6.645000 32.130000 213.102083 29.252334
11 2017-08-01 02:30:00 58.953333 -151.000000 12.473333 -0.166667 6.433333 32.140000 213.105556 31.992370
12 2017-08-01 02:35:00 58.965000 -151.045000 12.565000 -0.155000 6.400000 32.070000 213.109028 34.889647
13 2017-08-01 02:40:00 58.976667 -151.090000 12.540000 -0.166667 6.540000 31.890000 213.112500 37.786144
14 2017-08-01 02:45:00 58.990000 -151.130000 12.785000 -0.160000 6.485000 31.620000 213.115972 40.524132
15 2017-08-01 02:50:00 59.003333 -151.176667 12.936667 -0.146667 6.746667 31.466667 213.119444 43.590319
16 2017-08-01 02:55:00 59.015000 -151.220000 13.010000 -0.145000 6.620000 31.500000 213.122917 46.399013
17 2017-08-01 03:00:00 59.020000 -151.256667 12.396667 -0.170000 6.560000 31.176667 213.126389 48.577767
18 2017-08-01 03:05:00 59.020000 -151.285000 11.715000 -0.200000 6.405000 30.930000 213.129861 50.205289
19 2017-08-01 03:10:00 59.020000 -151.320000 12.350000 -0.183333 6.550000 31.146667 213.133333 52.215758
20 2017-08-01 03:15:00 59.020000 -151.350000 11.710000 -0.215000 6.290000 31.070000 213.136806 53.939017
21 2017-08-01 03:20:00 59.020000 -151.380000 11.983333 -0.216667 6.393333 31.240000 213.140278 55.662276

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)
['salt', 'temp']