% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/CST_RFTemp.R
\name{.downscalet}
\alias{.downscalet}
\title{Lapse-rate temperature correction downscaling}
\usage{
.downscalet(
  t,
  lon,
  lat,
  oro,
  lono,
  lato,
  xlim = NULL,
  ylim = NULL,
  radius = 0,
  lapse = 6.5,
  nolapse = FALSE,
  verbose = FALSE,
  compute_delta = FALSE,
  method = "bilinear",
  delta = NULL
)
}
\arguments{
\item{t}{matrix of input temperature data}

\item{lon}{vector of input longitudes}

\item{lat}{vector of input latitudes}

\item{oro}{matrix of topographical elevations (in meters)
The destination downscaling area must be contained in the orography field.}

\item{lono}{vector of orography longitudes}

\item{lato}{vector of orography latitudes}

\item{xlim}{vector of longitude bounds; the full input field is downscaled if `xlim` and `ylim` are not specified.}

\item{ylim}{vector of latitude bounds}

\item{radius}{smoothing radius expressed in longitude units
(default is half a large-scale pixel)}

\item{lapse}{environmental lapse rate (in K/Km)}

\item{nolapse}{logical, if true `oro` is interpreted as a fine-scale
climatology and used directly for bias correction}

\item{verbose}{logical if to print diagnostic output}

\item{compute_delta}{logical if true returns only a delta to be used for
out-of-sample forecasts.}

\item{delta}{matrix containing a delta to be applied to the input data.
The grid of this matrix is supposed to be same as
that of the required output field}
}
\value{
A downscaled temperature matrix
}
\description{
Downscales a temperature field using a lapse-rate
correction based on a reference orography. Time-averaging is done on all
dimensions after the first two.
}
\examples{
lon=5:20
lat=35:40
t=runif(16*6); dim(t)=c(16,6)
lono=seq(5,20,0.1)
lato=seq(35,40,0.1)
o=runif(151*51)*2000; dim(o)=c(151,51)
td=.downscalet(t,lon, lat,o,lono,lato,c(8,12),c(36,38))
}
\author{
Jost von Hardenberg, \email{j.vonhardenberg@isac.cnr.it}
}
