r.series.accumulate.1grass man page
r.series.accumulate — Makes each output cell value a accumulationfunction of the values assigned to the corresponding cells in the input raster map layers.
raster, series, accumulation
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]
Do not keep files open
Create a FCELL map (floating point single precision) as output
Allow output files to overwrite existing files
Print usage summary
Verbose module output
Quiet module output
Force launching GUI dialog
Existing map to be added to output
Name of input raster map(s)
Input file with raster map names, one per line
- output=name [required]
Name for output raster map
Scale factor for input
Shift factor for input
The raster map specifying the lower accumulation limit, also called baseline
The raster map specifying the upper accumulation limit, also called cutoff. Only applied to BEDD computation.
Ignore values outside this range
Use these limits in case lower and/or upper input maps are not defined
This method will be applied to compute the accumulative values from the input maps
Options: gdd, bedd, huglin, mean
gdd: Growing Degree Days or Winkler indices
bedd: Biologically Effective Degree Days
huglin: Huglin Heliothermal index
mean: Mean: sum(input maps)/(number of input maps)
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.
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 formulas is min 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.
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.
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 number of input raster maps to be processed is given by the limit of the operating system. For example, both the hard and soft limits are typically 1024. The soft limit can be changed with e.g. ulimit -n 1500 (UNIX-based operating systems) but not higher than the hard limit. If it is too low, you can as superuser add an entry in
/etc/security/limits.conf # <domain> <type> <item> <value> your_username hard nofile 1500
This would raise the hard limit to 1500 file. Be warned that more files open need more RAM. See also the Wiki page Hints for large raster data processing.
Use the file option to analyze large amount of raster maps without hitting open files limit and the size limit of command line arguments. The computation is slower than the input option method. For every sinlge row in the output map(s) all input maps are opened and closed. The amount of RAM will rise linear with the number of specified input maps. The input and file options are mutually exclusive. Input is a text file with a new line separated list of raster map names and optional weights. As separator between the map name and the weight the character "|" must be used.
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
g.list, g.region, r.series, r.series.interp
Hints for large raster data processing
- 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.
Markus Metz and Soeren Gebbert (based on r.series)
Last changed: $Date: 2014-10-08 21:55:23 +0200 (Wed, 08 Oct 2014) $
Available at: r.series.accumulate source code (history)
Main index | Raster index | Topics index | Keywords index | Graphical index | Full index
© 2003-2017 GRASS Development Team, GRASS GIS 7.2.1 Reference Manual