[GRASS-SVN] r31793 - grass-addons/gipe/i.eb.deltat

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Jun 21 22:10:55 EDT 2008


Author: ychemin
Date: 2008-06-21 22:10:55 -0400 (Sat, 21 Jun 2008)
New Revision: 31793

Modified:
   grass-addons/gipe/i.eb.deltat/delta_t.c
   grass-addons/gipe/i.eb.deltat/main.c
Log:
debug + nullvalues out

Modified: grass-addons/gipe/i.eb.deltat/delta_t.c
===================================================================
--- grass-addons/gipe/i.eb.deltat/delta_t.c	2008-06-21 23:12:30 UTC (rev 31792)
+++ grass-addons/gipe/i.eb.deltat/delta_t.c	2008-06-22 02:10:55 UTC (rev 31793)
@@ -1,6 +1,5 @@
 #include<stdio.h>
 #include<stdlib.h>
-#include<math.h>
 
 // Difference of temperature between surface skin and about 2m
 // Initialization parameter of sensible heat flux iteration in SEBAL

Modified: grass-addons/gipe/i.eb.deltat/main.c
===================================================================
--- grass-addons/gipe/i.eb.deltat/main.c	2008-06-21 23:12:30 UTC (rev 31792)
+++ grass-addons/gipe/i.eb.deltat/main.c	2008-06-22 02:10:55 UTC (rev 31793)
@@ -50,7 +50,7 @@
 	int i=0,j=0;
 	
 	void *inrast_tempk;
-	unsigned char *outrast1;
+	DCELL *outrast1;
 	RASTER_MAP_TYPE data_type_output=DCELL_TYPE;
 	RASTER_MAP_TYPE data_type_tempk;
 	/************************************/
@@ -127,7 +127,7 @@
 					break;
 			}
 			if(G_is_d_null_value(&d_tempk)){
-				((DCELL *) outrast1)[col] = -999.99;
+				G_set_d_null_value(&outrast1[col],1);
 			}else {
 				/****************************/
 				/* calculate delta T	    */
@@ -137,9 +137,9 @@
 					d = delta_t(d_tempk);
 				}
 				if(abs(d)>50.0){
-					d = -999.99;
+					G_set_d_null_value(&outrast1[col],1);
 				}
-				((DCELL *) outrast1)[col] = d;
+				outrast1[col] = d;
 			}
 		}
 		if (G_put_raster_row (outfd1, outrast1, data_type_output) < 0)



More information about the grass-commit mailing list