Description Usage Arguments Details Value Author(s) See Also Examples
Functions to predict shortwave solar radiation
1 2 3 4 5 6 7 | ## S3 method for class 'raster'
swrad(dtm, sw, lat, day, elevation, soltime, localtime, lon, merid = 0, dst = 0, trans0 = 0.2, ...)
## S3 method for class 'raster'
swrad2(dtm, sw, lat, day, elevation, soltime, soltime.sw, localtime, localtime.sw = localtime, lon, merid = 0, dst = 0, trans0 = 0.2, ...)
## S3 method for class 'raster'
srad(dtm, trans, lat, day, elevation, soltime, localtime, lon, merid = 0, dst = 0, trans0 = 0.2, ...)
trans(sw, elevation = 0, lat, day, soltime, localtime, lon = 0, merid = 0, dst = 0, trans0 = 0.2, ...)
|
dtm |
Digital terrain model, as a raster object |
sw |
Shortwave radiation (in Watts per square metre) incident on horizontal ground. May be obtained from regional weather station or reanalysis data. |
trans |
Transmission of short-wave radiation, as a proportion of the difference between the transmission of clear and overcast skies. Typically estimated by proportional cloud cover. |
lat |
Latitude, in degrees. If missing, it will be taken from dtm, assuming its y extent is calibrated in degrees |
day |
Day of the year (1 - 365) |
elevation |
Average elevation of the site (in m), passed to the function |
soltime |
Local solar time at which predictions are required, in hours from midnight (only used if |
soltime.sw |
Local solar time at the time to which |
localtime |
Local clock time at which predictions are required, in hours from midnight |
localtime.sw |
Local clock time at the time to which |
lon |
For interpreting |
merid |
For interpreting |
dst |
For interpreting |
trans0 |
typical transmission (proportion) of diffuse short-wave radiation through overcast sky. If in doubt, leave at 0.2. |
... |
Additional arguments to pass to subsidiary functions (currently |
swrad.raster
estimates short-wave radiation on a landscape given an estimate for short-wave radiation incident on the horizontal plane at the same point in time. swrad2.raster
allows the estimate for horizontal radiation to apply to a different time (solartime.sw
or localtime.sw
).
These functions use sw
to obtain a shortwave radiation value standardised with respect to the expected shortwave radiation at the specified time. This calculation makes reference to the Sun's expected height; if this is less than 10 degrees, a warning is given to indicate that results may be unreliable, since small errors in the solar angle may be magnified. In that case, it may be better to use function srad
with an estimate for transmission based on cloud cover or other data.
srad.raster
and trans
together provide the same functionality as swrad.raster
: srad.raster
uses a given estimate, trans
, for cloud cover (i.e. percentage transmission above that which pertains with overcast skies) instead of requiring sw
, while trans
gives such an estimate for transmission based on sw
with reference to expectations derived from beamrad
and diffuserad
.
swrad.raster
and swrad2.raster
each return a list:
swrad |
raster of short-wave radiation estimates in Watts per square metre |
trans |
single-value estimate of transmission through the sky (see |
srad.raster
returns a raster of shortwave radiation estimates in Watts per square metre.
trans
returns estimated proportional transmission of shortwave radiation through the sky. If any of its arguments comprise more than a single value (possibly rasters), they should be equal to each other in dimensions and extent and the output will be of corresponding size. So long as sw
is less than the predicted potential shortwave radiation, values will fall in the range 0 - 1, with 0 corresponding to overcast sky. Otherwise, values > 1 are possible.
Jon Bennie, Richard Gunton
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | trans(sw=600, lat=54, day=172, soltime=12)
if(require(raster)){
data(volcano)
dtm <- raster(volcano,xmn=0,xmx=610,ymn=0,ymx=870,crs="+proj=equirectangular")
dtm.srad <- srad.raster(dtm, lat=-36.9, trans=0.7, day=172, soltime=12)
dtm.swrad <- swrad.raster(dtm, sw=400, lat=-36.9, day=172, soltime=12)
dtm.swrad2 <- swrad2.raster(dtm, sw=400, lat=-36.9, day=172, soltime=15, soltime.sw=12)
par(mfrow=c(2,2))
plot(dtm,col=terrain.colors(255))
plot(dtm.srad,col=heat.colors(255))
plot(dtm.swrad$swrad,col=heat.colors(255))
plot(dtm.swrad2$swrad,col=heat.colors(255))
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.