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 dataset
  • method=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
  • quantile=float[,float,...] β€” the quantile to calculate when you're doing method=quantile
    • Options: 0.0-1.0
  • 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
  • nprocs=integer β€” number of threads for parallel computing
    • Default: 1
  • 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’
  • output=name[,name,...] [required] β€” name for output raster map(s)
  • file_limit=integer β€” the maximum number of open files allowed for each r.series process
    • Default: 1000

πŸ’… 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