Calculate the spatial distribution by a raster

rasterSource(r, grid, nlevels = "all", conservative = T, verbose = T)

Arguments

r

input raster object

grid

grid object with the grid information

nlevels

number of vertical levels off the emission array

conservative

TRUE (default) to conserve total mass, FALSE to conserve flux

verbose

display additional information

Source

Exemple data is a low resolution cutting from image of persistent lights of the Defense Meteorological Satellite Program (DMSP) https://pt.wikipedia.org/wiki/Defense_Meteorological_Satellite_Program

Data avaliable http://www.ospo.noaa.gov/Operations/DMSP/index.html

Value

Returns a matrix

Details

About the DMSP and example data https://en.wikipedia.org/wiki/Defense_Meteorological_Satellite_Program

See also

Examples

grid <- gridInfo(paste(system.file("extdata", package = "EmissV"),"/wrfinput_d01",sep=""))
#> Grid information from: C:/Users/Schuch/Documents/EmissV/inst/extdata/wrfinput_d01
x <- raster::raster(paste(system.file("extdata", package = "EmissV"),"/dmsp.tiff",sep="")) test <- rasterSource(x,grid)
#> Grid output: 99 columns 93 rows
image(test,axe = F, main = "Spatial distribution by Persistent Nocturnal Lights from DMSP")