albedo_modis function

Surface Albedo using MODIS images.

Surface Albedo using MODIS images.

albedo_modis()

Returns

It returns in raster format (.tif) the Surface Albedo at 24h scale ("Alb_24").

Examples

library(agriwater) # dependencies of package 'agriwater' library(terra) # Using a temporary folder to run example wd <- tempdir() initial = getwd() setwd(wd) # creating raster which simulate Sentinel-2 reflectances - for using # real data, please download: # https://drive.google.com/open?id=14E1wHNLxG7_Dh4I-GqNYakj8YJDgKLzk xy <- matrix(rnorm(4, mean = 0.05, sd = 0.015),2, 2) rast <- rast(xy, crs="+proj=longlat +datum=WGS84") ext(rast) <- c(-40.5,-40.45,-9.5,-9.45) writeRaster(rast, file.path(wd, "B2.tif"),filetype = "GTiff", overwrite=TRUE) xy <- matrix(rnorm(4, mean = 0.05, sd = 0.01),2, 2) rast <- rast(xy, crs="+proj=longlat +datum=WGS84") ext(rast) <- c(-40.5,-40.45,-9.5,-9.45) writeRaster(rast, file.path(wd, "B1.tif"),filetype = "GTiff", overwrite=TRUE) # creating mask of study area mask <- as.polygons(rast) writeVector(mask, file.path(getwd(),"mask.shp"), overwrite=TRUE) # using "agriwater" albedo_modis() #Exiting temporary folder and returning to previous workspace setwd(initial)

Other functions in agriwater

Related functions from the same R package

  • Maintainer: Cesar de Oliveira Ferreira Silva
  • License: MIT + file LICENSE
  • Last published: 2023-06-08

Useful links