ERAhourlyShortwave: Estimates hourly incoming shortwave radiation from...

View source: R/ERAhourlyShortwave.R

ERAhourlyShortwaveR Documentation

Estimates hourly incoming shortwave radiation from ERA-Interim 3-hourly values or ERA-40 6-hourly values

Description

This function is called after using the function getNearestERAtimeseries. This function removes negative values, deaccumulates the ERA-Interim 12-hour cumulative values, using the function ERAdeaccum and interpolates the 3-hour values to hourly values, based on the extra-terrestrial hourly radiation. ERA-40 6-hourly instantaneous values are interpolated directly to hourly values.

Usage

ERAhourlyShortwave(
  ERAssrd,
  ssrdColnum = 1,
  latitude,
  sunTimeOffset = 2,
  solarMethod = "simpleMaxSolar",
  interpolationMethod = "linear",
  quiet = TRUE,
  logfile = ""
)

Arguments

ERAssrd

Required. The CRHMr obs dataframe of ERA ssrd values. The values must not be deaccumulated, as the deaccumERA function is called by this function.

ssrdColnum

Optional. The column number containing the ssrd values, not including the datetime. Default is column 1.

latitude

Required. The latitude of the point at which the ssrd data is extracted. This value is used to calculate the extra-terrestrial incoming solar radiation. Not used for ERA-40 data.

sunTimeOffset

Optional. Number of hours that local noon is offset from solar noon. The default is 2 hours. Not used for ERA-40 data.

solarMethod

Optional. The method to be used for calculating the extra-terrestrial radiation for 3-hourly ERA-Interim data. The default is simpleMaxSolar. The other supported method is PotSolarInst, which requires the package EcoHydRology to be installed.

interpolationMethod

Optional. This is the method to be usied for interpolating instantaneous values from ERA-40. The default is linear, but spline can also be specified.

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 dataframe containing the interpolated hourly ERA incoming shortwave radiation (Qsi). If unsuccessful, returns the value FALSE.

Author(s)

Kevin Shook

See Also

ERAgetNearestTimeseries ERAhourlyLongwave distributeQsi

Examples

## Not run: 
hourlyQsi <- ERAhourlyShortwave(ssrd, latitude = 51.69)
## End(Not run)


CentreForHydrology/Reanalysis documentation built on Nov. 23, 2022, 2:57 a.m.