r.series.accumulate(1grass)
π NAME π
okay bestie, so r.series.accumulate β it's the GRASS module that makes every output cell value into an accumulationfunction of the values assigned to the corresponding cells in the input raster map layers. yes, "accumulationfunction," that's the word, we're keeping it, it's iconic. π«Ά
β¨ KEYWORDS β¨
raster, series, accumulation
πΈ SYNOPSIS πΈ
r.series.accumulate
r.series.accumulate --help
r.series.accumulate [-nzf] [basemap=name] [input=name[,name,...]]
[file=name] output=name [scale=float] [shift=float] [lower=name]
[upper=name] [range=min,max] [limits=lower,upper] [method=string]
[--overwrite] [--help] [--verbose] [--quiet] [--ui]
π Flags
-nβ Propagate NULLs π³οΈ-zβ Do not keep files open (the open-files-limit saver, we love her)-fβ Create a FCELL map (floating point single precision) as output--overwriteβ Allow output files to overwrite existing files--helpβ Print usage summary--verboseβ Verbose module output--quietβ Quiet module output--uiβ Force launching GUI dialog
π Parameters
basemap=nameβ Existing map to be added to outputinput=name[,name,...]β Name of input raster map(s)file=nameβ Input file with raster map names, one per lineoutput=name[required] β Name for output raster map (yes bestie it's mandatory, no skipping π)scale=floatβ Scale factor for input. Default:1.0shift=floatβ Shift factor for input. Default:0.0lower=nameβ The raster map specifying the lower accumulation limit, also called baselineupper=nameβ The raster map specifying the upper accumulation limit, also called cutoff. Only applied to BEDD computation.range=min,maxβ Ignore values outside this rangelimits=lower,upperβ Use these limits in caselowerand/orupperinput maps are not defined. Default:10,30method=stringβ This method will be applied to compute the accumulative values from the input maps- Options:
gdd,bedd,huglin,mean - Default:
gdd gdd: Growing Degree Days or Winkler indicesbedd: Biologically Effective Degree Dayshuglin: Huglin Heliothermal indexmean: Mean:sum(input maps)/(number of input maps)
- Options:
π¦ DESCRIPTION π¦
r.series.accumulate calculates (accumulated) raster value using growing degree days (GDDs)/Winkler indices's, Biologically Effective Degree Days (BEDD), Huglin heliothermal indices or an average approach from several input maps for a given day. And listen β the accumulation of, say, degree-days into growing degree days (GDDs) can be done by providing a basemap with the GDDs of the previous day. so you stack the days, it's giving very time-series main character energy. π
The flag -a determines the average computation of the input raster maps. In case the flag is not set, the average calculation is:
average = (min + max) / 2
In case the flag was set, the calculation changes to arithmetic mean:
average = sum(input maps) / (number of input maps)
GDD β Growing Degree Days β are calculated as:
gdd = average - lower
In case the -a is set, the Winkler indices are calculated instead of GDD, usually accumulated for the period April 1st to October 31st (northern hemisphere) or the period October 1st to April 30th (southern hemisphere). π
BEDDs β Biologically Effective Degree Days β are calculated as:
bedd = average - lower
with an optional upper cutoff applied to the average instead of the temperature values.
The Huglin heliothermal index is calculated as:
huglin = (average + max) / 2 - lower
usually accumulated for the period April 1st to September 30th (northern hemisphere) or the period September 1st to April 30th (southern hemisphere).
Mean raster values are calculated as:
mean = average
For all the formulas, min is the minimum value, max the maximum value and average the average value. The min, max and average values are automatically calculated from the input maps. automatic, bestie, you don't lift a finger β¨
The shift and scale values are applied directly to the input values. The lower and upper maps, as well as the range options are applied to constrain the accumulation. In case the lower and upper maps are not provided, the limits option with default values will be applied.
If an existing map is provided with the basemap option, the values of this map are added to the output.
π§ NOTES π§
The scale and shift parameters are used to transform input values with:
new = old * scale + shift
With the -n flag, any cell for which any of the corresponding input cells are NULL is automatically set to NULL (NULL propagation) and the accumulated value is not calculated.
Negative results are set to 0 (zero).
Without the -n flag, all non-NULL cells are used for calculation.
If the range= option is given, any values which fall outside that range will be treated as if they were NULL. Note that the range is applied to the scaled and shifted input data. The range parameter can be set to low,high thresholds: values outside of this range are treated as NULL (i.e., they will be ignored by most aggregates, or will cause the result to be NULL if -n is given). The low,high thresholds are floating point, so use -inf or inf for a single threshold (e.g., range=0,inf to ignore negative values, or range=-inf,-200.4 to ignore values above -200.4).
The maximum number of raster maps that can be processed is given by the user-specific limit of the operating system. For example, the soft limits for users are typically 1024 files. The soft limit can be changed with e.g. ulimit -n 4096 (UNIX-based operating systems) but it cannot be higher than the hard limit. If the latter is too low, you can as superuser add an entry in:
/etc/security/limits.conf
# <domain> <type> <item> <value>
your_username hard nofile 4096
This will raise the hard limit to 4096 files. Also have a look at the overall limit of the operating system:
cat /proc/sys/fs/file-max
which on modern Linux systems is several 100,000 files. π
Use the -z flag to analyze large amounts of raster maps without hitting open files limit and the file option to avoid hitting the size limit of command line arguments. Note that the computation using the file option is slower than with the input option. For every single row in the output map(s) all input maps are opened and closed. The amount of RAM will rise linearly with the number of specified input maps. The input and file options are mutually exclusive: the former is a comma separated list of raster map names and the latter is a text file with a new line separated list of raster map names.
β οΈ fr fr:inputandfiledo not go together, pick one, she's not gonna let you have both π
π EXAMPLES π
Example with MODIS Land Surface Temperature, transforming values from Kelvin * 50 to degrees Celsius:
r.series.accumulate in=MOD11A1.Day,MOD11A1.Night,MYD11A1.Day,MYD11A1.Night out=MCD11A1.GDD \
scale=0.02 shift=-273.15 limits=10,30
ate. no crumbs. π
π«Ά SEE ALSO π«Ά
g.list, g.region, r.series, r.series.interp
Hints for large raster data processing
β REFERENCES β
- Jones, G.V., Duff, A.A., Hall, A., Myers, J.W., 2010. Spatial analysis of climate in winegrape growing regions in the Western United States. Am. J. Enol. Vitic. 61, 313-326.
π AUTHORS π
Markus Metz and Soeren Gebbert (based on r.series)
π SOURCE CODE π
Available at: r.series.accumulate source code (history)
Latest change: Thursday Feb 20 11:18:37 2025 in commit: de7a97a89a7da17c9720255612af482b3f42034a
Main index | Raster index | Topics index | Keywords index | Graphical index | Full index
Β© 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual
and that's the whole page bestie π go accumulate some degree days, you're doing amazing sweetie πΈ this was r.series.accumulate(1grass) from the GRASS 8.5.0 Reference Manual, last touched in that commit on Thursday Feb 20 11:18:37 2025 β mwah, slay, bye! π
β¨
π¦ 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