distributeQli: Distributes incoming longwave radiation to shorter time...

View source: R/distributeQli.R

distributeQliR Documentation

Distributes incoming longwave radiation to shorter time interval

Description

Downscales incoming longwave radiation to shorter time intervals, based on the air temperatures, using the Stefan-Boltzmann law Q_{li}=\epsilon \sigma T^{4}. The atmospheric emissivity (\epsilon) is calculated from the longwave radiation and the temperature at the original time intervals. The air temperatures are interpolated to the shorter intervals (if required), and are then used to calculate the incoming longwave, using the longer-interval emissivities. Finally, the downscaled longwave radiation is adjusted so that its mean values over the original time intervals are the same as the original values.

Usage

distributeQli(
  QliObs,
  QliColnum = 1,
  tObs,
  tColnum = 1,
  timeStep = 1,
  interpolationMethod = "linear",
  maxlength = 0,
  quiet = TRUE,
  logfile = ""
)

Arguments

QliObs

Required. A CRHMr obs data frame containing incoming longwave radiation in in W/m^2.

QliColnum

Optional. The number of the columns (not including the datetime) containing the incoming longwave values. Default is 1.

tObs

Required. A CRHMr obs data frame containing air temperatures. The values may be in K or ^\circC (the function will detect and adjust).

tColnum

Optional. The number of the columns (not including the datetime) containing the air temperature values. Default is 1.

timeStep

Optional. The number of hours to be used as the downscaled time step. Default is 1.

interpolationMethod

Optional. The method to be used for interpolating the air temperatures (if required). Currently supported methods are linear and spline. The default is to use linear interpolation.

maxlength

Optional. The maximum gap length to be interpolated. If not specified (the default), then the maximum gap length permitted is twice the time interval of the air temperatures.

quiet

Optional. Suppresses display of messages, except for errors. If you are calling this function in an R script, you will usually leave quiet=TRUE ( i.e. the default). If you are working interactively, you will probably want to set quiet=FALSE.

logfile

Optional. Name of the file to be used for logging the action. Normally not used

Value

If successful, returns an obs data frame containing the downscaled incoming longwave radiation (Qli) in W/m^2. If unsuccessful, returns an error.

Author(s)

Kevin Shook

See Also

emissivity longwave interpolate

Examples

## Not run: 
hourlyLongwave <- distributeQli(LWobs, 1, tobs, 1)

## End(Not run)

CentreForHydrology/CRHMr documentation built on April 6, 2024, 5:27 p.m.