| PhenMap | R Documentation |
Estimates annual Land Surface Phenology (LSP) using time series of a vegetation greenness raster stack.
PhenMap(s, dates, h, frequency = "16-days", nCluster, outname, format, datatype, rge)
s |
Raster stack with greenness (e,g. NDVI or EV) values |
dates |
Vector with dates at which the greenness values were recorded |
h |
Numeric. Indicates the geographic hemisphere to define the starting date of the growing season. h=1 if the vegetation is in the Northern Hemisphere (season starting at January 1st), h=2 if it is in the Southern Hemisphere (season starting at July 1st) |
frequency |
Character string. Defines the number of samples for the output phenology and must be one of the this: *'daily'* (default) giving output vector of length 365, *'8-days'* giving output vector of length 46 (i.e MOD13Q1 and MYD13Q1), *'monthly'* giving output vector of length 12,*'bi-weekly'* giving output vector of length 24 (i.e. GIMMS) or *'16-days'* giving output vector of length 23 (i.e MOD13Q1 or MYD13Q1). |
nCluster |
Numeric. Number of CPU cores to be used for computational calculations |
outname |
Character vector with the output path and filename with extension or only the filename and extension if work directory was set. For example outname="output_phen.tif". See |
format |
Character. Output file type. See |
datatype |
Character. Output data type. See |
rge |
A vector containing minimum and maximum values of the response variable used in the analysis. We suggest the use of theoretically based limits. For example in the case of MODIS NDVI or EVI, it ranges from 0 to 10,000, so rge =c(0,10000) |
Derives the annual Land Surface Phenological (LSP) cycle for a standard growing season using a raster stack of satellite based greenness values such as the Normalized Difference Vegetation Index (NDVI) or Enhanced Vegetation Index (EVI). The LSP cycle is calculated for all pixels of the input raster stack in the same way as for the Phen function. The output is a multiband raster where every band is the expected greeness value at a given time step of the standard growing season. For example, for MODIS Vegetation Index 16-days composites the number of time steps of the growing season (nGS) is 23 , and therefore, the output raster will have 23 bands. A vector with dates for the greenness values is also required.
RasterStack
Phen
## Not run:
##DEPENDING ON HARDWARE, THIS PROCESS CAN BE HIGHLY TIME CONSUMING##
## Testing raster data from Central Chile (NDVI), h=2##
# Load data
#RasterStack
data("MegaDrought_stack")
#Dates
data("dates")
# Making the LSP raster, n bands = 23
library(snow)
# Define the number of cores to be use. In this example we use 1
nc1<-1
PhenMap(s = MegaDrought_stack,dates = dates,h = 2,
frequency = '16-days',nCluster = nc1,outname = 'phen_MD.tif',
format = 'GTiff',datatype = 'INT2S',rge = c(0,1000))
#map1 <- stack("phen_MD.tif")#run only for load phenology brick
#plot(map1)
## Testing raster data from Blooming desert, Northern Chile (NDVI), h=2 ##
# Load data
RasterStack
data("Bdesert_stack")
#Dates
data("dates")
# Making the LSP raster, n bands = 23
# Define the number of cores to be use. In this example we use 1
nc1<-1
PhenMap(s= Bdesert_stack,dates=dates,h=2,
frequency='16-days', nCluster=nc1,outname="phen_BD.tif",
format="GTiff", datatype="INT2S",rge=c(0,10000))
#map2 <- stack("phen_BD.tif") #run only for load phenology brick
#plot(map2)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.