sradFUN: Wrapper around 'Solar' function from package 'EcoHydrology'

Description Usage Arguments Value Examples

View source: R/standardFUNs.R

Description

sradFUN Gets estimates of solar radiation for an area, based on maximum and minimum temperatures and altitude rasters by applying function Solar from package EcoHydrology

Usage

1
sradFUN(alt, tmax, tmin)

Arguments

alt

Raster* object. Altitude raster.

tmax

Raster* object. Maximum temperature raster.

tmin

Raster* object. Minimum temperature raster.

Value

Returns a RasterLayer with estimates of Solar in kiloJoules by square meter by day.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
FulanusEcoRasters_present <-
  get_rasters(
    raster_source = "/Users/gabriel/Documents/Mapinguari/global_grids_10_minutes",
    ext = FulanusDistribution,
    margin = 5,
    non_fixed_var = c('prec', 'tmin', 'tmax'),
    fixed_var = 'alt',
    years = c("present"),
    reorder = TRUE)

alt <- FulanusEcoRasters_present$present$alt
tmax <- FulanusEcoRasters_present$present[[25:36]]/10
tmin <- FulanusEcoRasters_present$present[[13:24]]/10

srad <- sradFUN(alt = alt, tmax = tmax, tmin = tmin)

gabrielhoc/MapinguariLegacy documentation built on May 8, 2019, 9:54 p.m.