Use [get_ereefs_ts()] instead when a fixed depth below mean sea level is sufficient. This helper is slower because it needs free-surface information to determine the appropriate wet layer at each time step.

get_ereefs_depth_specified_ts(
  var_names = c("Chl_a_sum", "TN"),
  geocoordinates = c(-23.39189, 150.88852),
  depth = 5,
  start_date = c(2016, 2, 4),
  end_date = c(2016, 3, 2),
  input_file = "catalog",
  input_grid = NA,
  eta_stem = NA,
  verbosity = 1
)

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.

depth

Depth in metres below the free surface. If the water column is shallower than the requested depth, values are taken from the bottom wet layer.

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.

verbosity

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

Value

A tibble containing dates, matched locations, and extracted values. Variable metadata from the source NetCDF file is attached as `variable_metadata`, `units`, `long_name`, and `standard_name` attributes.

Examples

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