% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/summariseNC.R
\name{summariseNC}
\alias{summariseNC}
\title{Summarise values of one or multiple NetCDF Files over time and/or space}
\usage{
summariseNC(
  files,
  startdate = NA,
  enddate = NA,
  ext = NA,
  group_col = c("year", "month"),
  name = NA,
  cores = NA,
  filename1 = "",
  filename2 = "",
  overwrite = FALSE
)
}
\arguments{
\item{files}{\code{character}. A filepath or list of filepaths. Filepath should lead to a NetCDF file.}

\item{startdate}{\code{integer}. Start year.}

\item{enddate}{\code{integer}. End year.}

\item{ext}{\code{extent}. If present the NetCDF file is subset by this extent.}

\item{group_col}{\code{character}. Columns to use for group_at call, one of week, month, year, c("week", "year") or c("month", "year")}

\item{name}{\code{character}. Name of variable, can be one of pr, tas, tasmax, tasmin, sfcWind, hurs, huss, dis}

\item{cores}{\code{integer}. Number of cores for parallel computing. If this argument is not provided, at least half the number of availabe cores will be used.}

\item{filename1}{\code{character}. Output filename of the averaged data. If this argument is not provided, result will not be written to disk.}

\item{filename2}{\code{character}. Output filename of the coefficient of variation. If this argument is not provided, the coefficient of variation will not be written to disk.}

\item{overwrite}{\code{logical}. If TRUE, existing files will be overwritten.}
}
\value{
A raster stack with monthly layers of aggregated data over the specified time period and area.
}
\description{
Summarise spatial/spatio-temporal measurements of one or multiple NetCDF files 
to a raster stack or data.frame with desired spatial and temporal resolution
}
\examples{
files <- list.files(paste0(system.file(package="processNC"), "/extdata"), 
                    pattern="tas.*\\\\.nc", full.names=TRUE)
summariseNC(files=files[4], group_col=c("year", "month"), 
            startdate=2001, enddate=2010, cores=1)
summariseNC(files=files[4], group_col=c("year", "week"), 
            startdate=2001, enddate=2010, cores=1)
summariseNC(files=files[4], group_col="year", 
            startdate=2001, enddate=2010, cores=1)
summariseNC(files=files[4], group_col="month", 
            startdate=2001, enddate=2010, cores=1)
summariseNC(files=files[4], group_col="week", 
            startdate=2001, enddate=2010, cores=1)
}
\seealso{
[aggregateNC]
}
