distributeQsi: Distributes incoming shortwave radiation to shorter time...

View source: R/distributeQsi.R

distributeQsiR Documentation

Distributes incoming shortwave radiation to shorter time interval

Description

Downscales incoming shortwave radiation to shorter time intervals, based on the extra-terrestrial radiation. The mean atmospheric transmittance is computed from the ratio of the incoming shortwave to the extra-terrestrial radiation over the original time intervals. The extra-terrestrial radiation over the shorter time intervals is then multiplied by the mean transmittance values to calculate the shorter interval incoming shortwave radiation.

Usage

distributeQsi(
  QsiObs,
  QsiColnum = 1,
  latitude = "",
  sunTimeOffset = 2,
  timeStep = 1,
  solarMethod = "simpleMaxSolar",
  details = FALSE,
  quiet = TRUE,
  logfile = ""
)

Arguments

QsiObs

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

QsiColnum

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

latitude

Required. The latitude for which values are to be calculated.

sunTimeOffset

Optional. The offset (in hours) is added to the solar time to convert it to local time. The default value 2 shifts the daily peak to occur at 2pm.

timeStep

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

solarMethod

The method to be used for calculating the extra-terrestrial radiation. The default method is simpleMaxSolar. Note that this method is only valid for latitudes between 49 and 55^\circN. The other supported method is PotSolarInst, which requires the package EcoHydRology to be installed.

details

Optional. If TRUE then the calculated atmospheric transmittance and extra-terrestrial radiation (So_h_W) will be returned along with the downscaled Qsi. If FALSE (the default) then only the Qsi values and the datetime are returned.

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 shortwave radiation (Qsi) in W/m^2 and, optionally, the transmittance and extra-terrestrial solar radiation (So_h_W). If unsuccessful, returns an error.

Author(s)

Kevin Shook

See Also

simpleMaxSolar distributeQli

Examples

## Not run: 
hourlyShortwave <- distributeQsi(QsiObs=SWobs, QsiColnum=1, latitude=51.1, timeStep=1)
## End(Not run)


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