Note: A new GRASS GIS stable version has been released: GRASS GIS 7.4, available here.
Updated manual page: here
This module supports absolute and relative time. The absolute temporal type refers to a fixed date while the relative temporal type refers to data without fixed time stamps (e.g., sequential maps used to calculate multi-decadal averages).
Maps can be registered by command line argument (a list of comma separated map names) or using an input file. The start time, the end time and a temporal increment can be provided by command line or in the input file. End time and increment are mutual exclusive. The user can register single maps or a list of maps at once. Maps can be registered in several space time datasets using the same timestamp.
The increment option and the -i flag (to create time intervals) work only in conjunction with the start option. If an input file with time stamps is used, then the increment option and the -i flag are not supported.
Start time and end time with absolute time must be provided using the format yyyy-mm-dd HH:MM:SS +HHMM. It is supported to specify only the date yyyy-mm-dd. In case of relative time the temporal unit (years, months, days, hours, minutes or seconds) must be provided. The relative start time, end time and the increment are integers.
There are several options to register maps, increment option and the -i flag are supported:
Specification of map names:
terra_lst_day20020113 terra_lst_day20020114 terra_lst_day20020115 terra_lst_day20020116 terra_lst_day20020117
Specification of map names and the absolute start time (date) of the time instances, not support for increment option and the -i flag:
terra_lst_day20020113|2002-01-13 terra_lst_day20020114|2002-01-14 terra_lst_day20020115|2002-01-15 terra_lst_day20020116|2002-01-16 terra_lst_day20020117|2002-01-17
Specification of map names and the absolute time stamp (datetime), not support for increment option and the -i flag:
terra_lst_day20020113|2002-01-13 10:30 terra_lst_day20020114|2002-01-14 10:30 terra_lst_day20020115|2002-01-15 10:30 terra_lst_day20020116|2002-01-16 10:30 terra_lst_day20020117|2002-01-17 10:30
Specification of the map name and the absolute time interval with start, not support for increment option and the -i flag: and end time:
prec_1|2001-01-01|2001-04-01 prec_2|2001-04-01|2001-07-01 prec_3|2001-07-01|2001-10-01 prec_4|2001-10-01|2002-01-01 prec_5|2002-01-01|2002-04-01 prec_6|2002-04-01|2002-07-01
# first: prepare a text file with a list of input maps (see above) # second: register maps t.register -i type=raster input=precipitation_monthly \ file=list_of_input_maps.txt start=2009-01-01 \ increment="1 months"
t.register -i type=raster input=precipitation_monthly \ maps=`g.list raster pattern="*precip*" sep=comma` start=2009-01-01 \ increment="1 months"
r.mapcalc expression="prec_1 = 100" r.mapcalc expression="prec_2 = 200" r.mapcalc expression="prec_3 = 300" r.mapcalc expression="prec_4 = 400" r.mapcalc expression="prec_5 = 500" r.mapcalc expression="prec_6 = 600" t.create type=strds temporaltype=absolute \ output=precip_abs title="Example" \ descr="Example" t.register -i type=raster input=precip_abs \ maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6 \ start="2001-01-01" increment="1 months" r.timestamp prec_1 1 Jan 2001 00:00:00 / 1 Feb 2001 00:00:00 r.timestamp prec_2 1 Feb 2001 00:00:00 / 1 Mar 2001 00:00:00 t.rast.list input=precip_abs name|mapset|start_time|end_time prec_1|PERMANENT|2001-01-01 00:00:00|2001-02-01 00:00:00 prec_2|PERMANENT|2001-02-01 00:00:00|2001-03-01 00:00:00 prec_3|PERMANENT|2001-03-01 00:00:00|2001-04-01 00:00:00 prec_4|PERMANENT|2001-04-01 00:00:00|2001-05-01 00:00:00 prec_5|PERMANENT|2001-05-01 00:00:00|2001-06-01 00:00:00 prec_6|PERMANENT|2001-06-01 00:00:00|2001-07-01 00:00:00 r.mapcalc expression="prec_7 = 700" r.timestamp map=prec_7 date="1 jul 2001 / 1 aug 2001" t.register type=raster input=precip_abs maps=prec_7 t.rast.list input=precip_abs name|mapset|start_time|end_time prec_1|PERMANENT|2001-01-01 00:00:00|2001-02-01 00:00:00 prec_2|PERMANENT|2001-02-01 00:00:00|2001-03-01 00:00:00 prec_3|PERMANENT|2001-03-01 00:00:00|2001-04-01 00:00:00 prec_4|PERMANENT|2001-04-01 00:00:00|2001-05-01 00:00:00 prec_5|PERMANENT|2001-05-01 00:00:00|2001-06-01 00:00:00 prec_6|PERMANENT|2001-06-01 00:00:00|2001-07-01 00:00:00 prec_7|PERMANENT|2001-07-01 00:00:00|2001-08-01 00:00:00
# import E-OBS V12 into a lat-long location (alternatively, use r.external) r.in.gdal -oe input=tg_0.25deg_reg_1950-1964_v12.0.nc \ output=temperature_mean offset=0 r.in.gdal -oe input=tg_0.25deg_reg_1965-1979_v12.0.nc \ output=temperature_mean offset=5479 --o r.in.gdal -oe input=tg_0.25deg_reg_1980-1994_v12.0.nc \ output=temperature_mean offset=10957 --o r.in.gdal -oe input=tg_0.25deg_reg_1995-2015_v12.0.nc \ output=temperature_mean offset=16436 --o # create STRDS t.create type=strds output=temperature_mean_1950_2015_daily \ temporaltype=absolute semantictype=mean \ title="European mean temperature 1950-2015" \ description="The European daily mean temperature from ECAD" # create text file with all temperature_mean rasters, one per line, # a) using a shell script for i in `seq 1 23922` ; do echo temperature_mean.$i >> map_list.txt done # b) using a Python script file = open("map_list.txt", "w") for i in range(23922): file.write("temperature_mean.%i\n" % (i + 1)) file.close() # register daily maps using the file created above t.register -i type=raster input=temperature_mean_1950_2015_daily \ file=map_list.txt start=1950-01-01 increment="1 days"
Maps registration examples in Temporal data processing Wiki
Last changed: $Date: 2016-05-25 09:51:19 -0700 (Wed, 25 May 2016) $
Available at: t.register source code (history)
Note: A new GRASS GIS stable version has been released: GRASS GIS 7.4, available here.
Updated manual page: here
Main index | Temporal index | Topics index | Keywords index | Full index
© 2003-2018 GRASS Development Team, GRASS GIS 7.0.7svn Reference Manual