KGERaster {greenbrown}R Documentation

Compute Kling-Gupta efficiency and related metrics of two multi-layer raster data sets


This function can be used to apply the function KGE on raster data. See KGE for details.


KGERaster(x, ref, trend = FALSE, start = c(1982, 1), freq = 12, 



multi-layer raster object of class brick including modelled time series


multi-layer raster object of class brick including reference (observed or standard model run) time series


Include the effect of trend in the calculation? (default: FALSE). The calculation of breakpoints is currently not implemented for the function KGERaster.


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 ts for further examples.


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 ts for further examples.


further arguments for the function calc


See KGE for details.


The function returns a raster brick with the following layers:


Matthias Forkel <> [aut, cre]


Gupta, H. V., H. Kling, K. K. Yilmaz, G. F. Martinez (2009): Decomposition of the mean squared error and NSE performance criteria: Implications for improving hydrological modelling. Journal of Hydrology 377, 80-91.

See Also

KGE, Trend


# # load a map of NDVI (normalized difference vegetation index) time series
# data(ndvimap)
# plot(ndvimap)

# # increase mean
# ndvimap2 <- ndvimap + 0.01
# kge1.r <- KGERaster(x=ndvimap2, ref=ndvimap)
# plot(kge1.r)

# # increase mean and variance
# ndvimap3 <- ndvimap + 0.01 + rnorm(1000, 0, 0.05)
# kge2.r <- KGERaster(ndvimap3, ndvimap)
# plot(kge2.r)

# # check also effects on trend (takes more time because of trend calculations)
# kge3.r <- KGERaster(ndvimap3, ndvimap, trend=TRUE)
# plot(kge3.r)

[Package greenbrown version 2.4.3 Index]