Extracts specified sensor value(s) observed by the IMOS mooring nearest to the supplied QC'd detection location(s)

extractMoor(
  trackingData,
  file_loc,
  sensorType = "temperature",
  timeMaxh = Inf,
  distMaxkm = Inf,
  targetDepthm = NA,
  scalc = c("min", "max", "mean")
)

Arguments

trackingData

dataframe containing acoustic detection data in IMOS QC format with the moor_site_code next to it as generated using the mooringDistance function.

file_loc

character string describing folder location in which NetCDF files of mooring data have been saved after running mooringDownload function

sensorType

character string containing name of mooring sensor to query. Can be "temperature", "velocity" or "salinity".

timeMaxh

optional numeric string containing the maximum time threshold to merge detection and mooring sensor values.

distMaxkm

optional numeric string containing the maximum distance threshold in kilometers to include in output.

targetDepthm

extracts the nearest sensor to this depth value. if set as NA then all sensors returned for this timestamp at this mooring

scalc

select the lower or higher depth value when there are 2 options for sensors nearest the targetDepth provided. Users can also specify a mean or NA to return all sensor values.

Value

the trackingData dataframe as a nested tibble object with the sensor values from the nearest moorLocations that fall within the specified time, distance and depth thresholds.