[GRASS-SVN] r61252 - grass-addons/grass7/raster/r.gdd
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Jul 14 01:25:01 PDT 2014
Author: mmetz
Date: 2014-07-14 01:25:01 -0700 (Mon, 14 Jul 2014)
New Revision: 61252
Modified:
grass-addons/grass7/raster/r.gdd/main.c
grass-addons/grass7/raster/r.gdd/r.gdd.html
Log:
r.gdd: fix gdd and related
Modified: grass-addons/grass7/raster/r.gdd/main.c
===================================================================
--- grass-addons/grass7/raster/r.gdd/main.c 2014-07-14 08:24:31 UTC (rev 61251)
+++ grass-addons/grass7/raster/r.gdd/main.c 2014-07-14 08:25:01 UTC (rev 61252)
@@ -51,7 +51,7 @@
} parm;
struct
{
- struct Flag *nulls, *lazy, *avg;
+ struct Flag *nulls, *lazy;
} flag;
char *desc = NULL;
int idx, i;
@@ -141,10 +141,6 @@
parm.range->key_desc = "lo,hi";
parm.range->description = _("Ignore values outside this range");
- flag.avg = G_define_flag();
- flag.avg->key = 'a';
- flag.avg->description = _("Use average instead of (min + max) / 2");
-
flag.nulls = G_define_flag();
flag.nulls->key = 'n';
flag.nulls->description = _("Propagate NULLs");
@@ -334,8 +330,6 @@
null = 1;
}
else {
- if (idx != IDX_BEDD && v > cutoff)
- v = cutoff;
avg += v;
if (Rast_is_f_null_value(&min) || min > v)
min = v;
@@ -354,12 +348,7 @@
}
else {
- if (flag.avg->answer) {
- avg /= non_null;
- }
- else {
- avg = (min + max) / 2.;
- }
+ avg /= non_null;
if (idx == IDX_HUGLIN)
avg = (avg + max) / 2.;
Modified: grass-addons/grass7/raster/r.gdd/r.gdd.html
===================================================================
--- grass-addons/grass7/raster/r.gdd/r.gdd.html 2014-07-14 08:24:31 UTC (rev 61251)
+++ grass-addons/grass7/raster/r.gdd/r.gdd.html 2014-07-14 08:25:01 UTC (rev 61252)
@@ -21,10 +21,11 @@
<p>
<b>BEDDs</b> are calculated as
<div class="code"><pre>
- wi = average - baseline
+ bedd = average - baseline
</pre></div>
-with an optional upper <em>cutoff</em> applied to the average instead of
-the temperature values.
+with an optional upper <em>cutoff</em> applied to the average. Vine
+development kinetics for example reach a plateau at an average daily
+temperature of 19°C.
<p>
The <b>Huglin heliothermal index</b> is calculated as
<div class="code"><pre>
@@ -34,15 +35,9 @@
30<sup>th</sup> (northern hemisphere) or the period September
1<sup>st</sup> to April 30<sup>th</sup> (southern hemisphere).
<p>
-With the <em>-a</em> flag, the average is calculated as the average of
-all available temperature values, otherwiese the average is calculated as
-<i>(min + max) / 2</i>.
-The <em>min</em>, <em>max</em> and <em>average</em> values
-are automatically calculated from the input temperature maps.
-<p>
-Any temperature values (for BEDD, any averages) above the <em>cutoff</em>
-value are set to <em>cutoff</em>, and any <em>average</em> values below
-the <em>baseline</em> value are set to <em>baseline</em>. Negative results
+Any averages above the <em>cutoff</em> value are set to
+<em>cutoff</em>, and any <em>average</em> values below the
+<em>baseline</em> value are set to <em>baseline</em>. Negative results
are set to 0 (zero).
<p>
The <em>shift</em> and <em>scale</em> values are applied directly to the
More information about the grass-commit
mailing list