[GRASS-SVN] r58713 - in grass/trunk: raster/r.series.accumulate raster/r.series.accumulate/test_suite temporal/t.rast.accumulate
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Jan 13 15:41:55 PST 2014
Author: huhabla
Date: 2014-01-13 15:41:55 -0800 (Mon, 13 Jan 2014)
New Revision: 58713
Added:
grass/trunk/raster/r.series.accumulate/test_suite/test_accu_0.ref
grass/trunk/raster/r.series.accumulate/test_suite/test_accu_7.ref
grass/trunk/raster/r.series.accumulate/test_suite/test_accu_8.ref
grass/trunk/raster/r.series.accumulate/test_suite/test_accu_9.ref
Modified:
grass/trunk/raster/r.series.accumulate/main.c
grass/trunk/raster/r.series.accumulate/r.series.accumulate.html
grass/trunk/raster/r.series.accumulate/test_suite/test.r.series.accumulate.sh
grass/trunk/raster/r.series.accumulate/test_suite/test_accu_1.ref
grass/trunk/raster/r.series.accumulate/test_suite/test_accu_2.ref
grass/trunk/raster/r.series.accumulate/test_suite/test_accu_3.ref
grass/trunk/raster/r.series.accumulate/test_suite/test_accu_4.ref
grass/trunk/raster/r.series.accumulate/test_suite/test_accu_6.ref
grass/trunk/temporal/t.rast.accumulate/t.rast.accumulate.html
grass/trunk/temporal/t.rast.accumulate/t.rast.accumulate.py
Log:
Merged changes from r.gdd into r.series.accumlate and t.rast.accumulate.
Modified: grass/trunk/raster/r.series.accumulate/main.c
===================================================================
--- grass/trunk/raster/r.series.accumulate/main.c 2014-01-13 23:06:54 UTC (rev 58712)
+++ grass/trunk/raster/r.series.accumulate/main.c 2014-01-13 23:41:55 UTC (rev 58713)
@@ -27,6 +27,8 @@
#define METHOD_GDD 1
#define METHOD_MEAN 2
#define METHOD_WINKLER 3
+#define METHOD_BEDD 4
+#define METHOD_HUGLIN 5
struct map_info
{
@@ -53,7 +55,7 @@
} parm;
struct
{
- struct Flag *nulls, *lazy, *float_output;
+ struct Flag *avg, *nulls, *lazy, *float_output;
} flag;
int i;
int num_inputs, max_inputs;
@@ -70,6 +72,7 @@
DCELL dcell_null;
RASTER_MAP_TYPE out_type;
int out_size;
+ char *desc = NULL;
G_gisinit(argv[0]);
@@ -77,16 +80,19 @@
G_add_keyword(_("raster"));
G_add_keyword(_("series"));
G_add_keyword(_("accumulation"));
- module->description = _("Calculates (accumulated) raster value means, growing degree days (GDDs) or Winkler indices from several input maps.");
-
+ module->description =
+ _("Makes each output cell value a accumulation"
+ "function of the values assigned to the corresponding cells "
+ "in the input raster map layers.");
+
parm.basemap = G_define_standard_option(G_OPT_R_INPUT);
parm.basemap->key = "basemap";
parm.basemap->description = _("Existing map to be added to output");
parm.basemap->required = NO;
-
+
parm.input = G_define_standard_option(G_OPT_R_INPUTS);
parm.input->required = NO;
-
+
parm.file = G_define_standard_option(G_OPT_F_INPUT);
parm.file->key = "file";
parm.file->description = _("Input file with raster map names, one per line");
@@ -112,12 +118,12 @@
parm.lower = G_define_standard_option(G_OPT_R_INPUT);
parm.lower->key = "lower";
parm.lower->required = NO;
- parm.lower->description = _("The raster map specifying the lower accumulation limit");
+ parm.lower->description = _("The raster map specifying the lower accumulation limit, also called baseline");
parm.upper = G_define_standard_option(G_OPT_R_INPUT);
parm.upper->key = "upper";
parm.upper->required = NO;
- parm.upper->description = _("The raster map specifying the upper accumulation limit");
+ parm.upper->description = _("The raster map specifying the upper accumulation limit, also called cutoff. Only applied to BEDD computation.");
parm.range = G_define_option();
parm.range->key = "range";
@@ -135,10 +141,23 @@
parm.method = G_define_option();
parm.method->key = "method";
parm.method->type = TYPE_STRING;
- parm.method->options = "mean,gdd,winkler";
- parm.method->answer = "mean";
- parm.method->description = _("This method will be applied to compute the accumulative values from the input maps");
+ parm.method->multiple = NO;
+ parm.method->required = NO;
+ parm.method->options = "gdd,bedd,huglin,mean";
+ parm.method->answer = "gdd";
+ parm.method->label = "This method will be applied to compute the accumulative values from the input maps";
+ G_asprintf(&desc,
+ "gdd;%s;mean;%s;bedd;%s;huglin;%s",
+ _("Growing Degree Days or Winkler indices: depending on the chosen average computation set with -a flag"),
+ _("Mean: either (min + max) / 2 or sum(input maps)/(number of input maps) set with -a flag"),
+ _("Biologically Effective Degree Days"),
+ _("Huglin Heliothermal index"));
+ parm.method->descriptions = desc;
+ flag.avg = G_define_flag();
+ flag.avg->key = 'a';
+ flag.avg->description = _("Use arithmetical mean instead of (min + max ) / 2");
+
flag.nulls = G_define_flag();
flag.nulls->key = 'n';
flag.nulls->description = _("Propagate NULLs");
@@ -157,15 +176,16 @@
lo = -1.0 / 0.0; /* -inf */
hi = 1.0 / 0.0; /* inf */
+ method = METHOD_GDD;
if (G_strncasecmp(parm.method->answer, "gdd", 3) == 0)
method = METHOD_GDD;
-
- if (G_strncasecmp(parm.method->answer, "mean", 4) == 0)
+ else if (G_strncasecmp(parm.method->answer, "mean", 4) == 0)
method = METHOD_MEAN;
-
- if (G_strncasecmp(parm.method->answer, "winkler", 7) == 0)
- method = METHOD_WINKLER;
-
+ else if (G_strncasecmp(parm.method->answer, "bedd", 4) == 0)
+ method = METHOD_BEDD;
+ else if (G_strncasecmp(parm.method->answer, "huglin", 7) == 0)
+ method = METHOD_HUGLIN;
+
if (parm.range->answer) {
lo = atof(parm.range->answers[0]);
hi = atof(parm.range->answers[1]);
@@ -336,7 +356,7 @@
G_fatal_error(_("'%s'=%f must be > '%s'=%f"), parm.upper->key, upper,
parm.lower->key, lower);
- min = dcell_null;
+ min = dcell_null;
max = dcell_null;
avg = 0;
@@ -351,19 +371,16 @@
null = 1;
}
else {
- if (method == METHOD_MEAN || method == METHOD_WINKLER)
- avg += v;
- else if (method == METHOD_GDD) {
- if (min > v || Rast_is_d_null_value(&min))
- min = v;
- if (max < v || Rast_is_d_null_value(&max))
- max = v;
- }
+ avg += v;
+ if (min > v || Rast_is_d_null_value(&min))
+ min = v;
+ if (max < v || Rast_is_d_null_value(&max))
+ max = v;
non_null++;
}
}
}
-
+
if (!non_null || (null && flag.nulls->answer)) {
if (basemap)
value = basemap->buf[col];
@@ -371,51 +388,34 @@
value = dcell_null;
}
else {
+ /* Compute mean or average */
+ if (flag.avg->answer) {
+ avg /= non_null;
+ }
+ else {
+ avg = (min + max) / 2.;
+ }
switch(method) {
- case METHOD_WINKLER:
-
- avg /= non_null;
-
- if (avg < lower)
- avg = lower;
- else if (avg > upper)
+ case METHOD_HUGLIN:
+ avg = (avg + max) / 2;
+ break;
+ case METHOD_BEDD:
+ if(avg > upper)
avg = upper;
-
- value = avg - lower;
-
- if (value < 0.)
- value = 0.;
-
break;
- case METHOD_GDD:
-
- if (min < lower)
- min = lower;
- else if (min > upper)
- min = upper;
- if (max < lower)
- max = lower;
- else if (max > upper)
- max = upper;
-
- value = (min + max) / 2. - lower;
-
- if (value < 0.)
- value = 0.;
-
+ case METHOD_MEAN:
+ value = avg;
break;
default:
-
- avg /= non_null;
-
- if (avg < lower)
- avg = 0.0;
- else if (avg > upper)
- avg = upper;
-
- value = avg;
+ /* Winkler or GDD index computation is the default */
+ break;
}
-
+ if(method != METHOD_MEAN)
+ value = avg - lower;
+
+ if (value < 0.)
+ value = 0.;
+
if (basemap)
value += basemap->buf[col];
}
Modified: grass/trunk/raster/r.series.accumulate/r.series.accumulate.html
===================================================================
--- grass/trunk/raster/r.series.accumulate/r.series.accumulate.html 2014-01-13 23:06:54 UTC (rev 58712)
+++ grass/trunk/raster/r.series.accumulate/r.series.accumulate.html 2014-01-13 23:41:55 UTC (rev 58713)
@@ -1,21 +1,50 @@
<h2>DESCRIPTION</h2>
-<em>r.series.accumulate</em> calculates (accumulated) raster value means, growing degree days (GDDs) or
-Winkler indices's from several input maps.
+<em>r.series.accumulate</em> 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.
<p>
-The formula for calculating the raster value means
+The flag <b>-a</b> determines the average computation of the input raster maps.
+In case the flag is not set, the average calculation is:
<div class="code"><pre>
- value = average
+ average = (min + max) / 2
</pre></div>
-The formula for calculating GDDs is
+In case the flag was set, the calculation changes to arithmetic mean
<div class="code"><pre>
- value = (max + min) / 2 - lower
+ average = sum(input maps) / (number of input maps)
</pre></div>
-The formula for calculating the Winkler index is
+<p>
+<b>GDD</b> Growing Degree Days are calculated as
<div class="code"><pre>
- value = average - lower
+ gdd = average - lower
</pre></div>
-with <em>min</em> being the minimum value, <em>max</em>
+<p>
+In case the <b>-a</b> is set, the Winkler indices are calculated instead of GDD,
+usually accumulated for the period April 1<sup>st</sup> to October
+31<sup>st</sup> (northern hemisphere) or the period October
+1<sup>st</sup> to April 30<sup>th</sup>
+(southern hemisphere).
+<p>
+<b>BEDDs</b> Biologically Effective Degree Days are calculated as
+<div class="code"><pre>
+ bedd = average - lower
+</pre></div>
+with an optional upper <em>cutoff</em> applied to the average instead of
+the temperature values.
+<p>
+The <b>Huglin heliothermal index</b> is calculated as
+<div class="code"><pre>
+ huglin = (average + max) / 2 - lower
+</pre></div>
+usually accumulated for the period April 1<sup>st</sup> to September
+30<sup>th</sup> (northern hemisphere) or the period September
+1<sup>st</sup> to April 30<sup>th</sup> (southern hemisphere).
+<p>
+<b>Mean</b> raster values are calculated as
+<div class="code"><pre>
+ mean = average
+</pre></div>
+<p>
+For all formulas is <em>min</em> the minimum value, <em>max</em>
the maximum value and <em>average</em> the average value.
The <em>min</em>, <em>max</em> and <em>average</em> values
are automatically calculated from the input maps.
@@ -25,14 +54,9 @@
options are applied to constrain the accumulation. In case the <em>lower</em> and <em>upper</em>
maps are not provided the <em>limits</em> option with default values will be applied.
<p>
-Any <em>min</em>, <em>max</em> and <em>average</em> values
-above the <em>upper</em> values are set to <em>upper</em>, and any
-<em>min</em>, <em>max</em> and <em>average</em> values below the
-<em>lower</em> values are set to <em>lower</em>, or in case of <em>mean</em>
-computation to 0 (zero). Negative results are set to 0 (zero).
-<p>
+
If an existing map is provided with the <em>basemap</em> option, the
-values of this map are added to the output, thus accumulating means, GDDs or winkler indices's.
+values of this map are added to the output.
<h2>NOTES</h2>
@@ -46,6 +70,8 @@
corresponding input cells are NULL is automatically set to NULL
(NULL propagation) and the accumulated value is not calculated.
<p>
+Negative results are set to 0 (zero).
+<p>
Without the <em>-n</em> flag, all non-NULL cells are used for calculation.
<p>
If the <em>range=</em> option is given, any values which fall outside
Modified: grass/trunk/raster/r.series.accumulate/test_suite/test.r.series.accumulate.sh
===================================================================
--- grass/trunk/raster/r.series.accumulate/test_suite/test.r.series.accumulate.sh 2014-01-13 23:06:54 UTC (rev 58712)
+++ grass/trunk/raster/r.series.accumulate/test_suite/test.r.series.accumulate.sh 2014-01-13 23:41:55 UTC (rev 58713)
@@ -16,27 +16,43 @@
r.mapcalc expr="map_b = rand(1, 14)"
r.mapcalc expr="map_c = rand(2, 13)"
+# BEDD with lower limit map and upper limit value
+r.series.accumulate basemap=basemap input=map_a lower=lower limits=5,10 \
+ output=test_accu_0 method=bedd -f --verbose
+# GDD with lower limit map
r.series.accumulate basemap=basemap input=map_a lower=lower \
- output=test_accu_1 upper=upper method=gdd -f --verbose
-
+ output=test_accu_1 method=gdd -f --verbose
+# Winkler with lower limit map
r.series.accumulate basemap=basemap input=map_a lower=lower \
- output=test_accu_2 upper=upper method=winkler -f --verbose
-
-r.series.accumulate basemap=basemap input=map_a lower=lower \
- output=test_accu_3 upper=upper method=mean --verbose
-
+ output=test_accu_2 method=gdd -a -f --verbose
+# Mean
+r.series.accumulate basemap=basemap input=map_a \
+ output=test_accu_3 method=mean --verbose
+# Average
+r.series.accumulate basemap=basemap input=map_a \
+ output=test_accu_3 method=mean -a --verbose
+# GDD with lower limit value
r.series.accumulate basemap=basemap input=map_a,map_b,map_c limits=5,10 \
output=test_accu_4 method=gdd -f --verbose
-
+# Winkler with multiple maps, lower limit value
+r.series.accumulate basemap=basemap input=map_a,map_b,map_c limits=5,10 \
+ output=test_accu_5 method=bedd -a -f --verbose
+# BEDD with multiple maps, lower limit map and upper limit value
r.series.accumulate basemap=basemap input=map_a,map_b,map_c lower=lower limits=5,10 \
- output=test_accu_5 method=winkler -f --verbose
+ output=test_accu_6 method=bedd -f --verbose
+# BEDD with multiple maps, lower limit map and upper limit map
+r.series.accumulate basemap=basemap input=map_a,map_b,map_c lower=lower upper=upper \
+ output=test_accu_7 method=bedd -f --verbose
+# Mean with range multiple maps
+r.series.accumulate basemap=basemap input=map_a,map_b,map_c \
+ output=test_accu_8 range=6,9 method=mean --verbose
+# Mean with range
+r.series.accumulate basemap=basemap input=map_a, \
+ output=test_accu_9 range=6,9 method=mean --verbose
-r.series.accumulate basemap=basemap input=map_a,map_b,map_c lower=lower limits=5,10 \
- output=test_accu_6 range=6,9 method=mean --verbose
-
# Test for correct results
for map in `g.mlist type=rast pattern=test_accu_*` ; do
- r.out.ascii input=${map} output=${map}.txt dp=2
+ r.out.ascii input=${map} output=${map}.ref dp=2
done
for i in `ls test_accu_*.txt` ; do
Added: grass/trunk/raster/r.series.accumulate/test_suite/test_accu_0.ref
===================================================================
--- grass/trunk/raster/r.series.accumulate/test_suite/test_accu_0.ref (rev 0)
+++ grass/trunk/raster/r.series.accumulate/test_suite/test_accu_0.ref 2014-01-13 23:41:55 UTC (rev 58713)
@@ -0,0 +1,14 @@
+north: 80
+south: 0
+east: 120
+west: 0
+rows: 8
+cols: 12
+10 10 15 12 10 12 15 12 15 10 15 10
+13 15 11 14 10 12 14 12 15 15 14 15
+* * * * * * * * * * * *
+15 12 15 15 10 13 15 14 13 10 15 13
+14 15 11 13 15 10 15 10 10 15 11 15
+15 15 10 15 13 13 14 10 10 10 10 10
+14 14 10 10 15 10 10 11 10 10 12 14
+11 10 13 10 15 11 15 15 14 15 11 10
Modified: grass/trunk/raster/r.series.accumulate/test_suite/test_accu_1.ref
===================================================================
--- grass/trunk/raster/r.series.accumulate/test_suite/test_accu_1.ref 2014-01-13 23:06:54 UTC (rev 58712)
+++ grass/trunk/raster/r.series.accumulate/test_suite/test_accu_1.ref 2014-01-13 23:41:55 UTC (rev 58713)
@@ -4,11 +4,11 @@
west: 0
rows: 8
cols: 12
-10 10 15 12 10 12 15 12 15 10 15 10
-13 15 11 14 10 12 14 12 15 15 14 15
+10 10 15 12 10 12 18 12 19 10 16 10
+13 19 11 14 10 12 14 12 16 19 14 18
* * * * * * * * * * * *
-15 12 15 15 10 13 15 14 13 10 15 13
-14 15 11 13 15 10 15 10 10 15 11 15
-15 15 10 15 13 13 14 10 10 10 10 10
-14 14 10 10 15 10 10 11 10 10 12 14
-11 10 13 10 15 11 15 15 14 15 11 10
+19 12 16 15 10 13 15 14 13 10 18 13
+14 19 11 13 18 10 18 10 10 17 11 16
+16 16 10 17 13 13 14 10 10 10 10 10
+14 14 10 10 18 10 10 11 10 10 12 14
+11 10 13 10 18 11 18 18 14 17 11 10
Modified: grass/trunk/raster/r.series.accumulate/test_suite/test_accu_2.ref
===================================================================
--- grass/trunk/raster/r.series.accumulate/test_suite/test_accu_2.ref 2014-01-13 23:06:54 UTC (rev 58712)
+++ grass/trunk/raster/r.series.accumulate/test_suite/test_accu_2.ref 2014-01-13 23:41:55 UTC (rev 58713)
@@ -4,11 +4,11 @@
west: 0
rows: 8
cols: 12
-10 10 15 12 10 12 15 12 15 10 15 10
-13 15 11 14 10 12 14 12 15 15 14 15
+10 10 15 12 10 12 18 12 19 10 16 10
+13 19 11 14 10 12 14 12 16 19 14 18
* * * * * * * * * * * *
-15 12 15 15 10 13 15 14 13 10 15 13
-14 15 11 13 15 10 15 10 10 15 11 15
-15 15 10 15 13 13 14 10 10 10 10 10
-14 14 10 10 15 10 10 11 10 10 12 14
-11 10 13 10 15 11 15 15 14 15 11 10
+19 12 16 15 10 13 15 14 13 10 18 13
+14 19 11 13 18 10 18 10 10 17 11 16
+16 16 10 17 13 13 14 10 10 10 10 10
+14 14 10 10 18 10 10 11 10 10 12 14
+11 10 13 10 18 11 18 18 14 17 11 10
Modified: grass/trunk/raster/r.series.accumulate/test_suite/test_accu_3.ref
===================================================================
--- grass/trunk/raster/r.series.accumulate/test_suite/test_accu_3.ref 2014-01-13 23:06:54 UTC (rev 58712)
+++ grass/trunk/raster/r.series.accumulate/test_suite/test_accu_3.ref 2014-01-13 23:41:55 UTC (rev 58713)
@@ -4,11 +4,11 @@
west: 0
rows: 8
cols: 12
-10 10 20 17 10 17 20 17 20 10 20 10
-18 20 16 19 10 17 19 17 20 20 19 20
+10 12 20 17 12 17 23 17 24 13 21 12
+18 24 16 19 10 17 19 17 21 24 19 23
* * * * * * * * * * * *
-20 17 20 20 10 18 20 19 18 10 20 18
-19 20 16 18 20 10 20 15 10 20 16 20
-20 20 10 20 18 18 19 10 15 10 15 10
-19 19 10 10 20 10 10 16 10 15 17 19
-16 10 18 15 20 16 20 20 19 20 16 10
+24 17 21 20 13 18 20 19 18 14 23 18
+19 24 16 18 23 12 23 15 11 22 16 21
+21 21 14 22 18 18 19 11 15 10 15 11
+19 19 11 14 23 14 13 16 14 15 17 19
+16 10 18 15 23 16 23 23 19 22 16 13
Modified: grass/trunk/raster/r.series.accumulate/test_suite/test_accu_4.ref
===================================================================
--- grass/trunk/raster/r.series.accumulate/test_suite/test_accu_4.ref 2014-01-13 23:06:54 UTC (rev 58712)
+++ grass/trunk/raster/r.series.accumulate/test_suite/test_accu_4.ref 2014-01-13 23:41:55 UTC (rev 58713)
@@ -4,11 +4,11 @@
west: 0
rows: 8
cols: 12
-10 12.5 12.5 11 10 11 14.5 11 12.5 12.5 12.5 12.5
-12.5 12.5 13 14 11 13.5 12.5 11 12.5 14 14.5 14
+10 11.5 11 10 10 10 16 10 13 12 11.5 12
+13 13.5 13 14.5 10 13.5 11 10.5 11.5 16 15 15.5
* * * * * * * * * * * *
-12.5 13 13.5 12.5 12.5 14 12.5 12 13 11.5 13 11.5
-12.5 12.5 10.5 12.5 14.5 10 15 12.5 11 14 11 14.5
-12.5 13 12 12.5 13 14 12.5 12.5 12.5 12 11.5 12.5
-12 12.5 12.5 10 14 10 11 10.5 12.5 12.5 12.5 12
-12.5 12 11.5 12.5 12.5 12.5 12.5 13 12.5 12.5 13 10.5
+13.5 13 14.5 11 11.5 15 11 12 13.5 11 14.5 10
+11.5 13 10 13 16 10 17 13.5 10 15 10 15
+11 13.5 11.5 12.5 13.5 14.5 13.5 11 13.5 10 11.5 11
+10.5 12.5 11.5 10 15.5 10 10 10.5 12.5 13.5 12 11.5
+12.5 10 10 14 13.5 12.5 12 14.5 12 12.5 13.5 10
Modified: grass/trunk/raster/r.series.accumulate/test_suite/test_accu_6.ref
===================================================================
--- grass/trunk/raster/r.series.accumulate/test_suite/test_accu_6.ref 2014-01-13 23:06:54 UTC (rev 58712)
+++ grass/trunk/raster/r.series.accumulate/test_suite/test_accu_6.ref 2014-01-13 23:41:55 UTC (rev 58713)
@@ -4,11 +4,11 @@
west: 0
rows: 8
cols: 12
-10 10 10 17 10 16.5 19 16.5 10 10 17 10
-18 10 17 18.5 17 17 19 17 10 18.5 19 18
+10 11.5 11 10 10 10 15 10 13 12 11.5 12
+13 13.5 13 14.5 10 13.5 11 10.5 11.5 15 15 15
* * * * * * * * * * * *
-10 16.5 17 19 17 18 10 18.5 17 18 16 18
-19 16 16 18 19 10 10 19 16.5 18 16.5 19
-16 17.5 19 17 17 18 19 10 16 19 17.5 10
-19 17.33 18 10 18 10 17 16 10 10 17 19
-18 19 18 16 16 17.67 10 16.5 19 17 16.5 16
+13.5 13 14.5 11 11.5 15 11 12 13.5 11 14.5 10
+11.5 13 10 13 15 10 15 13.5 10 15 10 15
+11 13.5 11.5 12.5 13.5 14.5 13.5 11 13.5 10 11.5 11
+10.5 12.5 11.5 10 15 10 10 10.5 12.5 13.5 12 11.5
+12.5 10 10 14 13.5 12.5 12 14.5 12 12.5 13.5 10
Added: grass/trunk/raster/r.series.accumulate/test_suite/test_accu_7.ref
===================================================================
--- grass/trunk/raster/r.series.accumulate/test_suite/test_accu_7.ref (rev 0)
+++ grass/trunk/raster/r.series.accumulate/test_suite/test_accu_7.ref 2014-01-13 23:41:55 UTC (rev 58713)
@@ -0,0 +1,14 @@
+north: 80
+south: 0
+east: 120
+west: 0
+rows: 8
+cols: 12
+10 11.5 11 10 10 10 15 10 13 12 11.5 12
+13 13.5 13 14.5 10 13.5 11 10.5 11.5 15 15 15
+* * * * * * * * * * * *
+13.5 13 14.5 11 11.5 15 11 12 13.5 11 14.5 10
+11.5 13 10 13 15 10 15 13.5 10 15 10 15
+11 13.5 11.5 12.5 13.5 14.5 13.5 11 13.5 10 11.5 11
+10.5 12.5 11.5 10 15 10 10 10.5 12.5 13.5 12 11.5
+12.5 10 10 14 13.5 12.5 12 14.5 12 12.5 13.5 10
Added: grass/trunk/raster/r.series.accumulate/test_suite/test_accu_8.ref
===================================================================
--- grass/trunk/raster/r.series.accumulate/test_suite/test_accu_8.ref (rev 0)
+++ grass/trunk/raster/r.series.accumulate/test_suite/test_accu_8.ref 2014-01-13 23:41:55 UTC (rev 58713)
@@ -0,0 +1,14 @@
+north: 80
+south: 0
+east: 120
+west: 0
+rows: 8
+cols: 12
+10 10 10 17 10 16.5 19 16.5 10 10 17 10
+18 10 17 18.5 17 17 19 17 10 18.5 19 18
+* * * * * * * * * * * *
+10 16.5 17 19 17 18 10 18.5 17 18 16 18
+19 16 16 18 19 10 10 19 16.5 18 16.5 19
+16 17.5 19 17 17 18 19 10 16 19 17.5 10
+19 17.5 18 10 18 10 17 16 10 10 17 19
+17.5 19 18 16 16 17.5 10 16.5 19 17 16.5 16
Added: grass/trunk/raster/r.series.accumulate/test_suite/test_accu_9.ref
===================================================================
--- grass/trunk/raster/r.series.accumulate/test_suite/test_accu_9.ref (rev 0)
+++ grass/trunk/raster/r.series.accumulate/test_suite/test_accu_9.ref 2014-01-13 23:41:55 UTC (rev 58713)
@@ -0,0 +1,14 @@
+north: 80
+south: 0
+east: 120
+west: 0
+rows: 8
+cols: 12
+10 10 10 17 10 17 10 17 10 10 10 10
+18 10 16 19 10 17 19 17 10 10 19 10
+* * * * * * * * * * * *
+10 17 10 10 10 18 10 19 18 10 10 18
+19 10 16 18 10 10 10 10 10 10 16 10
+10 10 10 10 18 18 19 10 10 10 10 10
+19 19 10 10 10 10 10 16 10 10 17 19
+16 10 18 10 10 16 10 10 19 10 16 10
Modified: grass/trunk/temporal/t.rast.accumulate/t.rast.accumulate.html
===================================================================
--- grass/trunk/temporal/t.rast.accumulate/t.rast.accumulate.html 2014-01-13 23:06:54 UTC (rev 58712)
+++ grass/trunk/temporal/t.rast.accumulate/t.rast.accumulate.html 2014-01-13 23:41:55 UTC (rev 58713)
@@ -25,6 +25,8 @@
maps are detected that have a temporal contain relation.
If no maps are found or lower/upper STRDS are not defined, then the <b>limits</b> option is used, eg. <b>limits=10,30</b>.
<p>
+The <b>upper</b> <b>limit</b> is only used in the Biologically Effective Degree Days calculation.
+<p>
The options <b>shift</b>, <b>scale</b> and <b>method</b> are passed to
<a href="r.series.accumulate.html">r.series.accumulate</a>.
Please refer to the manual page of <a href="r.series.accumulate.html">r.series.accumulate</a>
@@ -71,13 +73,14 @@
#
# available here: http://extension.unh.edu/agric/gddays/docs/growch.pdf
-# Now we compute the GDD from 1990 - 2000 for each year (12 month cycle) with
+# Now we compute the Biologically Effective Degree Days
+# from 1990 - 2000 for each year (12 month cycle) with
# a granularity of one day. Base temperature is 10°C, upper limit is 30°C.
# Hence the accumulation starts at 10°C and does not accumulate values above 30°C.
t.rast.accumulate input="temperature_mean_1990_2000_daily_celsius" \
output="temperature_mean_1990_2000_daily_celsius_accumulated_10_30" \
limits="10,30" start="1990-01-01" stop="2000-01-01" cycle="12 months" \
- base="temp_acc_daily_10_30" method="gdd"
+ base="temp_acc_daily_10_30" method="bedd"
#############################################################################
#### ACCUMULATION PATTERN DETECTION #########################################
Modified: grass/trunk/temporal/t.rast.accumulate/t.rast.accumulate.py
===================================================================
--- grass/trunk/temporal/t.rast.accumulate/t.rast.accumulate.py 2014-01-13 23:06:54 UTC (rev 58712)
+++ grass/trunk/temporal/t.rast.accumulate/t.rast.accumulate.py 2014-01-13 23:41:55 UTC (rev 58713)
@@ -112,7 +112,7 @@
#% key: method
#% type: string
#% description: This method will be applied to compute the accumulative values from the input maps
-#% options: mean,gdd,winkler
+#% options: mean,gdd,bedd,huglin
#% answer: mean
#% required: no
#% multiple: no
More information about the grass-commit
mailing list