1t.register(1)               GRASS GIS User's Manual              t.register(1)
2
3
4

NAME

6       t.register   -  Assigns  timestamps  and  registers  raster, vector and
7       raster3d maps in a space time dataset.
8

KEYWORDS

10       temporal, map management, register, time
11

SYNOPSIS

13       t.register
14       t.register --help
15       t.register [-i]   [input=name]    [maps=name[,name,...]]    [type=name]
16       [file=name]    [start=string]    [end=string]   [unit=string]   [incre‐
17       ment=string]   [separator=character]   [--overwrite]  [--help]  [--ver‐
18       bose]  [--quiet]  [--ui]
19
20   Flags:
21       -i
22           Create  an  interval  (start and end time) in case an increment and
23           the start time are provided
24
25       --overwrite
26           Allow output files to overwrite existing files
27
28       --help
29           Print usage summary
30
31       --verbose
32           Verbose module output
33
34       --quiet
35           Quiet module output
36
37       --ui
38           Force launching GUI dialog
39
40   Parameters:
41       input=name
42           Name of the input space time dataset
43
44       maps=name[,name,...]
45           Name of the input maps
46
47       type=name
48           Type of the input map
49           Options: raster, vector, raster_3d
50           Default: raster
51
52       file=name
53           Input file with map names, one per line
54           Additionally the start time and the end time can be  specified  per
55           line
56
57       start=string
58           Valid start date and time of the first map
59           Format  for  absolute  time:  "yyyy-mm-dd HH:MM:SS +HHMM", relative
60           time is of type integer.
61
62       end=string
63           Valid end date and time of all map
64           Format for absolute time:  "yyyy-mm-dd  HH:MM:SS  +HHMM",  relative
65           time is of type integer.
66
67       unit=string
68           Time stamp unit
69           Unit must be set in case of relative timestamps
70           Options: years, months, days, hours, minutes, seconds
71
72       increment=string
73           Time increment, works only in conjunction with start option
74           Time  increment  between  maps for creation of valid time intervals
75           (format for absolute  time:  NNN  seconds,  minutes,  hours,  days,
76           weeks,  months, years; format for relative time is of type integer:
77           5)
78
79       separator=character
80           Field separator character of the input file
81           Special characters: pipe, comma, space, tab, newline
82           Default: pipe
83

DESCRIPTION

85       The module t.register has double functionality: it either only  assigns
86       timestamps  to  raster, 3D raster and vector maps in the temporal data‐
87       base (if input option is not provided, see below) or  additionally,  it
88       also registers them within input space time datasets (stds). The exist‐
89       ing timestamp modules r.timestamp, r3.timestamp and v.timestamp do  not
90       register the maps in the temporal database of GRASS GIS. However, time‐
91       stamps that have been created with these modules can be read  and  used
92       by t.register. This works only for maps that are not already registered
93       in the temporal database.
94
95       If the input option is not used (i.e., no stds is provided), maps  will
96       be  only  registered in the temporal database with assigned timestamps.
97       If, on the other hand, the input option is used and a stds is provided,
98       maps  will  be first registered in the temporal database (if not regis‐
99       tered before) and then, in the stds specified. If  the  user  wants  to
100       register maps that are already registered in the temporal database in a
101       different stds, there is no need to pass  information  regarding  start
102       and  end  time, t.register will read timestamps from the temporal data‐
103       base (i.e., in this case only passing map names will be enough).
104
105       The module t.register supports absolute and relative time. The absolute
106       temporal  type  refers to a fixed date while the relative temporal type
107       refers to data without fixed timestamps (e.g., sequential maps used  to
108       calculate multi-decadal averages).
109
110       Maps  can be registered by command line argument (i.e., a list of comma
111       separated map names) or using an input file. The start time,  end  time
112       and a temporal increment can be provided through command line or in the
113       input file. End time and increment are mutually exclusive. The user can
114       register  single maps or a list of maps at once. Maps can be registered
115       in several space time datasets using the same timestamp. For  the  case
116       of  vector  time series, the user can also register a single vector map
117       connected  to  different  layers  representing  time  steps  using  the
118       map:layer notation (See example below).
119
120       The  increment  option  and the -i flag (to create time intervals) work
121       only in conjunction with the start option.  If an input file with time‐
122       stamps (either start time or start time and end time) is used, then the
123       increment option and the -i flag are not supported.
124
125       Start time and end time with absolute time must be provided  using  the
126       format  yyyy-mm-dd HH:MM:SS +HHMM. It is also supported to specify only
127       the date yyyy-mm-dd. In  case  of  relative  time,  the  temporal  unit
128       (years,  months, days, hours, minutes or seconds) must be provided.  In
129       this case, the relative start time, end time and  increment  are  inte‐
130       gers.
131

NOTES

133       The  timestamps of registered maps will be stored in the temporal data‐
134       base and in the metadata of the grass maps  in  the  spatial  database.
135       This assures that timestamps can always be accessed with (r|r3|v).time‐
136       stamp and the temporal modules. Timestamps should only be modified with
137       t.register because the (r|r3|v).timestamp modules have no access to the
138       temporal database.
139

INPUT FILE FORMAT

141       There are several options to register maps by  means  of  a  file.  The
142       input file consists of a list of map names, optionally along with time‐
143       stamps. Each map name (and timestaps if provided) should be stored in a
144       new line in this file.
145
146       When  only map names are provided, the increment option and the -i flag
147       are supported. However, when along with map names any kind of timestamp
148       is  provided,  as  well,  the increment option and the -i are no longer
149       supported.
150
151       Specification of map names only (increment  option  and  -i  flag  sup‐
152       ported):
153       terra_lst_day20020113
154       terra_lst_day20020114
155       terra_lst_day20020115
156       terra_lst_day20020116
157       terra_lst_day20020117
158
159       Specification  of  map names and absolute start time (date) of the time
160       instances (no support for increment option nor -i flag):
161       terra_lst_day20020113|2002-01-13
162       terra_lst_day20020114|2002-01-14
163       terra_lst_day20020115|2002-01-15
164       terra_lst_day20020116|2002-01-16
165       terra_lst_day20020117|2002-01-17
166
167       Specification of map names and absolute start time  (datetime)  of  the
168       time instances (no support for increment option nor -i flag):
169       terra_lst_day20020113|2002-01-13 10:30
170       terra_lst_day20020114|2002-01-14 10:30
171       terra_lst_day20020115|2002-01-15 10:30
172       terra_lst_day20020116|2002-01-16 10:30
173       terra_lst_day20020117|2002-01-17 10:30
174
175       Specification  of  map  names and absolute time interval with start and
176       end time (no support for increment option nor -i flag):
177       prec_1|2001-01-01|2001-04-01
178       prec_2|2001-04-01|2001-07-01
179       prec_3|2001-07-01|2001-10-01
180       prec_4|2001-10-01|2002-01-01
181       prec_5|2002-01-01|2002-04-01
182       prec_6|2002-04-01|2002-07-01
183

EXAMPLE

185   North Carolina dataset
186   Using a text file
187       Register maps in an absolute space time dataset, creating a time inter‐
188       val
189       # first:  prepare a text file with a list of input maps (see above)
190       # second: register maps
191       t.register -i type=raster input=precipitation_monthly \
192           file=list_of_input_maps.txt start="2009-01-01" \
193           increment="1 months"
194
195   Using g.list to generate the input
196       Register maps in an absolute space time dataset, creating a time inter‐
197       val
198       t.register -i type=raster input=precipitation_monthly \
199           maps=`g.list raster pattern="*precip*" sep=comma` start="2009-01-01" \
200           increment="1 months"
201
202   Register a vector map with layers representing time steps
203       Assume a vector map of points that  represent  meteorological  stations
204       and  it is connected to different layers depicting daily time steps. In
205       this example, only the fifth layer of the vector  map  will  be  regis‐
206       tered.
207       # the layer is specified behind the colon
208       t.register type=vector input=meteo_stations_nc_daily \
209           maps=meteo_stations_nc:5 start="2009-01-05"
210
211   Synthetic maps
212       In  this  example  we create 6 raster maps that will be registered in a
213       single space time raster dataset named precip_abs using a monthly  tem‐
214       poral granularity. The -i flag generates time intervals of the provided
215       increment. The generated timestamps will be inspected using r.timestamp
216       and  t.rast.list.  We  will register an additional map with a timestamp
217       that was set with r.timestamp.
218       r.mapcalc expression="prec_1 = 100"
219       r.mapcalc expression="prec_2 = 200"
220       r.mapcalc expression="prec_3 = 300"
221       r.mapcalc expression="prec_4 = 400"
222       r.mapcalc expression="prec_5 = 500"
223       r.mapcalc expression="prec_6 = 600"
224       t.create type=strds temporaltype=absolute \
225           output=precip_abs title="Example" \
226           descr="Example"
227       t.register -i type=raster input=precip_abs \
228           maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6 \
229           start="2001-01-01" increment="1 months"
230       r.timestamp prec_1
231       1 Jan 2001 00:00:00 / 1 Feb 2001 00:00:00
232       r.timestamp prec_2
233       1 Feb 2001 00:00:00 / 1 Mar 2001 00:00:00
234       t.rast.list input=precip_abs
235       name|mapset|start_time|end_time
236       prec_1|PERMANENT|2001-01-01 00:00:00|2001-02-01 00:00:00
237       prec_2|PERMANENT|2001-02-01 00:00:00|2001-03-01 00:00:00
238       prec_3|PERMANENT|2001-03-01 00:00:00|2001-04-01 00:00:00
239       prec_4|PERMANENT|2001-04-01 00:00:00|2001-05-01 00:00:00
240       prec_5|PERMANENT|2001-05-01 00:00:00|2001-06-01 00:00:00
241       prec_6|PERMANENT|2001-06-01 00:00:00|2001-07-01 00:00:00
242       r.mapcalc expression="prec_7 = 700"
243       r.timestamp map=prec_7 date="1 jul 2001 / 1 aug 2001"
244       t.register type=raster input=precip_abs maps=prec_7
245       t.rast.list input=precip_abs
246       name|mapset|start_time|end_time
247       prec_1|PERMANENT|2001-01-01 00:00:00|2001-02-01 00:00:00
248       prec_2|PERMANENT|2001-02-01 00:00:00|2001-03-01 00:00:00
249       prec_3|PERMANENT|2001-03-01 00:00:00|2001-04-01 00:00:00
250       prec_4|PERMANENT|2001-04-01 00:00:00|2001-05-01 00:00:00
251       prec_5|PERMANENT|2001-05-01 00:00:00|2001-06-01 00:00:00
252       prec_6|PERMANENT|2001-06-01 00:00:00|2001-07-01 00:00:00
253       prec_7|PERMANENT|2001-07-01 00:00:00|2001-08-01 00:00:00
254
255   Importing and registering ECA&D climatic data
256       The European Climate Assessment & Dataset (ECA&D)  project  offers  the
257       E-OBS  dataset  which is a daily gridded observational dataset for pre‐
258       cipitation, temperature and sea level pressure in Europe based on ECA&D
259       information.   Download and decompress mean temperature data from: here
260       by accepting their Terms of use.
261       # import E-OBS V12 into a lat-long location (alternatively, use r.external)
262       r.in.gdal -oe input=tg_0.25deg_reg_1950-1964_v12.0.nc \
263         output=temperature_mean offset=0
264       r.in.gdal -oe input=tg_0.25deg_reg_1965-1979_v12.0.nc \
265         output=temperature_mean offset=5479 --o
266       r.in.gdal -oe input=tg_0.25deg_reg_1980-1994_v12.0.nc \
267         output=temperature_mean offset=10957 --o
268       r.in.gdal -oe input=tg_0.25deg_reg_1995-2015_v12.0.nc \
269         output=temperature_mean offset=16436 --o
270       # create STRDS
271       t.create type=strds output=temperature_mean_1950_2015_daily \
272         temporaltype=absolute semantictype=mean \
273         title="European mean temperature 1950-2015" \
274         description="The European daily mean temperature from ECAD"
275       # create text file with all temperature_mean rasters, one per line,
276       # a) using a shell script
277       for i in `seq 1 23922` ; do
278           echo temperature_mean.$i >> map_list.txt
279       done
280       # b) using a Python script
281       file = open("map_list.txt", "w")
282       for i in range(23922):
283           file.write("temperature_mean.%i\n" % (i + 1))
284       file.close()
285       # register daily maps using the file created above
286       t.register -i type=raster input=temperature_mean_1950_2015_daily \
287                     file=map_list.txt start="1950-01-01" increment="1 days"
288

SEE ALSO

290        t.create, t.info
291
292       Maps registration examples in Temporal data processing Wiki
293

AUTHOR

295       Sören Gebbert, Thünen Institute of Climate-Smart Agriculture
296

SOURCE CODE

298       Available at: t.register source code (history)
299
300       Main index | Temporal index | Topics index | Keywords index | Graphical
301       index | Full index
302
303       © 2003-2020 GRASS Development Team, GRASS GIS 7.8.5 Reference Manual
304
305
306
307GRASS 7.8.5                                                      t.register(1)
Impressum