shortwaveveg: Downscales net shortwave radiation accounting for topography...

View source: R/radiationtools.R

shortwavevegR Documentation

Downscales net shortwave radiation accounting for topography and vegetation

Description

shortwaveveg is used to downscale the flux density of shortwave radiation received at the surface of the Earth, accounting for both topographic and canopy effects.

Usage

shortwaveveg(
  dni,
  dif,
  julian,
  localtime,
  lat = NA,
  long = NA,
  dtm = array(0, dim = c(1, 1)),
  slope = NA,
  aspect = NA,
  svv = 1,
  alb = 0.23,
  fr,
  albr = 0.23,
  ha = 0,
  reso = 1,
  merid = NA,
  dst = 0,
  shadow = TRUE,
  x,
  l,
  difani = TRUE
)

Arguments

dni

a single numeric value, raster object, two-dimensional array or matrix of coarse-resolution direct radiation perpendicular to the solar beam (MJ m-2 hr-1).

dif

a single numeric value, raster object, two-dimensional array or matrix of coarse-resolution diffuse radiation horizontal ot the surface (MJ m-2 hr-1).

julian

a single integer representing the Julian as returned by julday().

localtime

a single numeric value representing local time (decimal hour, 24 hour clock).

lat

an optional single numeric value representing the mean latitude of the location for which downscaled radiation is required (decimal degrees, -ve south of equator).

long

an optional single numeric value representing the mean longitude of the location for which downscaled radiation is required (decimal degrees, -ve west of Greenwich meridian).

dtm

an optional raster object, two-dimensional array or matrix of elevations (m), orientated as if derived using is_raster(). I.e. ⁠[1, 1]⁠ is the NW corner.

slope

an optional single value, raster object, two-dimensional array or matrix of slopes (º). If an array or matrix, then orientated as if derived using is_raster(). I.e. ⁠[1, 1]⁠ is the NW corner.

aspect

an optional single value, raster object, two-dimensional array or matrix of aspects (º). If an array or matrix, then orientated as if derived using is_raster(). I.e. ⁠[1, 1]⁠ is the NW corner.

svv

an optional raster object, two-dimensional array or matrix of values representing the proportion of isotropic radiation received by a surface partially obscured by topography relative to the full hemisphere underneath vegetation as returned by skyviewveg().

alb

an optional single value, raster object, two-dimensional array or matrix of values representing albedo(s) as returned by albedo().

fr

a raster object, two-dimensional array or matrix of fractional canopy cover as returned by canopy().

albr

an optional single value, raster object, two-dimensional array or matrix of values representing the albedo(s) of adjacent surfaces as returned by albedo_reflected().

ha

an optional raster object, two-dimensional array or matrix of values representing the mean slope to the horizon (decimal degrees) of surrounding surfaces from which radiation is reflected for each cell of dtm as returned by mean_slope().

reso

a single numeric value representing the spatial resolution of dtm (m).

merid

an optional numeric value representing the longitude (decimal degrees) of the local time zone meridian (0 for GMT). Default is round(long / 15, 0) * 15

dst

an optional numeric value representing the time difference from the timezone meridian (hours, e.g. +1 for BST if merid = 0).

shadow

an optional logical value indicating whether topographic shading should be considered (False = No, True = Yes).

x

a raster object, two-dimensional array or matrix of numeric values representing the ratio of vertical to horizontal projections of leaf foliage as returned by leaf_geometry().

l

a raster object, two-dimensional array or matrix of leaf area index values as returned by lai().

difani

an optinional logical indicating whether to treat a proportion of the diffuse radiation as anistropic (see details).

Details

If slope is unspecified, and dtm is a raster, slope and aspect are calculated from the raster. If slope is unspecified, and dtm is not a raster, the slope and aspect are set to zero. If lat is unspecified, and dtm is a raster with a coordinate reference system defined, lat and long are calculated from the raster. If lat is unspecified, and dtm is not a raster, or a raster without a coordinate reference system defined, an error is returned. If dtm is specified, then the projection system used must be such that units of x, y and z are identical. Use projectRaster() to convert the projection to a Universal Transverse Mercator type projection system. If dtm is a raster object, a raster object is returned. If dtm is a raster object, a raster object is returned. If dni or dif are raster objects, two-dimensional arrays or matrices, then it is assumed that they have been derived from coarse-resolution data by interpolation, and have the same extent as dtm. If no value for ha is provided, the mean slope to the horizon is assumed to be 0. If no value for svv is provided, then the entire hemisphere is assumed to be in view. If values of albg and albr are not specified, then a default value of 0.23, typical of well-watered grass is assumed. If single values of albg and albr are given, then the entire area is assumed to have the same albedo. If dtm is specified, then the projection system used must be such that the units of x, y and z are identical. Use projectRaster() to convert the projection to a Universal Transverse Mercator type projection system. If no value for dtm is provided, radiation is downscaled by deriving values on the inclined surfaces specified in slope and aspect and topographic shadowing is ignored. If single values are provided for slope and aspect, the entire extent covered by fr is assumed to have the same slope and aspect. Only single values of lat and long are taken as inputs. Under partially cloudy conditions, a proportion of diffuse radiation is typically anistropic (directional). If difani is TRUE (the default), then the assumption is made that hourly direct radiation transmission can define the portions of the diffuse radiation to be treated as anistropic and isotropic. If dtm covers a large extent, the dtm is best divided into blocks and seperate calculations performed on each block. Since horizon angles, topographic shading and sky view correction factors may be influenced by locations beyond the extent of dtm, it is best to ensure dtm covers a larger extent than that for which radiation values are needed, and to ensure sub-divided blocks overlap in extent. Calculations are faster if values for all inputs are provided.

Value

a raster object, two-dimensional array of numeric values representing net shortwave radiation (MJ per metre squared per hour). The raster package function terrain() can be used to derive slopes and aspects from dtm (see example).

See Also

Function shortwavetopo() returns net shortwave radiation, or components thereof, above the canopy.

Examples

library(raster)
# =================================
# Extract data for 2010-05-24 11:00
# =================================
dni <- microvars$dni[564]
dif <- microvars$dif[564]
# ==========================
# Calculate input paramaters
# ==========================
x <- leaf_geometry(veg_hgt)
l <- lai(aerial_image[,,3], aerial_image[,,4])
l <- lai_adjust(l, veg_hgt)
fr <- canopy(l)
alb <- albedo(aerial_image[,,1], aerial_image[,,2], aerial_image[,,3],
             aerial_image[,,4])
sv <- skyviewveg(dtm1m, l, x)
jd <- julday(2010, 5, 24)
ha <- mean_slope(dtm1m)
# ===============================================================
# Calculate and plot net shortwave radiation for 2010-05-24 11:00
# ===============================================================
netshort1m <- shortwaveveg(dni, dif, jd, 11, dtm = dtm1m, svv = sv, alb = alb,
                           fr = fr, ha = ha, x = x, l = l)
plot(mask(netshort1m, dtm1m), main = "Net shortwave radiation")

ilyamaclean/microclima documentation built on Oct. 31, 2023, 11:41 p.m.