This function takes 24 hourly files from the same day and variable and converts them to a daily format. You have the choice of four different aggregation methods: min, max, mean, and sum.
Usage
metnordic_aggregate(
directory,
variable,
method,
day,
outpath,
overwrite = TRUE,
preview = TRUE
)
Arguments
- directory
String: Path to the source files
- variable
String: MET Nordic variable to aggregate (ie. "precipitation_amount", (see more))
- method
String: method of aggregation ("mean", "min", "max", "sum")
- day
String: day to convert ("YYYYMMDD" format, ie. "20150901")
- outpath
String: path to directory of to be created files
- overwrite
Logical: overwrite existing file?
- preview
Logical: plot map?
Details
This function is designed to take input from metnordic_download()
and
provides input for metnordic_merge()
Code largely adapted from this handy guide: (link) from Pat Bartlein, bartlein@uoregon.edu