solarRad: Computes extra-terrestrial solar radiation

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

solarRad computes the solar radiation received at the top of the Earth's atmosphere on a horizontal surface. This radiation will change during the day and will be different at different latitudes and in different seasons.

Usage

1
2
solarRad(img, day)
solarRad12M(img, outFl, ...)

Arguments

img

object of class SpatialGridDataFrame that provided a projection class and a bbox attributes. The nature of the data.frame that contains the attribute data is not relevant. It must be in geographic coordinates.

day

The number of the day (from 1 to 365) to compute extra-terrestrial radiation.

outFl

A list of 12 file names to save the results.

...

Any unmatched parameter will be passed to the writeGDAL routine.

Details

The output is expressed in cal/cm2*day.

This function runs unnoticed within petHgsm, but can be executed manually.

Value

solarRad returns a single image corresponding to the specified day, as a SpatialGridDataFrame class. solarRad12M writes 12 images to disk in the format especified by the GDAL drivername parameter.

Author(s)

Gabriel del Barrio, Marieta SanJuan & Alberto Ruiz

References

Crop evapotranspiration - Guidelines for computing crop water requirements - FAO Irrigation and drainage paper 56

See Also

petHgsm

Examples

1
2
3
4
5
6
7
8
#not run
#aux=readGDAL('iberia_mask')
#calc the extraterrestial radiation the 15-agost
#Rad=solarRad(aux,227)
#writeGDAL(Rad,'solarrad_15ago')
#or to calculate and write to disk, the radiation of the twelve months
#RadFileNames=paste('rad',month.abb,sep='')
#solarRad12M(img,RadFileNames)

Example output

Loading required package: rgdal
Loading required package: sp
rgdal: version: 1.2-10, (SVN revision 673)
 Geospatial Data Abstraction Library extensions to R successfully loaded
 Loaded GDAL runtime: GDAL 1.10.1, released 2013/08/26
 Path to GDAL shared files: /usr/share/gdal/1.10
 Loaded PROJ.4 runtime: Rel. 4.8.0, 6 March 2012, [PJ_VERSION: 480]
 Path to PROJ.4 shared files: (autodetected)
WARNING: no proj_defs.dat in PROJ.4 shared files
 Linking to sp version: 1.2-3 
Loading required package: matrixStats

r2dRue documentation built on May 1, 2019, 10:10 p.m.