If no r.mapcalc expression is defined, the selected maps are simply registered in the new created output space time raster dataset to avoid data duplication.
t.rast.extract input=precipitation where="start_time > '2001-01-05'" \ output=selected_precipitation base=new_prec_map \ expression="if(precipitation < 5, null(), precipitation)"
Then we extract all maps that are later 2005 and store the selected maps in the space time raster dataset precipitation_yearly_later_2005.
MAPS="map_1 map_2 map_3 map_4 map_5 map_6 map_7 map_8" for map in ${MAPS} ; do r.mapcalc --o expr="${map} = 1" echo ${map} >> map_list.txt done t.create type=strds temporaltype=absolute \ output=precipitation_yearly \ title="Yearly precipitation" \ description="Test dataset with yearly precipitation" t.register -i type=rast input=precipitation_yearly \ file=map_list.txt start="2000-01-01" increment="1 year" t.rast.list precipitation_yearly map_1 test 2000-01-01 00:00:00 2001-01-01 00:00:00 map_2 test 2001-01-01 00:00:00 2002-01-01 00:00:00 map_3 test 2002-01-01 00:00:00 2003-01-01 00:00:00 map_4 test 2003-01-01 00:00:00 2004-01-01 00:00:00 map_5 test 2004-01-01 00:00:00 2005-01-01 00:00:00 map_6 test 2005-01-01 00:00:00 2006-01-01 00:00:00 map_7 test 2006-01-01 00:00:00 2007-01-01 00:00:00 map_8 test 2007-01-01 00:00:00 2008-01-01 00:00:00 t.rast.extract input=precipitation_yearly output=precipitation_yearly_later_2005 \ where="start_time >= '2005-01-01'" t.rast.list precipitation_yearly_later_2005 map_6 test 2005-01-01 00:00:00 2006-01-01 00:00:00 map_7 test 2006-01-01 00:00:00 2007-01-01 00:00:00 map_8 test 2007-01-01 00:00:00 2008-01-01 00:00:00
Last changed: $Date$