t.rast.climatologies
Calculates climatologies from a space time raster dataset of absolute temporal type
t.rast.climatologies [-s] input=name [output=name] basename=string method=string [,string,...] [quantile=float [,float,...]] granularity=string [where=sql_query] [nprocs=integer] [--overwrite] [--verbose] [--quiet] [--qq] [--ui]
Example:
t.rast.climatologies input=name basename=string method=average granularity=day
grass.tools.Tools.t_rast_climatologies(input, output=None, basename, method="average", quantile=None, granularity="day", where=None, nprocs=1, flags=None, overwrite=None, verbose=None, quiet=None, superquiet=None)
Example:
tools = Tools()
tools.t_rast_climatologies(input="name", basename="string", method="average", granularity="day")
This grass.tools API is experimental in version 8.5 and expected to be stable in version 8.6.
grass.script.run_command("t.rast.climatologies", input, output=None, basename, method="average", quantile=None, granularity="day", where=None, nprocs=1, flags=None, overwrite=None, verbose=None, quiet=None, superquiet=None)
Example:
gs.run_command("t.rast.climatologies", input="name", basename="string", method="average", granularity="day")
Parameters
input=name [required]
Name of the input space time raster dataset
output=name
Name of the output space time raster dataset
basename=string [required]
Basename of the newly generated output maps
Either a numerical suffix or the start time (s-flag) separated by an underscore will be attached to create a unique identifier
method=string [,string,...] [required]
Aggregate operation to be performed on the raster maps
Allowed values: 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
Allowed values: 0.0-1.0
granularity=string [required]
Aggregate by day or month
Allowed values: day, 15 days, month
Default: day
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'
nprocs=integer
Number of processes to run in parallel
Default: 1
-s
Do not create a space time raster dataset as output
--overwrite
Allow output files to overwrite existing files
--help
Print usage summary
--verbose
Verbose module output
--quiet
Quiet module output
--qq
Very quiet module output
--ui
Force launching GUI dialog
input : str, required
Name of the input space time raster dataset
Used as: input, strds, name
output : str, optional
Name of the output space time raster dataset
Used as: output, strds, name
basename : str, required
Basename of the newly generated output maps
Either a numerical suffix or the start time (s-flag) separated by an underscore will be attached to create a unique identifier
Used as:
method : str | list[str], required
Aggregate operation to be performed on the raster maps
Allowed values: 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 | list[float] | str, optional
Quantile to calculate for method=quantile
Allowed values: 0.0-1.0
granularity : str, required
Aggregate by day or month
Allowed values: day, 15 days, month
Default: day
where : str, optional
WHERE conditions of SQL statement without 'where' keyword used in the temporal GIS framework
Example: start_time > '2001-01-01 12:30:00'
Used as: sql_query
nprocs : int, optional
Number of processes to run in parallel
Default: 1
flags : str, optional
Allowed values: s
s
Do not create a space time raster dataset as output
overwrite : bool, optional
Allow output files to overwrite existing files
Default: None
verbose : bool, optional
Verbose module output
Default: None
quiet : bool, optional
Quiet module output
Default: None
superquiet : bool, optional
Very quiet module output
Default: None
Returns:
result : grass.tools.support.ToolResult | None
If the tool produces text as standard output, a ToolResult object will be returned. Otherwise, None will be returned.
Raises:
grass.tools.ToolError: When the tool ended with an error.
input : str, required
Name of the input space time raster dataset
Used as: input, strds, name
output : str, optional
Name of the output space time raster dataset
Used as: output, strds, name
basename : str, required
Basename of the newly generated output maps
Either a numerical suffix or the start time (s-flag) separated by an underscore will be attached to create a unique identifier
Used as:
method : str | list[str], required
Aggregate operation to be performed on the raster maps
Allowed values: 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 | list[float] | str, optional
Quantile to calculate for method=quantile
Allowed values: 0.0-1.0
granularity : str, required
Aggregate by day or month
Allowed values: day, 15 days, month
Default: day
where : str, optional
WHERE conditions of SQL statement without 'where' keyword used in the temporal GIS framework
Example: start_time > '2001-01-01 12:30:00'
Used as: sql_query
nprocs : int, optional
Number of processes to run in parallel
Default: 1
flags : str, optional
Allowed values: s
s
Do not create a space time raster dataset as output
overwrite : bool, optional
Allow output files to overwrite existing files
Default: None
verbose : bool, optional
Verbose module output
Default: None
quiet : bool, optional
Quiet module output
Default: None
superquiet : bool, optional
Very quiet module output
Default: None
DESCRIPTION
t.rast.climatologies is a module to calculate climatologies, i.e., long term stats, for single days or months in a time series. If the s flag is used, the module outputs a new space time raster dataset of relative temporal type with the aggregated maps.
EXAMPLE
Daily climatologies
Starting from a space time raster dataset of daily granularity (or granularity lower than one day), the module will create a new space time raster dataset of relative temporal type containing the long term average for each day along years.
t.rast.climatologies input=myinput output=dailyoutput
15 days climatologies
Starting from a space time raster dataset of daily granularity (or granularity lower than one day), the module will create a new space time raster dataset of relative temporal type containing the long term average every 15 days starting from 1st January.
t.rast.climatologies input=myinput output=dailyoutput granularity='15 days'
Monthly climatologies
Starting from a space time raster dataset of monthly granularity (or lower than one month), the module will create two new space time raster datasets containing the long term minimum and maximum for each month along years.
t.rast.climatologies input=myinput granularity=month method=min,max \
output=monthlyoutputmin,monthlyoutputmax
SEE ALSO
AUTHOR
Luca Delucchi, Fondazione Edmund Mach
SOURCE CODE
Available at: t.rast.climatologies source code
(history)
Latest change: Monday Jul 20 07:38:42 2026 in commit 2475d99