TrendNCDF {greenbrown} | R Documentation |
This function computes temporal trend and trend breakpoints on multi-temporal raster data that is stored in a NetCDF file. To calculate trends on the values of each grid cell the function Trend
is used. Before using these methods on satellite time series (especially NDVI time series) the descriptions and recommendations in Forkel et al. (2013) should be considered. The function applies the function TrendRaster
on a NetCDF file and saves the results as NetCDF files. Additionally, several summary raster layers are saved as NetCDF files too. Thus, it can potentially simplify the workflow.
TrendNCDF(file, start = c(1982, 1), freq = 12, method = "AAT", mosum.pval = 0.05, h = 0.15, breaks = 1, funSeasonalCycle = MeanSeasonalCycle, funAnnual = mean, ...)
file |
NetCDF file with file extention *.nc |
start |
beginning of the time series (i.e. the time of the first observation). The default is c(1982, 1), i.e. January 1982 which is the usual start date to compute trends on long-term series of satellite observations of NDVI. See |
freq |
The frequency of observations. The default is 12 for monthly observations. Use 24 for bi-monthly observations, 365 for daily observations or 1 for annual observations. See |
method |
method to be used for trend calculation with the following options:
|
mosum.pval |
Maximum p-value for the OLS-MOSUM test in order to search for breakpoints. If p = 0.05, breakpoints will be only searched in the time series trend component if the OLS-MOSUM test indicates a significant structural change in the time series. If p = 1 breakpoints will be always searched regardless if there is a significant structural change in the time series or not. See |
h |
minimal segment size either given as fraction relative to the sample size or as an integer giving the minimal number of observations in each segment. See |
breaks |
maximal number of breaks to be calculated (integer number). By default the maximal number allowed by h is used. See |
funSeasonalCycle |
a function to estimate the seasonal cycle of the time series if
|
funAnnual |
function to aggregate time series to annual values if |
... |
The maximum number of breakpoints should be specified in this function. If breaks=0
no breakpoints will be computed. If breaks=1
one breakpoint can be detected at maximum per grid cell. In this case the result will be reported for two time series segments (SEG1 before the breakpoint, SEG2 after the breakpoint).
Some of the trend methods are very slow. Applying them on multi-temporal raster datasets can take some time. Especially the methods that work on the full temporal resolution time series (STM and SeasonalAdjusted) are slower than the method AAT. Especially if breakpoints are computed the computations take longer. The computation of breakpoints can be suppressed by choosing breaks=0. For large rasters it is recommended to first split the raster dataset in several tiles and to compute the trends on each tile separately. The use of a high performance computing infrastructure it also advantageous.
All methods work with missing observations (for example missing NDVI observation in winter months with snow cover). Missing observation have to be flagged with NA. All time steps have to be included in the RasterBrick for trend analysis. If complete time steps are missing, they need to be included as layers (filled with NA values) in the RasterBrick to form a continuous time series.
The function saves several NetCDF files in directory on disc. The files are created based on the filename of the input file
:
file.Trend.nc
NetCDF file with result of trend and breakpoints detection (from TrendRaster
)
file.Trend.Classif.nc
NetCDF file with classified trends in each time series segment (from TrendClassification
)
file.Trend.BP.nc
NetCDF file with time of breakpoints
file.Trend.LongestSEG.nc
NetCDF file with slope and p-values of the longest time series segment (from TrendLongestSEG
)
file.Trend.SlopeLongestSEG.nc
NetCDF file with slope of the longest time series segment (from TrendLongestSEG
)
file.Trend.PvalLongestSEG.nc
NetCDF file with p-value of the longest time series segment (from TrendLongestSEG
)
file.Trend.LongestSEGClassif.nc
NetCDF file with classified trend of the longest time series segment (i.e. TrendClassification
applied on TrendLongestSEG
)
Matthias Forkel <matthias.forkel@geo.tuwien.ac.at> [aut, cre]
Forkel, M., N. Carvalhais, J. Verbesselt, M. Mahecha, C. Neigh and M. Reichstein (2013): Trend Change Detection in NDVI Time Series: Effects of Inter-Annual Variability and Methodology. - Remote Sensing 5.
TrendRaster
, Trend
, TrendClassification
, TrendLongestSEG
, TrendSegmentsRaster
, NamesTrendRaster