t.shift(1)

πŸ’« t.shift β€” the GRASS GIS manual, but make it cute πŸ’«

okay bestie, welcome to t.shift(1) from the GRASS GIS User's Manual β€” yes, that's manual page one, section one, and yes I'm about to make temporal shifting sound like the most fun you've ever had. πŸ¦‹


✨ NAME ✨

t.shift β€” shifts temporally the maps of a space time dataset. that's it, that's the whole vibe. it moves your maps through time. slay. πŸ’…


πŸ”‘ KEYWORDS πŸ”‘

temporal, time management, shift, time


πŸŽ€ SYNOPSIS πŸŽ€

t.shift
t.shift --help
t.shift input=name  [type=name]  granularity=string  [--help]
[--verbose]  [--quiet]  [--ui]

🌸 Flags 🌸

  • --help β€” prints the usage summary. your lil "wait what do I type" button 🫢
  • --verbose β€” verbose module output. she's chatty. we love her.
  • --quiet β€” quiet module output. she's mysterious. we also love her.
  • --ui β€” forces the GUI dialog to launch. clicky-clicky mode activated ✨

πŸ“ Parameters πŸ“

  • input=name [required] β€” the name of an existing space time dataset. gotta point at something, bestie.
  • type=name β€” the type of the input space time dataset.
    • Options: strds, stvds, str3ds
    • Default: strds
  • granularity=string [required] β€” shift granularity.
    • Format absolute time: "x years, x months, x weeks, x days, x hours, x minutes, x seconds", relative time is of type integer

πŸ’– DESCRIPTION πŸ’–

t.shift is designed to temporally shift all registered maps in a space time dataset with a user defined granularity. literally her whole job. raster, 3D raster and vector space time datasets are supported β€” she's flexible like that πŸ’…

the format of the absolute time granularity is "number unit". number is an integer, unit is the temporal unit that can be one of year(s), month(s), week(s), day(s), hour(s), minute(s) or second(s). iconic unit menu, no notes. πŸŽ€

the granularity in case of relative time is an integer. the temporal unit is the unit of the space time dataset and can not be modified. periodt, don't even try. πŸ™ˆ


⚠️ NOTES ⚠️

bestie. listen. be careful when shifting space time datasets with absolute time. πŸ‘‘

the temporal granularity may change if you shift a space time dataset with a unit that is different from the space time dataset granularity. be aware that the shifting with months and years may result in incorrect days per month. shifting the date 20012-03-31 with a granularity of one month will result in 2012-04-31 which is incorrect. in this case an error will raise and the shifting will not performed for the whole dataset. 😭 (yes, the original says 20012-03-31 β€” I'm not touching it, I keep every character exactly as it is, that's the rule 🫢)

you can use the extraction module to shift only a subset of maps from a space time dataset. be aware that the shifting of maps affect all space time datasets in which they are registered. like, all of them. the ripple effect is real. 🌊


πŸ”₯ EXAMPLE πŸ”₯

okay so here's the whole thing in action. we create 6 raster maps and register them in a space time raster dataset using an increment of one day. then we shift the time intervals with a granularity of 12 hours. watch this. πŸ‘‘

r.mapcalc expression="prec_1 = rand(0, 550)" -s
r.mapcalc expression="prec_2 = rand(0, 450)" -s
r.mapcalc expression="prec_3 = rand(0, 320)" -s
r.mapcalc expression="prec_4 = rand(0, 510)" -s
r.mapcalc expression="prec_5 = rand(0, 300)" -s
r.mapcalc expression="prec_6 = rand(0, 650)" -s
t.create type=strds temporaltype=absolute \
         output=precipitation_daily \
         title="Daily precipitation" \
         description="Test dataset with daily precipitation"
t.register -i type=raster input=precipitation_daily \
           maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6 \
           start=2012-01-01 increment="1 day"
t.info type=strds input=precipitation_daily
 +-------------------- Space Time Raster Dataset -----------------------------+
 |                                                                            |
 +-------------------- Basic information -------------------------------------+
 | Id: ........................ precipitation_daily@PERMANENT
 | Name: ...................... precipitation_daily
 | Mapset: .................... PERMANENT
 | Creator: ................... soeren
 | Temporal type: ............. absolute
 | Creation time: ............. 2014-11-23 19:20:26.004855
 | Modification time:.......... 2014-11-23 19:20:26.471536
 | Semantic type:.............. mean
 +-------------------- Absolute time -----------------------------------------+
 | Start time:................. 2012-01-01 00:00:00
 | End time:................... 2012-01-07 00:00:00
 | Granularity:................ 1 day
 | Temporal type of maps:...... interval
 +-------------------- Spatial extent ----------------------------------------+
 | North:...................... 80.0
 | South:...................... 0.0
 | East:.. .................... 120.0
 | West:....................... 0.0
 | Top:........................ 0.0
 | Bottom:..................... 0.0
 +-------------------- Metadata information ----------------------------------+
 | Raster register table:...... raster_map_register_882043e9afaa4e60b845aceb1a1fee2c
 | North-South resolution min:. 10.0
 | North-South resolution max:. 10.0
 | East-west resolution min:... 10.0
 | East-west resolution max:... 10.0
 | Minimum value min:.......... 0.0
 | Minimum value max:.......... 16.0
 | Maximum value min:.......... 297.0
 | Maximum value max:.......... 647.0
 | Aggregation type:........... None
 | Number of registered maps:.. 6
 |
 | Title:
 | Daily precipitation
 | Description:
 | Test dataset with daily precipitation
 | Command history:
 | # 2014-11-23 19:20:26
 | t.create type="strds" temporaltype="absolute"
 |     output="precipitation_daily" title="Daily precipitation"
 |     description="Test dataset with daily precipitation"
 | # 2014-11-23 19:20:26
 | t.register -i type="rast" input="precipitation_daily"
 |     maps="prec_1,prec_2,prec_3,prec_4,prec_5,prec_6" start="2012-01-01"
 |     increment="1 day"
 |
 +----------------------------------------------------------------------------+
t.rast.list input=precipitation_daily
name|mapset|start_time|end_time
prec_1|PERMANENT|2012-01-01 00:00:00|2012-01-02 00:00:00
prec_2|PERMANENT|2012-01-02 00:00:00|2012-01-03 00:00:00
prec_3|PERMANENT|2012-01-03 00:00:00|2012-01-04 00:00:00
prec_4|PERMANENT|2012-01-04 00:00:00|2012-01-05 00:00:00
prec_5|PERMANENT|2012-01-05 00:00:00|2012-01-06 00:00:00
prec_6|PERMANENT|2012-01-06 00:00:00|2012-01-07 00:00:00
t.shift type=strds input=precipitation_daily granularity="12 hours"
t.info type=strds input=precipitation_daily
 +-------------------- Space Time Raster Dataset -----------------------------+
 |                                                                            |
 +-------------------- Basic information -------------------------------------+
 | Id: ........................ precipitation_daily@PERMANENT
 | Name: ...................... precipitation_daily
 | Mapset: .................... PERMANENT
 | Creator: ................... soeren
 | Temporal type: ............. absolute
 | Creation time: ............. 2014-11-23 19:20:26.004855
 | Modification time:.......... 2014-11-23 19:21:08.240018
 | Semantic type:.............. mean
 +-------------------- Absolute time -----------------------------------------+
 | Start time:................. 2012-01-01 12:00:00
 | End time:................... 2012-01-07 12:00:00
 | Granularity:................ 24 hours
 | Temporal type of maps:...... interval
 +-------------------- Spatial extent ----------------------------------------+
 | North:...................... 80.0
 | South:...................... 0.0
 | East:.. .................... 120.0
 | West:....................... 0.0
 | Top:........................ 0.0
 | Bottom:..................... 0.0
 +-------------------- Metadata information ----------------------------------+
 | Raster register table:...... raster_map_register_882043e9afaa4e60b845aceb1a1fee2c
 | North-South resolution min:. 10.0
 | North-South resolution max:. 10.0
 | East-west resolution min:... 10.0
 | East-west resolution max:... 10.0
 | Minimum value min:.......... 0.0
 | Minimum value max:.......... 16.0
 | Maximum value min:.......... 297.0
 | Maximum value max:.......... 647.0
 | Aggregation type:........... None
 | Number of registered maps:.. 6
 |
 | Title:
 | Daily precipitation
 | Description:
 | Test dataset with daily precipitation
 | Command history:
 | # 2014-11-23 19:20:26
 | t.create type="strds" temporaltype="absolute"
 |     output="precipitation_daily" title="Daily precipitation"
 |     description="Test dataset with daily precipitation"
 | # 2014-11-23 19:20:26
 | t.register -i type="rast" input="precipitation_daily"
 |     maps="prec_1,prec_2,prec_3,prec_4,prec_5,prec_6" start="2012-01-01"
 |     increment="1 day"
 | # 2014-11-23 19:21:08
 | t.shift type="strds" input="precipitation_daily"
 |     granularity="12 hours"
 |
 +----------------------------------------------------------------------------+
t.rast.list input=precipitation_daily
name|mapset|start_time|end_time
prec_1|PERMANENT|2012-01-01 12:00:00|2012-01-02 12:00:00
prec_2|PERMANENT|2012-01-02 12:00:00|2012-01-03 12:00:00
prec_3|PERMANENT|2012-01-03 12:00:00|2012-01-04 12:00:00
prec_4|PERMANENT|2012-01-04 12:00:00|2012-01-05 12:00:00
prec_5|PERMANENT|2012-01-05 12:00:00|2012-01-06 12:00:00
prec_6|PERMANENT|2012-01-06 12:00:00|2012-01-07 12:00:00

see that? the whole thing shifted forward by half a day and the granularity went from 1 day to 24 hours. she ate and left no crumbs. πŸ’…


πŸ¦‹ SEE ALSO πŸ¦‹

  • t.create
  • t.register
  • t.snap

πŸ‘‘ AUTHOR πŸ‘‘

SΓΆren Gebbert, ThΓΌnen Institute of Climate-Smart Agriculture β€” absolute legend, giving us temporal tools fr fr 🫢


🌈 SOURCE CODE 🌈

Available at: t.shift source code (history)

Accessed: Saturday Jan 17 05:41:54 2026

Main index | Temporal index | Topics index | Keywords index | Graphical index | Full index

Β© 2003-2025 GRASS Development Team, GRASS GIS 8.4.2 Reference Manual


and that's the whole page bestie!! πŸ’– this was GRASS GIS 8.4.2 β€” t.shift(1), Β© 2003-2025 GRASS Development Team, accessed Saturday Jan 17 05:41:54 2026. go shift some time intervals, you're gonna do great. mwah. πŸŽ€βœ¨

πŸ“¦ where this page comes from