1t.rast.series(1) GRASS GIS User's Manual t.rast.series(1)
2
3
4
6 t.rast.series - Performs different aggregation algorithms from r.se‐
7 ries on all or a subset of raster maps in a space time raster dataset.
8
10 temporal, aggregation, series, raster, time
11
13 t.rast.series
14 t.rast.series --help
15 t.rast.series [-tn] input=name method=string[,string,...] [quan‐
16 tile=float[,float,...]] [order=string[,string,...]]
17 [where=sql_query] output=name[,name,...] [--overwrite] [--help]
18 [--verbose] [--quiet] [--ui]
19
20 Flags:
21 -t
22 Do not assign the space time raster dataset start and end time to
23 the output map
24
25 -n
26 Propagate NULLs
27
28 --overwrite
29 Allow output files to overwrite existing files
30
31 --help
32 Print usage summary
33
34 --verbose
35 Verbose module output
36
37 --quiet
38 Quiet module output
39
40 --ui
41 Force launching GUI dialog
42
43 Parameters:
44 input=name [required]
45 Name of the input space time raster dataset
46
47 method=string[,string,...]Â [required]
48 Aggregate operation to be performed on the raster maps
49 Options: average, count, median, mode, minimum, min_raster, maxi‐
50 mum, max_raster, stddev, range, sum, variance, diversity, slope,
51 offset, detcoeff, quart1, quart3, perc90, quantile, skewness, kur‐
52 tosis
53 Default: average
54
55 quantile=float[,float,...]
56 Quantile to calculate for method=quantile
57 Options: 0.0-1.0
58
59 order=string[,string,...]
60 Sort the maps by category
61 Options: id, name, creator, mapset, creation_time, modifica‐
62 tion_time, start_time, end_time, north, south, west, east,
63 min, max
64 Default: start_time
65
66 where=sql_query
67 WHERE conditions of SQL statement without ’where’ keyword used in
68 the temporal GIS framework
69 Example: start_time > ’2001-01-01 12:30:00’
70
71 output=name[,name,...]Â [required]
72 Name for output raster map(s)
73
75 The input of this module is a single space time raster dataset, the
76 output is a single raster map layer. A subset of the input space time
77 raster dataset can be selected using the where option. The sorting of
78 the raster map layer can be set using the order option. Be aware that
79 the order of the maps can significantly influence the result of the ag‐
80 gregation (e.g.: slope). By default the maps are ordered by start_time.
81
82 t.rast.series is a simple wrapper for the raster module r.series. It
83 supports a subset of the aggregation methods of r.series.
84
86 Estimate the average temperature for the whole time series
87 Here the entire stack of input maps is considered:
88 t.rast.series input=tempmean_monthly output=tempmean_average method=average
89
90 Estimate the average temperature for a subset of the time series
91 Here the stack of input maps is limited to a certain period of time:
92 t.rast.series input=tempmean_daily output=tempmean_season method=average \
93 where="start_time >= ’2012-06’ and start_time <= ’2012-08’"
94
95 Climatology: single month in a multi-annual time series
96 By considering only a single month in a multi-annual time series the
97 so-called climatology can be computed. Estimate average temperature
98 for all January maps in the time series:
99 t.rast.series input=tempmean_monthly \
100 method=average output=tempmean_january \
101 where="strftime(’%m’, start_time)=’01’"
102 # equivalently, we can use
103 t.rast.series input=tempmean_monthly \
104 output=tempmean_january method=average \
105 where="start_time = datetime(start_time, ’start of year’, ’0 month’)"
106 # if we want also February and March averages
107 t.rast.series input=tempmean_monthly \
108 output=tempmean_february method=average \
109 where="start_time = datetime(start_time, ’start of year’, ’1 month’)"
110 t.rast.series input=tempmean_monthly \
111 output=tempmean_march method=average \
112 where="start_time = datetime(start_time, ’start of year’, ’2 month’)"
113 Generalizing a bit, we can estimate monthly climatologies for all
114 months by means of different methods
115 for i in `seq -w 1 12` ; do
116 for m in average stddev minimum maximum ; do
117 t.rast.series input=tempmean_monthly method=${m} output=tempmean_${m}_${i} \
118 where="strftime(’%m’, start_time)=’${i}’"
119 done
120 done
121
123 r.series, t.create, t.info
124
125 Temporal data processing Wiki
126
128 Sören Gebbert, Thünen Institute of Climate-Smart Agriculture
129
131 Available at: t.rast.series source code (history)
132
133 Accessed: Saturday Jan 21 20:41:05 2023
134
135 Main index | Temporal index | Topics index | Keywords index | Graphical
136 index | Full index
137
138 © 2003-2023 GRASS Development Team, GRASS GIS 8.2.1 Reference Manual
139
140
141
142GRASS 8.2.1 t.rast.series(1)