View source: R/radiationtools.R
cloudfromrad | R Documentation |
cloudfromrad
is used to derive a cloud cover index as 1 - the ratio of measured to clearksy radiation
missing values (e.g. at night) are interpolated
cloudfromrad(
rad,
tme,
lat,
long,
h = 0.00697,
tc = 15,
p = 101300,
G = 2.78,
Ie = 1352.778,
merid = round(long/15, 0) * 15,
dst = 0
)
rad |
a single numeric value or vector of global solar irradiance(s). Units must be the same
as those for |
tme |
a single value or vector of POSIXlt objects indicating the time(s) for which clearksy radiation is required. |
lat |
latitude in decimal degrees |
long |
longitude in decimal degrees |
h |
a single value or vector of specific humidities (kg kg{-1} ). |
tc |
a single value or vector of temperatures (ºC). |
p |
an optional single value or vector of pressures (Pa). |
G |
an optional single value or vector describing he moisture profile in the atmosphere (per Smith 1966). |
Ie |
an optional single value for extra-terrestrail radiation to permit adjustment for sun-earth distances (see details). |
merid |
an optional numeric value representing the longitude (decimal degrees) of the local time zone meridian (0 for GMT). Default is |
dst |
an optional numeric value representing the time difference from the timezone meridian (hours, e.g. +1 for BST if |
If no values for p
are provided, a default value of 101300 Pa, typical of
sea-level pressure, is assumed. The method used is that detailed in
Crawford & Duchon (1999) Quarterly Journal of the Royal Meteorological
Society 122: 1127-1151. The method is not greatly sensitive to humidity,
temperature and pressure so approximate values can be provided, or the defaults
chosen, if these data are unavailable.
a single value or vector of clearksy radiation.
The function clearskyrad()
is uses to derive clear-sky irradiance. Can be used
to derive cloud covers for computing longwave radiation when using longwavetopo()
or longwaveveg()
tme <- as.POSIXlt(c(0:23) * 3600, origin = "2010-05-23 00:00", tz = "GMT")
rad <- clearskyrad(tme, 50, -5, 0.007953766 , 11) * 0.75
cfc <- cloudfromrad(rad, tme, 50, -5, 0.007953766 , 11)
plot(cfc ~ as.POSIXct(tme), type = "l") # should be 0.25
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.