Repeatedly calls [map_ereefs()] over a date range, saving frame images when requested and optionally assembling them into a GIF or MP4 animation.

map_ereefs_movie(
  var_name = "true_colour",
  start_date = c(2015, 12, 1),
  end_date = c(2016, 3, 31),
  layer = "surface",
  output_dir = "ToAnimate",
  save_frames = TRUE,
  animation_format = c("none", "gif", "mp4", "mp3"),
  animation_file = NA,
  fps = 2,
  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),
  suppress_print = TRUE,
  stride = "daily",
  verbosity = 0,
  label_towns = TRUE,
  strict_bounds = FALSE,
  mark_points = NULL,
  gbr_poly = FALSE,
  add_arrows = FALSE,
  max_u = NA,
  scale_arrows = NA,
  show_bathy = FALSE,
  contour_breaks = c(5, 10, 20)
)

Arguments

var_name

Variable to plot. Special values `"true_colour"` and `"plume"` are also supported.

start_date

Start of the animation period.

end_date

End of the animation period.

layer

Layer selector. Use a positive layer index, a negative depth below mean sea level, or `"surface"`/`"bottom"`.

output_dir

Directory in which to save frame images and animation outputs.

save_frames

Logical; save individual frame PNG files.

animation_format

One of `"none"`, `"gif"`, `"mp4"`, or legacy `"mp3"` (which is treated as `"mp4"` with a warning).

animation_file

Optional output filename for the assembled animation.

fps

Frames per second for assembled animations.

Land_map

Logical; add a simple land underlay where available.

input_file

NetCDF file path, OPeNDAP URL, or THREDDS catalog URL.

input_grid

Optional alternative source for grid metadata.

scale_col

Colour scale specification. Defaults to `"viridis"` for scalar maps.

scale_lim

Numeric colour limits. If left as `NA`, limits are inferred from the extracted data.

plot_style

Either `"polygon"` or `"smooth"`.

smooth_pixels

Resolution used for `"smooth"` display maps.

zoom

Deprecated legacy argument retained for backward compatibility.

box_bounds

Optional bounds in the form `c(longitude_min, longitude_max, latitude_min, latitude_max)`.

suppress_print

Logical; if `TRUE`, suppresses automatic printing.

stride

Temporal stride used to choose frames.

verbosity

Verbosity level for progress messages.

label_towns

Logical; add town labels where available.

strict_bounds

Deprecated legacy argument retained for backward compatibility.

mark_points

Optional locations to mark on the map.

gbr_poly

Logical; add GBR polygon overlay when available.

add_arrows

Deprecated legacy argument retained for backward compatibility.

max_u

Deprecated legacy argument retained for backward compatibility.

scale_arrows

Deprecated legacy argument retained for backward compatibility.

show_bathy

Deprecated legacy argument retained for backward compatibility.

contour_breaks

Deprecated legacy argument retained for backward compatibility.

Value

A list containing the final plot, averaged plotting polygons, saved frame filenames, animation filename, and the colour scale limits used across frames.