# Examples of resulting naming schemes for different aggregations when using -s flag #### weekly aggregation #### t.rast.aggregate -s input=daily_temp output=weekly_avg_temp \ basename=weekly_avg_temp method=average granularity="1 weeks" t.rast.list weekly_avg_temp GRASS 7.1.svn (latlong_wgs84):~ > t.rast.list weekly_avg_temp name|mapset|start_time|end_time weekly_avg_temp_2003_01_03|pruebas|2003-01-03 00:00:00|2003-01-10 00:00:00 weekly_avg_temp_2003_01_10|pruebas|2003-01-10 00:00:00|2003-01-17 00:00:00 weekly_avg_temp_2003_01_17|pruebas|2003-01-17 00:00:00|2003-01-24 00:00:00 weekly_avg_temp_2003_01_24|pruebas|2003-01-24 00:00:00|2003-01-31 00:00:00 weekly_avg_temp_2003_01_31|pruebas|2003-01-31 00:00:00|2003-02-07 00:00:00 weekly_avg_temp_2003_02_07|pruebas|2003-02-07 00:00:00|2003-02-14 00:00:00 weekly_avg_temp_2003_02_14|pruebas|2003-02-14 00:00:00|2003-02-21 00:00:00 #### 8day aggregation #### t.rast.aggregate -s input=daily_temp output=8day_avg_temp \ basename=8day_avg_temp method=average granularity="8 days" t.rast.list 8day_avg_temp GRASS 7.1.svn (latlong_wgs84):~ > t.rast.list 8day_avg_temp name|mapset|start_time|end_time 8day_avg_temp_2003_01_01|pruebas|2003-01-01 00:00:00|2003-01-09 00:00:00 8day_avg_temp_2003_01_09|pruebas|2003-01-09 00:00:00|2003-01-17 00:00:00 8day_avg_temp_2003_01_17|pruebas|2003-01-17 00:00:00|2003-01-25 00:00:00 8day_avg_temp_2003_01_25|pruebas|2003-01-25 00:00:00|2003-02-02 00:00:00 8day_avg_temp_2003_02_02|pruebas|2003-02-02 00:00:00|2003-02-10 00:00:00 8day_avg_temp_2003_02_10|pruebas|2003-02-10 00:00:00|2003-02-18 00:00:00 # Note that to make this aggregation comparable with 8day MODIS products, for example, # you should loop over years, and maybe merge resulting strds afterwards for YEAR in "2003 2004" "2004 2005" ; do set -- $YEAR ; echo $1 $2 t.rast.aggregate -s input=daily_temp output=8day_avg_temp_${1} \ basename=8day_avg_temp method=average granularity="8 days" \ where="start_time >='${1}-01-01' and end_time < '${2}-01-01'" --o done GRASS 7.1.svn (latlong_wgs84):~ > t.list ---------------------------------------------- Space time raster datasets with absolute time available in mapset : 8day_avg_temp_2003@pruebas 8day_avg_temp_2004@pruebas daily_temp@pruebas GRASS 7.1.svn (latlong_wgs84):~ > t.rast.list 8day_avg_temp_2003 name|mapset|start_time|end_time 8day_avg_temp_2003_01_01|pruebas|2003-01-01 00:00:00|2003-01-09 00:00:00 8day_avg_temp_2003_01_09|pruebas|2003-01-09 00:00:00|2003-01-17 00:00:00 8day_avg_temp_2003_01_17|pruebas|2003-01-17 00:00:00|2003-01-25 00:00:00 8day_avg_temp_2003_01_25|pruebas|2003-01-25 00:00:00|2003-02-02 00:00:00 ... 8day_avg_temp_2003_12_03|pruebas|2003-12-03 00:00:00|2003-12-11 00:00:00 8day_avg_temp_2003_12_11|pruebas|2003-12-11 00:00:00|2003-12-19 00:00:00 8day_avg_temp_2003_12_19|pruebas|2003-12-19 00:00:00|2003-12-27 00:00:00 8day_avg_temp_2003_12_27|pruebas|2003-12-27 00:00:00|2004-01-04 00:00:00 #### monthly aggregation #### t.rast.aggregate -s input=daily_temp output=monthly_avg_temp \ basename=monthly_avg_temp method=average granularity="1 months" t.rast.list monthly_avg_temp GRASS 7.1.svn (latlong_wgs84):~ > t.rast.list monthly_avg_temp name|mapset|start_time|end_time monthly_avg_temp_2003_01|pruebas|2003-01-01 00:00:00|2003-02-01 00:00:00 monthly_avg_temp_2003_02|pruebas|2003-02-01 00:00:00|2003-03-01 00:00:00 monthly_avg_temp_2003_03|pruebas|2003-03-01 00:00:00|2003-04-01 00:00:00 monthly_avg_temp_2003_04|pruebas|2003-04-01 00:00:00|2003-05-01 00:00:00 monthly_avg_temp_2003_05|pruebas|2003-05-01 00:00:00|2003-06-01 00:00:00 monthly_avg_temp_2003_06|pruebas|2003-06-01 00:00:00|2003-07-01 00:00:00 #### yearly aggregation #### t.rast.aggregate -s input=daily_temp output=yearly_avg_temp \ basename=yearly_avg_temp method=average granularity="1 years" t.rast.list yearly_avg_temp GRASS 7.1.svn (latlong_wgs84):~ > t.rast.list yearly_avg_temp name|mapset|start_time|end_time yearly_avg_temp_2003|pruebas|2003-01-01 00:00:00|2004-01-01 00:00:00 yearly_avg_temp_2004|pruebas|2004-01-01 00:00:00|2005-01-01 00:00:00