[GRASS-SVN] r46152 - grass/trunk/imagery/i.landsat.acca

svn_grass at osgeo.org svn_grass at osgeo.org
Sun May 1 15:57:21 EDT 2011


Author: neteler
Date: 2011-05-01 12:57:21 -0700 (Sun, 01 May 2011)
New Revision: 46152

Modified:
   grass/trunk/imagery/i.landsat.acca/algorithm.c
Log:
ejtizado: Corrected error from Irish_2006 (r45029); typo

Modified: grass/trunk/imagery/i.landsat.acca/algorithm.c
===================================================================
--- grass/trunk/imagery/i.landsat.acca/algorithm.c	2011-05-01 19:41:38 UTC (rev 46151)
+++ grass/trunk/imagery/i.landsat.acca/algorithm.c	2011-05-01 19:57:21 UTC (rev 46152)
@@ -134,8 +134,11 @@
     /* WARNING: re-use of the variable 'value' with new meaning */
 
     /* step 14 */
+
+    /* To correct Irish2006: idesert has to be bigger than 0.5 to start pass 2 processing (see Irish2000)
+       because then we have no desert condition (thanks to Matthias Eder, Germany) */
     if (cloud_signature ||
-	(idesert <= .5 && signa[COVER] > 0.004 && signa[KMEAN] < 295.)) {
+	(idesert > .5 && signa[COVER] > 0.004 && signa[KMEAN] < 295.)) {
 	G_message(_("Histogram cloud signature:"));
 
 	value[MEAN] = quantile(0.5, hist_cold) + K_BASE;
@@ -166,7 +169,12 @@
 	    shift *= value[DSTD];
 
 	    if ((value[KUPPER] + shift) > max) {
-		value[KLOWER] += (max - value[KUPPER]);
+                if ((value[KLOWER] + shift) > max) {
+                    value[KLOWER] += (max - value[KUPPER]);
+                }
+                else {
+                    value[KLOWER] += shift;
+                }
 		value[KUPPER] = max;
 	    }
 	    else {
@@ -177,7 +185,7 @@
 
 	G_message(_("Maximum temperature:"));
 	G_message(_("* Cold cloud: %.2lf K"), value[KUPPER]);
-	G_message(_("* Warn cloud: %.2lf K"), value[KLOWER]);
+	G_message(_("* Warm cloud: %.2lf K"), value[KLOWER]);
     }
     else {
 	if (signa[KMEAN] < 295.) {



More information about the grass-commit mailing list