buoy_sst: Daily average sea surface temperatures for 19 buoys (yielding...

buoy_sstR Documentation

Daily average sea surface temperatures for 19 buoys (yielding over 170,000 values) calculated with data from Environment and Climate Change Canada (ECCC) and DFO.

Description

A tibble of daily average calculations of sea surface temperature in coastal Canadian Pacific waters. The earliest data are from September 1987, and 14 buoys were still providing data as of May 2023. See the example code below to see the start and end dates for each buoy.

Usage

buoy_sst

Format

A tibble with columns:

date:

date (of class 'Date') used to calculate the 'sst', based on UTC -8 hours (i.e. Pacific Standard Time, not changing due to daylight savings)

stn_id:

station identifier, which is the World Meteorolgical Organisation id number (https://www.ndbc.noaa.gov/faq/staid.shtml#:~:text=The preceded by a 'C', which is how ECCC refers to them

sst:

calculated mean sea surface for that day at that station (based on Pacific Standard Time)

Details

All buoys are ECCC buoys, with DFO providing the historical and updated data for 17 of them, and ECCC providing data for the other two that started in October 2019 and are related to the Oceans Protection Plan. Data are downloaded from https://data.cioospacific.ca/erddap/ when we (developers) update 'pacea' using 'data-raw/buoys/buoy-sst.R'. That code does a lot of wrangling of the data (so you don't have to!), such as using some of the flags from Kellog et al. (2021), dealing with timezones, ignoring pesky daylight savings time changes, and averaging over a day (which we will refine, see Issue #26).

All data is stored in 'pacea', and will be updated monthly. Data for the two buoys from ECCC seems to be available with a lag of only an hour, whereas it's a few days for the DFO data. If you need data as up-to-date as possible then contact Andrew Edwards and he can update the package. Or do the following if you understand it: clone the 'pacea' repo from GitHub, 'load_all()', run ‘data-raw/buoys/buoy-sst.R', and you’ll have your own up-to-date version of pacea. Some of the DFO-based data are in the ECCC-based data, and so there is overlap. We stuck with the download of the DFO data for pacea, though if you really want ECCC data to be used (as it's slightly more up-to-date) we can look at checking the values are the same and switching the workflow to used ECCC.

See 'buoy_metadata' for details on each buoy.

Adapted from Andrea Hilborn's code at https://github.com/IOS-OSD-DPG/Pacific_SST_Monitoring/blob/main/scripts/POI_latlon.R

Kellogg, J.P., Rosenstock, N.L, Page, S.J., Hourston, R.A.S., Devred, E., and Hannah, C.G. (2021). Quality Control of Weather/Wave Buoy Temperature Data Provided by Environment and Climate Change Canada. https://drive.google.com/file/d/1J6I8PFuDN0Ca-8wdjfmAWRmeylPGn_s4/view

Author(s)

Andrew Edwards and Andrea Hilborn

Source

Generated from running 'data-raw/buoys/buoy-sst.R'.

Examples

## Not run: 
buoy_sst

# Calculate the range of dates for each buoy
library(dplyr)
buoy_ranges <- buoy_sst %>% group_by(stn_id) %>%
  summarise(start = min(date),
            end = max(date))
buoy_ranges
sort(buoy_ranges$start) # This start dates won't change as data are updated
# "1987-09-20" "1987-09-22" "1988-08-04" "1988-11-22" "1988-11-22"
# "1988-11-22" "1989-09-07" "1989-10-18" "1990-07-12" "1991-04-17"
# "1991-05-15" "1991-09-12" "1992-03-13" "1992-10-20" "1993-06-17"
# "1994-05-05" "2001-02-19" "2019-10-01" "2019-10-01"
sort(buoy_ranges$end)   # This end dates change as data are updated, except for
  ones that have ceased recording; these values are as of 2023-06-14 (the
  last two are the two for which data come from ECCC):
# "2016-12-09" "2020-07-04" "2022-04-17" "2022-05-15" "2022-09-08"
# "2023-05-14" "2023-06-11" "2023-06-11" "2023-06-11" "2023-06-11"
# "2023-06-11" "2023-06-11" "2023-06-11" "2023-06-11" "2023-06-11"
# "2023-06-11" "2023-06-11" "2023-06-14" "2023-06-14"

##' TODO Add plotting function example once written the code.

## End(Not run)

pbs-assess/PACea documentation built on April 17, 2025, 11:36 p.m.