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, kurtosis Default: average
  • quantile=float[,float,...] β€” quantile to calculate for method=quantile. Options: 0.0-1.0
  • order=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, max Default: start_time
  • nprocs=integer β€” number of threads for parallel computing. 0: use OpenMP default; >0: use nprocs; <0: use MAX-nprocs Default: 0
  • memory=memory in MB β€” maximum memory to be used (in MB). Cache size for raster rows. Default: 300
  • where=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 each r.series process. 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 β€” slope is the poster child for this. By default the maps are ordered by start_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