This function give the morphological metrics for an extreme event, extreme_event_spatraster is the SpatRaster you want to analyze (it needs to be binarise with the mhw function)

BEE.calc.metrics_morpho(
  extreme_event_spatraster,
  start_date = NULL,
  end_date = NULL,
  per_pix = FALSE,
  noise = NULL
)

Arguments

extreme_event_spatraster

: The SpatRaster you want to analyse (first output of BEE.id.extreme_events()).

start_date

: Allows to perform the analysis on a specific time_frame, this allows to save computation time.

end_date

: Allows to perform the analysis on a specific time_frame, this allows to save computation time.

per_pix

: Use TRUE if you want a list with one dt per pixel as an output. Use TRUE to be able to use the output in BEE.data.merge().

noise

: The maximum distance (in metres) that you accept to use to slightly randomly move points if a patch is perfectly symmetrical allows you to compute the associated ellipse. See the 'Calculate metrics on the shape of an extreme event' vignette for more details.

Value

Units related to area are in meters squared.

Note

BEE.calc.metrics_morpho is not designed to work on 4D data (time+spatial 3D).

Examples

# Load example data:
library(BioExtremeEvent)
file_name_1 <- system.file(file.path("extdata",
                                     "binarized_corrected_spatraster.tiff"),
                                     package = "BioExtremeEvent")
extreme_event_spatraster <- terra::rast(file_name_1)

# Get metrics value per pixel x day:
list_morpho_metrics <- BEE.calc.metrics_morpho(extreme_event_spatraster,
start_date = "2024-05-01",
end_date = "2024-11-30",
per_pix=TRUE,
noise=NULL)

dataframe_list <- list_morpho_metrics[[1]] # One df per pixel
patch_spatraster <- list_morpho_metrics[[2]]