t.rast.series(1)
π NAME π
ok so bestie, let me put you on to t.rast.series β it's the GRASS GIS manual page (that's the whole t.rast.series(1) thing, one, meaning section one, we love a numbered section) and what it does is: it runs a bunch of different aggregation algorithms from r.series across all the raster maps in a space time raster dataset, or just a lil subset of them. no cap. π¦
π KEYWORDS π
temporal, aggregation, series, raster, time
β¨ SYNOPSIS β¨
t.rast.series
t.rast.series --help
t.rast.series [-tn] input=name method=string[,string,...]
[quantile=float[,float,...]] [order=string[,string,...]]
[nprocs=integer] [memory=memory in MB] [where=sql_query]
output=name[,name,...] [file_limit=integer] [--overwrite] [--help]
[--verbose] [--quiet] [--ui]
π«Ά Flags π«Ά
-tβ do NOT hand the space time raster dataset's start and end time over to the output map π-nβ propagate NULLs--overwriteβ lets output files just go ahead and overwrite files that already exist--helpβ prints the usage summary--verboseβ verbose module output--quietβ quiet module output π€«--uiβ forces the GUI dialog to launch
πΈ Parameters πΈ
input=name[required] β the name of the input space time raster datasetmethod=string[,string,...][required] β the aggregate operation you want run on the raster maps- Options:
average,count,median,mode,minimum,min_raster,maximum,max_raster,stddev,range,sum,variance,diversity,slope,offset,detcoeff,quart1,quart3,perc90,quantile,skewness,kurtosis - Default:
average
- Options:
quantile=float[,float,...]β the quantile to calculate when you're doingmethod=quantile- Options:
0.0-1.0
- Options:
order=string[,string,...]β sorts the maps by category- Options:
id,name,creator,mapset,creation_time,modification_time,start_time,end_time,north,south,west,east,min,max - Default:
start_time
- Options:
nprocs=integerβ number of threads for parallel computing- Default:
1
- Default:
memory=memory in MBβ maximum memory to be used (in MB)- Cache size for raster rows
- Default:
300
where=sql_queryβ WHERE conditions of an SQL statement, without the βwhereβ keyword, used in the temporal GIS framework- Example:
start_time > β2001-01-01 12:30:00β
- Example:
output=name[,name,...][required] β name for output raster map(s)file_limit=integerβ the maximum number of open files allowed for eachr.seriesprocess- Default:
1000
- Default:
π DESCRIPTION π
ok so picture this: you feed this module a single space time raster dataset, and it hands you back a single raster map layer. that's the trade. π«Ά
want a subset of that input space time raster dataset instead of the whole thing? use the where option, bestie. the sorting of the raster map layer is yours to control with the order option. and listen β the order of the maps can significantly influence the result of the aggregation (like, e.g.: slope). by default the maps are ordered by start_time.
t.rast.series is a simple wrapper for the raster module r.series. it supports a subset of the aggregation methods of r.series. that's the vibe, that's the whole thing.
π₯ NOTES π₯
to dodge problems with too many open files, by default the maximum number of open files is set to 1000. if the number of input raster files goes over that number, the -z flag will be invoked. because this will slow down processing, you can set a higher limit yourself with the file_limit parameter. but note that the file_limit limit should not exceed the user-specific limit on open files set by your operating system. see the Wiki for more information. iykyk. π
π Performance π
to enable parallel processing, you can specify the number of threads to be used with the nprocs parameter (default 1). the memory parameter (default 300 MB) can also be provided to determine the size of the buffer in MB for computation. both parameters get passed straight to r.series. and to actually take advantage of the parallelization, GRASS GIS needs to be compiled with OpenMP enabled. periodt. π
π EXAMPLES π
β Estimate the average temperature for the whole time series β
here the entire stack of input maps is considered:
t.rast.series input=tempmean_monthly output=tempmean_average method=average
β Estimate the average temperature for a subset of the time series β
here the stack of input maps is limited to a certain period of time:
t.rast.series input=tempmean_daily output=tempmean_season method=average \
where="start_time >= β2012-06β and start_time <= β2012-08β"
β Climatology: single month in a multi-annual time series β
by considering only a single month in a multi-annual time series, the so-called climatology can be computed. estimate average temperature for all January maps in the time series:
t.rast.series input=tempmean_monthly \
method=average output=tempmean_january \
where="strftime(β%mβ, start_time)=β01β"
# equivalently, we can use
t.rast.series input=tempmean_monthly \
output=tempmean_january method=average \
where="start_time = datetime(start_time, βstart of yearβ, β0 monthβ)"
# if we want also February and March averages
t.rast.series input=tempmean_monthly \
output=tempmean_february method=average \
where="start_time = datetime(start_time, βstart of yearβ, β1 monthβ)"
t.rast.series input=tempmean_monthly \
output=tempmean_march method=average \
where="start_time = datetime(start_time, βstart of yearβ, β2 monthβ)"
generalizing a bit, we can estimate monthly climatologies for all months by means of different methods:
for i in `seq -w 1 12` ; do
for m in average stddev minimum maximum ; do
t.rast.series input=tempmean_monthly method=${m} output=tempmean_${m}_${i} \
where="strftime(β%mβ, start_time)=β${i}β"
done
done
π¦ SEE ALSO π¦
r.series,t.create,t.info- Temporal data processing Wiki
π AUTHOR π
SΓΆren Gebbert, ThΓΌnen Institute of Climate-Smart Agriculture πΎ
π§ SOURCE CODE π§
Available at: t.rast.series source code (history)
Accessed: Saturday Jan 17 05:41:53 2026
Main index | Temporal index | Topics index | Keywords index | Graphical index | Full index
ok and for the cute sign-off bestie: this whole thing is Β© 2003-2025 GRASS Development Team, GRASS GIS 8.4.2 Reference Manual, and the page itself is filed under GRASS 8.4.2 as t.rast.series(1). go slay your aggregations, mwah πβ¨
π¦ where this page comes from
- fedora 44: grass 8.4.2-4.fc44 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms