Create a daily aggregation from an hourly datacube
Source:R/rst_aggregations.R
datacube_aggregation.Rdhttps://confluence.ecmwf.int/display/CKB/ERA5+family+post-processed+daily+statistics+documentation # nolint: line_length_linter
Arguments
- input_path
Path to the datasetcube
- output_filename
Path to the output file
- fun
Function to be applied to the datasetcube (default is sum). The function must be a function that takes a vector as input and returns a single value. The main functions to be used are: Sum, Mean, Min, Max, First and Last. For last, use
dplyr::last. To use customized function say, for example "min", you could use use the format fun = \(x) min(x). Seeterra::tapp()for more information.- cores
Number of cores to use for the aggregation. Default is 1. See
terra::tapp()for more information. Seeterra::tapp()for more information.- ...
Additional arguments to pass to
names_to_date()
Details
datacube_aggregation() aggregates a datacube by a given function. The
function will be applied to each day of the datacube.