Calculate geometrical temperature trend for mean, minimum or maximum temperature.
tgeom2STFDF(grid, time, variable ="mean", ab=NULL)
Arguments
grid: Spatial-class (Points, Grid or Pixels), sf-class , SpatVector-class , SpatRaster-class ; Locations for which gtt is calculated with associated coordinate reference systems (CRS-class ). If CRS is not defined longitude latitude is assumed.
time: date or datetime; Object holding time information, reasonably it is day (calendar date), or vector of days.
variable: character; Geometrical temperature trend calculated for mean, minimum or maximum temperature; Possible values are 'mean', 'min' or 'max'. 'mean' is default.
ab: Predefined coefficients to be used instead of incorporated.
Returns
STFDF-class object with calculated temp_geo geometrical temperature trend. The calculated values are stored in obj@data slot.
References
Kilibarda, M., T. Hengl, G. B. M. Heuvelink, B. Graeler, E. Pebesma, M. Percec Tadic, and B. Bajat (2014), Spatio-temporal interpolation of daily temperatures for global land areas at 1 km resolution, J. Geophys. Res. Atmos., 119, 2294-2313, doi:10.1002/2013JD020803.
library(sp)library(spacetime)# create one point from lon latpos <- SpatialPoints(coords = cbind(19.22,45.33))# temp_geom for 1st Jan 2011tg1 <- tgeom2STFDF(pos,as.POSIXct("2011-01-01"))tg1
# temp_geom for the 2011 at pos locationtg365<- tgeom2STFDF(pos,time = seq(as.POSIXct("2011-01-01"), as.POSIXct("2011-12-31"), by="day"))stplot(tg365, mode='ts')data(regdata)# DEM and TWI data for Serbia at 1 km resolutionstr(regdata@sp)spplot(regdata@sp, zcol='dem', col.regions=bpy.colors())# temp_geom for Serbia 1st and 2nd Jully 2011tgSrb<- tgeom2STFDF(regdata@sp,time = seq(as.POSIXct("2011-07-01"), as.POSIXct("2011-07-02"), by="day"))# temp_geom for "2011-07-01" , "2011-07-02"# stplot(tgSrb, col.regions = bpy.colors() )