CDIP Station Plot - Spectrum

Plot Wave Energy Density and Mean Direction using OPeNDAP service from CDIP THREDDS Server.

Station Number

Enter CDIP Buoy Station Number and time to plot

CDIP buoy data are available in two subsets:

Import Python Libraries

This notebook was generated using:

Data Access

Import NetCDF Data from THREDDS URL

Archived and Realtime NetCDF files must be called using separate URLs

Open Remote Dataset from CDIP THREDDS Server

Create variables of interest from NetCDF file.

Get station name to use in plot title

Helper Functions for Dates

NetCDF stores time variables as UNIX dates (values are in seconds since 01-01-1970 00:00:00). The below functions allow us to convert between human-format timestamps (e.g. 'MM/DD/YYYY') and UNIX timestamps.

Time Index Values

Convert user supplied start date to a UNIX timestamp. Then find the nearest corresponing index value within the 'waveTime' array.

Plot Wave Energy Density and Mean Direction