% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/WeightCells.R
\name{WeightCells}
\alias{WeightCells}
\title{Compute the square-root of the cosine of the latitude weighting on the given 
array.}
\usage{
WeightCells(data, lat, lat_dim = "lat", ncores = NULL)
}
\arguments{
\item{data}{A numeric array with named dimensions, representing the data to be
applied the weights. It should have at least the latitude dimension and it 
can have more other dimensions.}

\item{lat}{A numeric array with one dimension containing the latitudes.}

\item{lat_dim}{A character string indicating the name of the latitudinal
dimension. The default value is 'lat'.}

\item{ncores}{An integer indicating the number of cores to use for parallel 
computation. The default value is NULL.}
}
\value{
An array with same dimensions as parameter 'data'.
}
\description{
This function performs square-root of the cosine of the latitude weighting on 
the given array.
}
\examples{
exp <- array(rnorm(1:30), dim = c(lat = 3, lon = 5, sdate = 2))
lat <- rnorm(3)*10
\dontrun{
res <- WeightCells(data = exp, lat = lat)
}
}
