Extracts either a series of vertical profiles along a path or a vertical slice through the model field at a specified time. The active implementation follows the cells intersected by the path rather than interpolating between cell centres.

get_ereefs_slice(
  var_names = c("Chl_a_sum", "TN"),
  geolocation = data.frame(latitude = c(-20, -20), longitude = c(148.5, 149)),
  target_date = c(2016, 2, 4),
  input_file = "menu",
  input_grid = NA,
  eta_stem = NA,
  robust = FALSE,
  override_positive = FALSE
)

Arguments

var_names

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

geolocation

Data frame of latitude and longitude vertices defining the requested path. Two points define a straight transect; three or more points define a curved or zig-zag path.

target_date

Target date or date-time to extract. 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`.

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 (`z_grid`).

eta_stem

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

robust

If `TRUE`, extract one profile at a time. This is slower but can be useful for difficult remote datasets.

override_positive

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

Value

A list containing surface elevation (`eta`), bottom depth (`botz`), intersected cell centres and intersections, the vertical grid (`z_grid`), extracted values, and cross-reference information for the input transect.