% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cdr-fix.R
\name{cdr_fix}
\alias{cdr_fix}
\alias{cdr_fix_names}
\alias{cdr_fix_grid}
\title{Minor fixes to CDR files.}
\usage{
cdr_fix(files, fix = c("names", "grid"))

cdr_fix_names(files)

cdr_fix_grid(files)
}
\arguments{
\item{files}{Path to the files.}

\item{fix}{Character vector with the fixes to implement.}
}
\value{
The path to the modified files.
}
\description{
\code{cdr_fix()} "fixes" some inconsistencies in the raw data.
It standardised variable names between versions and temporal resolutions and
adds projection information to the grid definition so CDO can compute the
area of each gridpoint to compute weighted means or  area integrals.
Both require the \code{rcdo} package and CDO installed.
}
\details{
\code{cdr_fix_names()} and \code{cdr_fix_grid()} are aliases for \code{cdr_fix(fix = "names")}
and \code{cdr_fix(fix = "grid")}, respectively.
Using \code{cdr_fix()} to fix both at the same time is more efficient as it
recreates each file only once.
}
\examples{
\dontrun{
cdr_antarctic_monthly(c("2022-01", "2022-01")) |>
  cdr_fix()
}

}
