Function to detect events within a NetCDF file using the Hobday et al. 2016 definition.
detect3(
  file_in,
  clim_period,
  min_dur = 5,
  max_gap = 2,
  file_out = NULL,
  return_type = NULL,
  save_to_file = NULL,
  ...
)A NetCDF file
The climatology baseline period provided as two date values.
E.g. c("1982-01-01", "2011-12-31")
The minimum duration for acceptance of detected events.
The default is 5 days.
The maximum length of gap allowed for the joining of MHWs. The
default is 2 days.
File output location with name and extension of the file
Default NULL will prevent the data being saved in memory. Other options are "rast", to return a SpatRasterDataset, and "df", to return a data.frame with the events organized by raster cell
Default NULL will prevent the data being saved in memory. Other options are "nc", to save a NetCDF, and "csv", to save as a csv file.
One may pass any arguments to this functions that would be used via
heatwaveR::ts2clm() or heatwaveR::detect_event().
Depending on the arguments set, this function will return the heatwaves detected in the NetCDF file provide. It may also output the results as a CSV file.
# \donttest{
mhw_cube <- detect3(file_in = system.file("extdata/oisst_short.nc", package = "heatwave3"),
                    return_type = "df", clim_period = c("1982-01-01", "2011-12-31"))
# }