[GRASS-SVN] r31794 - grass-addons/gipe/i.eb.deltat
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Jun 21 23:24:11 EDT 2008
Author: ychemin
Date: 2008-06-21 23:24:11 -0400 (Sat, 21 Jun 2008)
New Revision: 31794
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-22 02:10:55 UTC (rev 31793)
+++ grass-addons/gipe/i.eb.deltat/delta_t.c 2008-06-22 03:24:11 UTC (rev 31794)
@@ -10,8 +10,10 @@
double result;
result = -321.147+1.095*tempk;
- if(result<0){
- result=0.001;
+ if(result<1){
+ result=1.0;
+ } else if(result>13){
+ result=13.0;
}
return result;
}
Modified: grass-addons/gipe/i.eb.deltat/main.c
===================================================================
--- grass-addons/gipe/i.eb.deltat/main.c 2008-06-22 02:10:55 UTC (rev 31793)
+++ grass-addons/gipe/i.eb.deltat/main.c 2008-06-22 03:24:11 UTC (rev 31794)
@@ -133,6 +133,11 @@
/* calculate delta T */
if(wim){
d = 0.3225 * d_tempk - 91.743;
+ if(d<1){
+ d=1.0;
+ } else if(d>13){
+ d=13.0;
+ }
}else{
d = delta_t(d_tempk);
}
More information about the grass-commit
mailing list