Learn R Programming

meteo (version 2.0-2)

tgeom2STFDF: Calculate geometrical temperature trend

Description

Calculate geometrical temperature trend for mean, minimum or maximum temperature.

Usage

tgeom2STFDF(grid,
            time,
            variable = "mean",
            ab=NULL)

Value

STFDF-class object with calculated temp_geo geometrical temperature trend. The calculated values are stored in obj@data slot.

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.

Author

Milan Kilibarda kili@grf.bg.ac.rs, Aleksandar Sekulic asekulic@grf.bg.ac.rs

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.

Examples

Run this code
library(sp)
library(spacetime)
## create one point from lon lat
pos <- SpatialPoints(coords = cbind(19.22,45.33)) 
## temp_geom for 1st Jan 2011
tg1 <- tgeom2STFDF(pos,as.POSIXct("2011-01-01") )  
tg1

## temp_geom for the 2011 at pos location
tg365<- 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 resolution
# str(regdata@sp)
# spplot(regdata@sp, zcol='dem', col.regions=bpy.colors() )

## temp_geom for Serbia 1st and 2nd Jully 2011
tgSrb<- 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() ) 

Run the code above in your browser using DataLab