ETsolradRasters {envirem} | R Documentation |
Extraterrestrial Solar Radiation
Description
Generate monthly extraterrestrial solar radiation rasters.
Usage
ETsolradRasters(rasterTemplate, year, outputDir = NULL, ...)
Arguments
rasterTemplate |
any rasterLayer that can be used to extract extent, resolution, projection, etc. |
year |
The year solar radiation should be calculated for. See details. |
outputDir |
destination directory for rasters, can be |
... |
additional arguments passed to |
Details
Given the latitude values of the cells found in the raster template
and the year, monthly extraterrestrial solar radiation can be calculated,
using the palinsol R package. year = 0
corresponds to 1950.
Although the year can take on any value, it should match the time period
of the other rasters that will be used for generating ENVIREM variables.
Suggestions would be year = 40
for the present, year = -6000
for the mid Holocene, and year = -21500
for the LGM.
If you are having problems with this function and the rasterTemplate is not in long/lat, try with an unprojected long/lat raster.
Value
If outputDir = NULL
, a SpatRaster is returned. Otherwise, rasters
are written to disk in the designated directory, and nothing is returned.
Naming of the layers uses the tag specified via assignNames
.
Author(s)
Pascal Title
References
J. Laskar et al., A long-term numerical solution for the insolation quantities of the Earth, Astron. Astroph., 428, 261-285 2004.
Examples
# Find example rasters
rasterFiles <- list.files(system.file('extdata', package='envirem'), full.names=TRUE)
env <- rast(rasterFiles)
# set aside a template raster
template <- env[[1]]
# generate solar radiation for the present
solrad <- ETsolradRasters(template, year = 40, outputDir = NULL)