import intake
import hvplot.pandas
import hvplot.xarray
import cook_inlet_catalogs as cic
import holoviews as hv
CTD Transect (CMI UAF): from East Foreland Lighthouse¶
Seasonality of Boundary Conditions for Cook Inlet, Alaska: Transect (3) at East Foreland Lighthouse.
9 CTD profiles at stations across 10 cruises in (approximately) the same locations. Approximately monthly for summer months, 2004 and 2005.
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("ctd_transects_cmi_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
['Cruise-01',
'Cruise-02',
'Cruise-03',
'Cruise-04',
'Cruise-05',
'Cruise-06',
'Cruise-07',
'Cruise-08',
'Cruise-09',
'Cruise-10']
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
Cruise-03
| Cruise | Station | Longitude | Latitude | Depth [m] | Temperature | Salinity | flag | datetime | distance [km] | |
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 3 | 1 | -151.417 | 60.718 | 1 | 15.3663 | 21.0780 | 5 | 2004-08-08 07:55:00 | 0.000000 |
| 1 | 3 | 1 | -151.417 | 60.718 | 2 | 15.3543 | 21.1053 | 5 | 2004-08-08 07:55:00 | 0.000000 |
| 2 | 3 | 1 | -151.417 | 60.718 | 3 | 15.3437 | 21.1434 | 5 | 2004-08-08 07:55:00 | 0.000000 |
| 3 | 3 | 1 | -151.417 | 60.718 | 4 | 15.3313 | 21.1376 | 5 | 2004-08-08 07:55:00 | 0.000000 |
| 4 | 3 | 1 | -151.417 | 60.718 | 5 | 15.3144 | 21.1778 | 5 | 2004-08-08 07:55:00 | 0.000000 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 331 | 3 | 9 | -151.683 | 60.716 | 6 | 14.0800 | 22.1400 | 5 | 2004-08-08 09:20:00 | 14.534355 |
| 332 | 3 | 9 | -151.683 | 60.716 | 7 | 14.0800 | 22.1400 | 5 | 2004-08-08 09:20:00 | 14.534355 |
| 333 | 3 | 9 | -151.683 | 60.716 | 8 | 14.0800 | 22.1400 | 5 | 2004-08-08 09:20:00 | 14.534355 |
| 334 | 3 | 9 | -151.683 | 60.716 | 9 | 14.0800 | 22.1361 | 5 | 2004-08-08 09:20:00 | 14.534355 |
| 335 | 3 | 9 | -151.683 | 60.716 | 10 | 14.0800 | 22.1323 | 5 | 2004-08-08 09:20:00 | 14.534355 |
336 rows × 10 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)
['salt', 'temp']