Debian Codegraph @

raster/r.series.accumulate/r.series.accumulate.html

raw
1 <h2>DESCRIPTION</h2>
2
3 <em>r.series.accumulate</em> calculates (accumulated) raster value
4 using growing degree days (GDDs)/Winkler indices's, Biologically
5 Effective Degree Days (BEDD), Huglin heliothermal indices or an average
6 approach from several input maps for a given day. Accumulation of e.g.
7 degree-days to growing degree days (GDDs) can be done by providing a
8 <em>basemap</em> with GDDs of the previous day.
9 <p>
10 The flag <b>-a</b> determines the average computation of the input raster maps.
11 In case the flag is not set, the average calculation is:
12 <div class="code"><pre>
13 average = (min + max) / 2
14 </pre></div>
15 In case the flag was set, the calculation changes to arithmetic mean
16 <div class="code"><pre>
17 average = sum(input maps) / (number of input maps)
18 </pre></div>
19 <p>
20 <b>GDD</b> Growing Degree Days are calculated as
21 <div class="code"><pre>
22 gdd = average - lower
23 </pre></div>
24 <p>
25 In case the <b>-a</b> is set, the Winkler indices are calculated instead
26 of GDD, usually accumulated for the period April 1<sup>st</sup> to October
27 31<sup>st</sup> (northern hemisphere) or the period October
28 1<sup>st</sup> to April 30<sup>th</sup>
29 (southern hemisphere).
30 <p>
31 <b>BEDDs</b> Biologically Effective Degree Days are calculated as
32 <div class="code"><pre>
33 bedd = average - lower
34 </pre></div>
35 with an optional upper <em>cutoff</em> applied to the average instead of
36 the temperature values.
37 <p>
38 The <b>Huglin heliothermal index</b> is calculated as
39 <div class="code"><pre>
40 huglin = (average + max) / 2 - lower
41 </pre></div>
42 usually accumulated for the period April 1<sup>st</sup> to September
43 30<sup>th</sup> (northern hemisphere) or the period September
44 1<sup>st</sup> to April 30<sup>th</sup> (southern hemisphere).
45 <p>
46 <b>Mean</b> raster values are calculated as
47 <div class="code"><pre>
48 mean = average
49 </pre></div>
50 <p>
51 For all the formulas <em>min</em> is the minimum value, <em>max</em>
52 the maximum value and <em>average</em> the average value.
53 The <em>min</em>, <em>max</em> and <em>average</em> values
54 are automatically calculated from the input maps.
55 <p>
56 The <em>shift</em> and <em>scale</em> values are applied directly to
57 the input values. The <em>lower</em> and <em>upper</em> maps, as well
58 as the <em>range</em> options are applied to constrain the
59 accumulation. In case the <em>lower</em> and <em>upper</em> maps are
60 not provided the <em>limits</em> option with default values will be
61 applied.
62 <p>
63 If an existing map is provided with the <em>basemap</em> option, the
64 values of this map are added to the output.
65
66 <h2>NOTES</h2>
67
68 The <em>scale</em> and <em>shift</em> parameters are used to transform
69 input values with
70 <div class="code"><pre>
71 new = old * scale + shift
72 </pre></div>
73 <p>
74 With the <em>-n</em> flag, any cell for which any of the
75 corresponding input cells are NULL is automatically set to NULL
76 (NULL propagation) and the accumulated value is not calculated.
77 <p>
78 Negative results are set to 0 (zero).
79 <p>
80 Without the <em>-n</em> flag, all non-NULL cells are used for calculation.
81 <p>
82 If the <em>range=</em> option is given, any values which fall outside
83 that range will be treated as if they were NULL. Note that the range is
84 applied to the scaled and shifted input data. The <em>range</em>
85 parameter can be set to <em>low,high</em> thresholds:
86 values outside of this range are treated as NULL (i.e., they will be
87 ignored by most aggregates, or will cause the result to be NULL if -n
88 is given). The <em>low,high</em> thresholds are floating point, so use
89 <em>-inf</em> or <em>inf</em> for a single threshold (e.g.,
90 <em>range=0,inf</em> to ignore negative values, or
91 <em>range=-inf,-200.4</em> to ignore values above -200.4).
92 <p>
93 The maximum number of raster maps that can be processed is given by the
94 user-specific limit of the operating system. For example, the soft limits
95 for users are typically 1024 files. The soft limit can be changed with e.g.
96 <code>ulimit -n 4096</code> (UNIX-based operating systems) but it cannot be
97 higher than the hard limit. If the latter is too low, you can as superuser
98 add an entry in:
99
100 <div class="code"><pre>
101 /etc/security/limits.conf
102 # &lt;domain&gt; &lt;type&gt; &lt;item&gt; &lt;value&gt;
103 your_username hard nofile 4096
104 </pre></div>
105
106 This will raise the hard limit to 4096 files. Also have a look at the
107 overall limit of the operating system
108 <div class="code"><pre>
109 cat /proc/sys/fs/file-max
110 </pre></div>
111 which on modern Linux systems is several 100,000 files.
112
113 <p>
114 Use the <b>-z</b> flag to analyze large amounts of raster maps without
115 hitting open files limit and the <em>file</em> option to avoid hitting
116 the size limit of command line arguments.
117 Note that the computation using the <em>file</em> option is slower
118 than with the <em>input</em> option.
119 For every single row in the output map(s) all input maps are
120 opened and closed. The amount of RAM will rise linearly with the number
121 of specified input maps. The <em>input</em> and <em>file</em> options are
122 mutually exclusive: the former is a comma separated list of raster map
123 names and the latter is a text file with a new line separated list of
124 raster map names.
125
126 <h2>EXAMPLES</h2>
127
128 Example with MODIS Land Surface Temperature, transforming values from
129 Kelvin * 50 to degrees Celsius:
130 <div class="code"><pre>
131 r.series.accumulate in=MOD11A1.Day,MOD11A1.Night,MYD11A1.Day,MYD11A1.Night out=MCD11A1.GDD \
132 scale=0.02 shift=-273.15 limits=10,30
133 </pre></div>
134
135 <h2>SEE ALSO</h2>
136
137 <em>
138 <a href="g.list.html">g.list</a>,
139 <a href="g.region.html">g.region</a>,
140 <a href="r.series.html">r.series</a>,
141 <a href="r.series.interp.html">r.series.interp</a>
142 </em>
143 <p>
144 <a href="https://grasswiki.osgeo.org/wiki/Large_raster_data_processing">Hints for large raster data processing</a>
145
146 <h2>REFERENCES</h2>
147
148 <ul>
149 <li> Jones, G.V., Duff, A.A., Hall, A., Myers, J.W., 2010.
150 Spatial analysis of climate in winegrape growing regions in the
151 Western United States. Am. J. Enol. Vitic. 61, 313-326.</li>
152 </ul>
153
154 <h2>AUTHORS</h2>
155
156 Markus Metz and Soeren Gebbert (based on r.series)