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,...]] [nprocs=inte‐
17 ger] [memory=memory in MB] [where=sql_query] out‐
18 put=name[,name,...] [file_limit=integer] [--overwrite] [--help]
19 [--verbose] [--quiet] [--ui]
20
21 Flags:
22 -t
23 Do not assign the space time raster dataset start and end time to
24 the output map
25
26 -n
27 Propagate NULLs
28
29 --overwrite
30 Allow output files to overwrite existing files
31
32 --help
33 Print usage summary
34
35 --verbose
36 Verbose module output
37
38 --quiet
39 Quiet module output
40
41 --ui
42 Force launching GUI dialog
43
44 Parameters:
45 input=name [required]
46 Name of the input space time raster dataset
47
48 method=string[,string,...]Â [required]
49 Aggregate operation to be performed on the raster maps
50 Options: average, count, median, mode, minimum, min_raster, maxi‐
51 mum, max_raster, stddev, range, sum, variance, diversity, slope,
52 offset, detcoeff, quart1, quart3, perc90, quantile, skewness, kur‐
53 tosis
54 Default: average
55
56 quantile=float[,float,...]
57 Quantile to calculate for method=quantile
58 Options: 0.0-1.0
59
60 order=string[,string,...]
61 Sort the maps by category
62 Options: id, name, creator, mapset, creation_time, modifica‐
63 tion_time, start_time, end_time, north, south, west, east,
64 min, max
65 Default: start_time
66
67 nprocs=integer
68 Number of threads for parallel computing
69 Default: 1
70
71 memory=memory in MB
72 Maximum memory to be used (in MB)
73 Cache size for raster rows
74 Default: 300
75
76 where=sql_query
77 WHERE conditions of SQL statement without ’where’ keyword used in
78 the temporal GIS framework
79 Example: start_time > ’2001-01-01 12:30:00’
80
81 output=name[,name,...]Â [required]
82 Name for output raster map(s)
83
84 file_limit=integer
85 The maximum number of open files allowed for each r.series process
86 Default: 1000
87
89 The input of this module is a single space time raster dataset, the
90 output is a single raster map layer. A subset of the input space time
91 raster dataset can be selected using the where option. The sorting of
92 the raster map layer can be set using the order option. Be aware that
93 the order of the maps can significantly influence the result of the ag‐
94 gregation (e.g.: slope). By default the maps are ordered by start_time.
95
96 t.rast.series is a simple wrapper for the raster module r.series. It
97 supports a subset of the aggregation methods of r.series.
98
100 To avoid problems with too many open files, by default, the maximum
101 number of open files is set to 1000. If the number of input raster
102 files exceeds this number, the -z flag will be invoked. Because this
103 will slow down processing, the user can set a higher limit with the
104 file_limit parameter. Note that file_limit limit should not exceed the
105 user-specific limit on open files set by your operating system. See the
106 Wiki for more information.
107
109 To enable parallel processing, the user can specify the number of
110 threads to be used with the nprocs parameter (default 1). The memory
111 parameter (default 300 MB) can also be provided to determine the size
112 of the buffer in MB for computation. Both parameters are passed to
113 r.series. To take advantage of the parallelization, GRASS GIS needs to
114 be compiled with OpenMP enabled.
115
117 Estimate the average temperature for the whole time series
118 Here the entire stack of input maps is considered:
119 t.rast.series input=tempmean_monthly output=tempmean_average method=average
120
121 Estimate the average temperature for a subset of the time series
122 Here the stack of input maps is limited to a certain period of time:
123 t.rast.series input=tempmean_daily output=tempmean_season method=average \
124 where="start_time >= ’2012-06’ and start_time <= ’2012-08’"
125
126 Climatology: single month in a multi-annual time series
127 By considering only a single month in a multi-annual time series the
128 so-called climatology can be computed. Estimate average temperature
129 for all January maps in the time series:
130 t.rast.series input=tempmean_monthly \
131 method=average output=tempmean_january \
132 where="strftime(’%m’, start_time)=’01’"
133 # equivalently, we can use
134 t.rast.series input=tempmean_monthly \
135 output=tempmean_january method=average \
136 where="start_time = datetime(start_time, ’start of year’, ’0 month’)"
137 # if we want also February and March averages
138 t.rast.series input=tempmean_monthly \
139 output=tempmean_february method=average \
140 where="start_time = datetime(start_time, ’start of year’, ’1 month’)"
141 t.rast.series input=tempmean_monthly \
142 output=tempmean_march method=average \
143 where="start_time = datetime(start_time, ’start of year’, ’2 month’)"
144 Generalizing a bit, we can estimate monthly climatologies for all
145 months by means of different methods
146 for i in `seq -w 1 12` ; do
147 for m in average stddev minimum maximum ; do
148 t.rast.series input=tempmean_monthly method=${m} output=tempmean_${m}_${i} \
149 where="strftime(’%m’, start_time)=’${i}’"
150 done
151 done
152
154 r.series, t.create, t.info
155
156 Temporal data processing Wiki
157
159 Sören Gebbert, Thünen Institute of Climate-Smart Agriculture
160
162 Available at: t.rast.series source code (history)
163
164 Accessed: Saturday Oct 28 18:19:23 2023
165
166 Main index | Temporal index | Topics index | Keywords index | Graphical
167 index | Full index
168
169 © 2003-2023 GRASS Development Team, GRASS GIS 8.3.1 Reference Manual
170
171
172
173GRASS 8.3.1 t.rast.series(1)