Calculates either the mean concentration over the wet water column or, when `mass = TRUE`, the vertically integrated mass per square metre.

get_ereefs_depth_integrated_ts(
  var_names = c("Chl_a_sum", "TN"),
  geocoordinates = c(-23.39189, 150.88852),
  start_date = c(2016, 2, 4),
  end_date = c(2016, 3, 2),
  input_file = "catalog",
  input_grid = NA,
  eta_stem = NA,
  override_positive = FALSE,
  verbosity = 1,
  mass = FALSE
)

Arguments

var_names

either a single character value or a vector specifying the short names for variables that you want from the netcdf file. Defaults to c('Chl_a_sum', 'TN').

geocoordinates

A tibble of decimal latitude and longitude pairs, or a length-two vector containing a single location. `geocoordinates` can also be set to `"mmp"` to extract time-series at all Marine Monitoring Program sites. Additional columns are preserved, for example site names.

start_date

Start of the extraction period. Can be a vector such as `c(year, month, day)`, a `Date`/`POSIXct`, or a character string accepted by [get_date_time()].

end_date

End of the extraction period, specified as for `start_date`.

input_file

NetCDF file path, OPeNDAP URL, or THREDDS catalog URI. THREDDS catalogs are preferred for live multi-file requests. Legacy shortcuts such as `"nci"`, `"menu"`, `"catalog"`, `"old_menu"`, and old numeric menu selections are still accepted for backward compatibility.

input_grid

Optional alternative source for vertical grid metadata (`z_grid`). This can be a local or remote NetCDF file that carries the required layer-interface information.

eta_stem

Legacy fallback for locating surface elevation (`eta`) when it is not in the main file. Usually unnecessary for catalog-driven workflows.

override_positive

Reverse the value of the "positive" attribute of botz for BGC files, assuming that it is incorrect. Default FALSE. Not normally needed.

verbosity

How much information to display along the way (0 to 2. Default is 1).

mass

Logical; if `TRUE`, return mass per square metre instead of the mean concentration over depth.

Value

A tibble containing dates, matched locations, water-column depth, and extracted values. Variable metadata from the source NetCDF file is attached as `variable_metadata`, `units`, `long_name`, and `standard_name` attributes; `watercol_depth` is reported in metres.

Examples

if (FALSE) { # \dontrun{
get_ereefs_depth_integrated_ts(
  c("Chl_a_sum", "NH4"),
  geocoordinates = tibble::tibble(latitude = -23.39189, longitude = 150.88852),
  start_date = c(2010, 12, 31),
  end_date = c(2011, 1, 5),
  input_file = 2
)
} # }