autoDetect3: Autodetection algorithm 3

Description Usage Arguments Details Value

View source: R/autoDetect3.R

Description

Take a data frame processed from data downloaded from ERDDAP and evaluates upwelling by comparing the SST at a point along a smoothed coast to the average SST at a point offshore. This uses a smoothed coastline, smoothed offshore line, and coastal sample points that are part of the imageML package. See smoothCoastData.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
autoDetect3(
  x,
  threshold = 2,
  val = "sst",
  p = imageryML::sample_points$wintri$km100,
  smooth.method = "ksmooth",
  l.offshore = imageryML::buffer300$wintri$line,
  d.offshore = 50,
  l.coast = imageryML::buffer20$wintri$line,
  d.coast = 0,
  na.rm = TRUE,
  ...
)

Arguments

x

cleaned dataframe of SST values. See processOIData(). Note, this function might require that lon_0=0 in the crs.

threshold

offshore-coast difference for upwelling

val

what the SST column is called

p

the coastal points as a sp::SpatialPoints object. Default is to use km100 in data("sample_points)" for the coastline where the islands are not removed.

smooth.method

(optional) the smoothing to apply to the offshore line

l.offshore

(optional) the offshore line as a sp::SpatialLines object.

d.offshore

the radius of the circle to average around the offshore points.

l.coast

(optional) the coast line as a sp::SpatialLines object.

d.coast

the radius along the coast to average around the coast points. Operates only along the coast line.

na.rm

whether to remove NAs in the raster when calculating the offshore SST. Used to deal with islands.

...

extra smoothing parameters to pass to getNearestPointOnLine().

Details

This expects that only one date is in the dataframe. Run this code to filter the dataframe by date. df_processed <- x %>% dplyr::filter(date == custom_date)

The coastal points and offshore line are saved data objects in imageryML. See vignette("Smooth Coastline Data") for how these data were created.

Value

dataframe with upwelling TRUE/FALSE added


UW-Upwelling-Project/imageryML documentation built on Dec. 18, 2021, 6:11 p.m.