See also plot_ereefs_profile(), which relies on output from this function.

get_ereefs_profile(
  var_names = c("Chl_a_sum", "TN"),
  geolocation = 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,
  squeeze = TRUE,
  override_positive = FALSE
)

Arguments

var_names

A vector of EMS variable names. Defaults to `c("Chl_a_sum", "TN")`.

geolocation

Latitude and longitude of the location to extract.

start_date

Start of the extraction period. Can be a `Date`, `POSIXct`, character string, or a vector such as `c(year, month, day)`. Date-only inputs default to midday in `Etc/GMT-10`.

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 menu-style shortcuts remain available for backward compatibility.

input_grid

Optional alternative source for vertical grid metadata, or a precomputed grid list.

eta_stem

Legacy fallback for locating surface elevation (`eta`) when it is not in the main file.

squeeze

Whether to reduce the dimensionality of the returned profile array when there is only one variable and/or one time step.

Value

A list containing the time vector, surface elevation (`eta`), vertical grid (`z_grid`), bottom depth (`botz`), and extracted profile values.

Details

Extracts one or more vertical profiles over a requested time period. For live catalog-backed workflows, the function resolves the required files and aligns times as closely as possible to the requested period.