Skip to contents

Produce a seasonal plot (Nov of targetyear-1 to Jul of targetyear) showing SST relative to the site MMM and MMM+1 degrees C threshold, with a bottom bar indicating NOAA-style bleaching alert status derived from hotspots and dhw.

Usage

plot_sst_timeseries(
  input,
  startdate,
  enddate = NULL,
  title = "",
  legend_position = c(0.95, 0.4)
)

Arguments

input

A list containing at least these terra::SpatRaster elements:

  • sst – daily sea-surface temperature (with time dimension)

  • mmm – maximum monthly mean (single-layer raster or single cell)

  • hotspots – daily hotspots (same time as sst)

  • dhw – daily Degree Heating Weeks (same time as sst)

Typically this is the output from your climatology pipeline.

startdate

start date for timeseries

enddate

end date for timeseries

title

legend title

legend_position

legend position from ggplot standard

Value

A ggplot2 object.

Examples

if (FALSE) { # \dontrun{
p <- plot_sst_timeseries(eyrie_climatology, startdate = "2023-11-01", enddate = "2026-02-28")
print(p)
} # }