% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/filterNC.R
\name{filterNC}
\alias{filterNC}
\title{Crop NetCDF file}
\usage{
filterNC(file, startdate, enddate, outfile)
}
\arguments{
\item{file}{\code{character}. Filepath, which should lead to NetCDF files.}

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

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

\item{outfile}{\code{character}. Output filename of the croped data.}
}
\value{
A NetCDF file containing the croped data.
}
\description{
Crop NetCDF file
}
\examples{
\dontrun{
file <- list.files(paste0(system.file(package="processNC"), "/extdata"), 
                   pattern="tas.*\\\\.nc", full.names=TRUE)[4]
temp <- tempfile(fileext=".nc")
filterNC(file=file, startdate=2005, enddate=2007, outfile=temp)
terra::plot(terra::rast(temp))
}
}
