t.rast.series(1grass)
π NAME π
Okay bestie, welcome to the manual page for t.rast.series(1grass)</pink> β literally the glow-up you needed for stacked raster data. What it does: it performs different aggregation algorithms from r.series` on all β or just a subset β of the raster maps living inside a space time raster dataset. That's the whole vibe. π«Ά
π·οΈ 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 assign the space time raster dataset start and end time to the output map. no timestamp, no problem.-nβ propagate NULLs. let the NULLs travel, they've got places to be.--overwriteβ allow output files to overwrite existing files. yolo, but like, on purpose.--helpβ print usage summary. the classic cry for help, but useful.--verboseβ verbose module output. it will not shut up (affectionate).--quietβ quiet module output. shhh era. π€«--uiβ force launching GUI dialog. for the girlies who love a little window.
ποΈ Parameters
input=name[required] β name of the input space time raster dataset. your source material, your muse.method=string[,string,...][required] β the aggregate operation to be performed 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,kurtosisDefault:averagequantile=float[,float,...]β quantile to calculate formethod=quantile. Options:0.0-1.0order=string[,string,...]β sort the maps by category. Options:id,name,creator,mapset,creation_time,modification_time,start_time,end_time,north,south,west,east,min,maxDefault:start_timenprocs=integerβ number of threads for parallel computing.0: use OpenMP default;>0: use nprocs;<0: use MAX-nprocs Default:0memory=memory in MBβ maximum memory to be used (in MB). Cache size for raster rows. Default:300where=sql_queryβ WHERE conditions of SQL statement without 'where' keyword used in the temporal GIS framework. Example:start_time > '2001-01-01 12:30:00'output=name[,name,...][required] β name for output raster map(s). the baby that comes out of this whole process. πΆfile_limit=integerβ the maximum number of open files allowed for eachr.seriesprocess. Default:1000
πΈ DESCRIPTION πΈ
So here's the setup: you feed it a single space time raster dataset, and it hands you back a single raster map layer. That's the trade. π
Wanna work with just a slice of that dataset instead of the whole thing? Use the where option to pick your subset. Wanna control the order things get crunched in? That's the order option.
β οΈ Real talk: the order of the maps can significantly influence the result of the aggregation βslopeis the poster child for this. By default the maps are ordered bystart_time. Don't come for me when the slope looks different, you were warned. π
And ngl, t.rast.series is a simple wrapper for the raster module r.series. It supports a subset of the aggregation methods that r.series has. Not all of them, bestie β a subset. β¨
π NOTES π
Here's the thing about too many open files: it's a whole mess. So to avoid problems, by default the maximum number of open files is set to 1000. If the number of input raster files exceeds that number, the -z flag will be invoked. Because that slows down processing, you the user can set a higher limit with the file_limit parameter. π
π¨ But listen: the file_limit limit should not exceed the user-specific limit on open files set by your operating system. Check the Wiki for more information. Respect the OS, she has boundaries.
β‘ Performance
Wanna go fast? You can specify the number of threads to use 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 of these get passed straight to r.series. ποΈ
And to actually take advantage of the parallelization, GRASS needs to be compiled with OpenMP enabled. No OpenMP, no zoomies. 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)
Latest change: Monday Nov 03 07:16:48 2025 in commit: c96796774942e46bbababcd652d3986d4e295665
Main index | Temporal index | Topics index | Keywords index | Graphical index | Full index
okay that's the whole page, bestie, you ate it up π and before I go β the little footer credits: Β© 2003-2026 GRASS Development Team, and this is the GRASS 8.5.0 Reference Manual, GRASS 8.5.0, manual page t.rast.series(1grass). slay, now go aggregate something iconic. πβ¨
π¦ where this page comes from
- alpine 3.24: grass-gis-doc 8.5.0-r1 Β· GPL-2.0-or-later
- ubuntu stonking: grass-doc 8.5.0-1ubuntu1 Β· 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