map_ereefs.RdExtracts a single time slice from a local NetCDF file, OPeNDAP dataset, or THREDDS catalog-backed workflow and returns a `ggplot2` map. The function supports both curvilinear EMS grids with cell corners and regular regridded products that provide cell centres only.
map_ereefs(
var_name = "true_colour",
target_date = c(2018, 1, 30),
layer = "surface",
Land_map = FALSE,
input_file = "catalog",
input_grid = NA,
scale_col = "viridis",
scale_lim = c(NA, NA),
plot_style = c("polygon", "smooth"),
smooth_pixels = 600,
zoom = 6,
box_bounds = c(NA, NA, NA, NA),
p = NA,
suppress_print = TRUE,
return_poly = FALSE,
label_towns = TRUE,
strict_bounds = FALSE,
mark_points = NULL,
gbr_poly = FALSE
)Variable to plot. Special values `"true_colour"` and `"plume"` are also supported.
Date or date-time to plot. If an exact match is not available, the nearest model output time is used.
Layer selector. Use a positive layer index, a negative depth below mean sea level, or `"surface"`/`"bottom"`.
Logical; add a simple land underlay where available.
NetCDF file path, OPeNDAP URL, or THREDDS catalog URL.
Optional alternative source for grid metadata.
Colour scale specification. Defaults to `"viridis"` for scalar maps.
Numeric colour limits. If left as `NA`, limits are inferred from the extracted data.
Either `"polygon"` or `"smooth"`.
Resolution used for `"smooth"` display maps.
Deprecated legacy argument retained for backward compatibility.
Optional bounds in the form `c(longitude_min, longitude_max, latitude_min, latitude_max)`.
Optional existing plot object to add to.
Logical; if `TRUE`, suppresses automatic printing.
Logical; if `TRUE`, return a list containing the plot and plotting polygons instead of only the plot object.
Logical; add town labels where available.
Deprecated legacy argument retained for backward compatibility.
Optional locations to mark on the map.
Logical; add GBR polygon overlay when available.
A `ggplot2` object, or if `return_poly = TRUE`, a list containing the plot, plotting polygons, cell values, and associated metadata.