1t.shift(1) GRASS GIS User's Manual t.shift(1)
2
3
4
6 t.shift - Shifts temporally the maps of a space time dataset.
7
9 temporal, time management, shift, time
10
12 t.shift
13 t.shift --help
14 t.shift input=name [type=name] granularity=string [--help] [--ver‐
15 bose] [--quiet] [--ui]
16
17 Flags:
18 --help
19 Print usage summary
20
21 --verbose
22 Verbose module output
23
24 --quiet
25 Quiet module output
26
27 --ui
28 Force launching GUI dialog
29
30 Parameters:
31 input=name [required]
32 Name of an existing space time dataset
33
34 type=name
35 Type of the input space time dataset
36 Options: strds, stvds, str3ds
37 Default: strds
38
39 granularity=string [required]
40 Shift granularity
41 Format absolute time: "x years, x months, x weeks, x days, x hours,
42 x minutes, x seconds", relative time is of type integer
43
45 t.shift is designed to temporally shift all registered maps in a space
46 time dataset with a user defined granularity. Raster, 3D raster and
47 vector space time datasets are supported.
48
49 The format of the absolute time granularity is "number unit". Number is
50 an integer, unit is the temporal unit that can be one of year(s),
51 month(s), week(s), day(s), hour(s), minute(s) or second(s).
52
53 The granularity in case of relative time is an integer. The temporal
54 unit is the unit of the space time dataset and can not be modified.
55
57 Be careful when shifting space time datasets with absolute time. The
58 temporal granularity may change if you shift a space time dataset with
59 a unit that is different from the space time dataset granularity. Be
60 aware that the shifting with months and years may result in incorrect
61 days per month. Shifting the date 20012-03-31 with a granularity of one
62 month will result in 2012-04-31 which is incorrect. In this case an
63 error will raise and the shifting will not performed for the whole
64 dataset.
65
66 You can use the extraction module to shift only a subset of maps from a
67 space time dataset. Be aware that the shifting of maps affect all space
68 time datasets in which they are registered.
69
71 We create 6 raster maps and register them in a space time raster
72 dataset using an increment of one day. Then we shift the time intervals
73 with a granularity of 12 hours.
74 r.mapcalc expression="prec_1 = rand(0, 550)" -s
75 r.mapcalc expression="prec_2 = rand(0, 450)" -s
76 r.mapcalc expression="prec_3 = rand(0, 320)" -s
77 r.mapcalc expression="prec_4 = rand(0, 510)" -s
78 r.mapcalc expression="prec_5 = rand(0, 300)" -s
79 r.mapcalc expression="prec_6 = rand(0, 650)" -s
80 t.create type=strds temporaltype=absolute \
81 output=precipitation_daily \
82 title="Daily precipitation" \
83 description="Test dataset with daily precipitation"
84 t.register -i type=raster input=precipitation_daily \
85 maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6 \
86 start=2012-01-01 increment="1 day"
87 t.info type=strds input=precipitation_daily
88 +-------------------- Space Time Raster Dataset -----------------------------+
89 | |
90 +-------------------- Basic information -------------------------------------+
91 | Id: ........................ precipitation_daily@PERMANENT
92 | Name: ...................... precipitation_daily
93 | Mapset: .................... PERMANENT
94 | Creator: ................... soeren
95 | Temporal type: ............. absolute
96 | Creation time: ............. 2014-11-23 19:20:26.004855
97 | Modification time:.......... 2014-11-23 19:20:26.471536
98 | Semantic type:.............. mean
99 +-------------------- Absolute time -----------------------------------------+
100 | Start time:................. 2012-01-01 00:00:00
101 | End time:................... 2012-01-07 00:00:00
102 | Granularity:................ 1 day
103 | Temporal type of maps:...... interval
104 +-------------------- Spatial extent ----------------------------------------+
105 | North:...................... 80.0
106 | South:...................... 0.0
107 | East:.. .................... 120.0
108 | West:....................... 0.0
109 | Top:........................ 0.0
110 | Bottom:..................... 0.0
111 +-------------------- Metadata information ----------------------------------+
112 | Raster register table:...... raster_map_register_882043e9afaa4e60b845aceb1a1fee2c
113 | North-South resolution min:. 10.0
114 | North-South resolution max:. 10.0
115 | East-west resolution min:... 10.0
116 | East-west resolution max:... 10.0
117 | Minimum value min:.......... 0.0
118 | Minimum value max:.......... 16.0
119 | Maximum value min:.......... 297.0
120 | Maximum value max:.......... 647.0
121 | Aggregation type:........... None
122 | Number of registered maps:.. 6
123 |
124 | Title:
125 | Daily precipitation
126 | Description:
127 | Test dataset with daily precipitation
128 | Command history:
129 | # 2014-11-23 19:20:26
130 | t.create type="strds" temporaltype="absolute"
131 | output="precipitation_daily" title="Daily precipitation"
132 | description="Test dataset with daily precipitation"
133 | # 2014-11-23 19:20:26
134 | t.register -i type="rast" input="precipitation_daily"
135 | maps="prec_1,prec_2,prec_3,prec_4,prec_5,prec_6" start="2012-01-01"
136 | increment="1 day"
137 |
138 +----------------------------------------------------------------------------+
139 t.rast.list input=precipitation_daily
140 name|mapset|start_time|end_time
141 prec_1|PERMANENT|2012-01-01 00:00:00|2012-01-02 00:00:00
142 prec_2|PERMANENT|2012-01-02 00:00:00|2012-01-03 00:00:00
143 prec_3|PERMANENT|2012-01-03 00:00:00|2012-01-04 00:00:00
144 prec_4|PERMANENT|2012-01-04 00:00:00|2012-01-05 00:00:00
145 prec_5|PERMANENT|2012-01-05 00:00:00|2012-01-06 00:00:00
146 prec_6|PERMANENT|2012-01-06 00:00:00|2012-01-07 00:00:00
147 t.shift type=strds input=precipitation_daily granularity="12 hours"
148 t.info type=strds input=precipitation_daily
149 +-------------------- Space Time Raster Dataset -----------------------------+
150 | |
151 +-------------------- Basic information -------------------------------------+
152 | Id: ........................ precipitation_daily@PERMANENT
153 | Name: ...................... precipitation_daily
154 | Mapset: .................... PERMANENT
155 | Creator: ................... soeren
156 | Temporal type: ............. absolute
157 | Creation time: ............. 2014-11-23 19:20:26.004855
158 | Modification time:.......... 2014-11-23 19:21:08.240018
159 | Semantic type:.............. mean
160 +-------------------- Absolute time -----------------------------------------+
161 | Start time:................. 2012-01-01 12:00:00
162 | End time:................... 2012-01-07 12:00:00
163 | Granularity:................ 24 hours
164 | Temporal type of maps:...... interval
165 +-------------------- Spatial extent ----------------------------------------+
166 | North:...................... 80.0
167 | South:...................... 0.0
168 | East:.. .................... 120.0
169 | West:....................... 0.0
170 | Top:........................ 0.0
171 | Bottom:..................... 0.0
172 +-------------------- Metadata information ----------------------------------+
173 | Raster register table:...... raster_map_register_882043e9afaa4e60b845aceb1a1fee2c
174 | North-South resolution min:. 10.0
175 | North-South resolution max:. 10.0
176 | East-west resolution min:... 10.0
177 | East-west resolution max:... 10.0
178 | Minimum value min:.......... 0.0
179 | Minimum value max:.......... 16.0
180 | Maximum value min:.......... 297.0
181 | Maximum value max:.......... 647.0
182 | Aggregation type:........... None
183 | Number of registered maps:.. 6
184 |
185 | Title:
186 | Daily precipitation
187 | Description:
188 | Test dataset with daily precipitation
189 | Command history:
190 | # 2014-11-23 19:20:26
191 | t.create type="strds" temporaltype="absolute"
192 | output="precipitation_daily" title="Daily precipitation"
193 | description="Test dataset with daily precipitation"
194 | # 2014-11-23 19:20:26
195 | t.register -i type="rast" input="precipitation_daily"
196 | maps="prec_1,prec_2,prec_3,prec_4,prec_5,prec_6" start="2012-01-01"
197 | increment="1 day"
198 | # 2014-11-23 19:21:08
199 | t.shift type="strds" input="precipitation_daily"
200 | granularity="12 hours"
201 |
202 +----------------------------------------------------------------------------+
203 t.rast.list input=precipitation_daily
204 name|mapset|start_time|end_time
205 prec_1|PERMANENT|2012-01-01 12:00:00|2012-01-02 12:00:00
206 prec_2|PERMANENT|2012-01-02 12:00:00|2012-01-03 12:00:00
207 prec_3|PERMANENT|2012-01-03 12:00:00|2012-01-04 12:00:00
208 prec_4|PERMANENT|2012-01-04 12:00:00|2012-01-05 12:00:00
209 prec_5|PERMANENT|2012-01-05 12:00:00|2012-01-06 12:00:00
210 prec_6|PERMANENT|2012-01-06 12:00:00|2012-01-07 12:00:00
211
213 t.create, t.register, t.snap
214
216 Sören Gebbert, Thünen Institute of Climate-Smart Agriculture
217
219 Available at: t.shift source code (history)
220
221 Main index | Temporal index | Topics index | Keywords index | Graphical
222 index | Full index
223
224 © 2003-2020 GRASS Development Team, GRASS GIS 7.8.5 Reference Manual
225
226
227
228GRASS 7.8.5 t.shift(1)