[GRASS-SVN] r31171 - grass-addons/gipe/r.out.vic
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Apr 29 02:28:21 EDT 2008
Author: ychemin
Date: 2008-04-29 02:28:20 -0400 (Tue, 29 Apr 2008)
New Revision: 31171
Modified:
grass-addons/gipe/r.out.vic/main.c
Log:
more r.out.vic bug fixing
Modified: grass-addons/gipe/r.out.vic/main.c
===================================================================
--- grass-addons/gipe/r.out.vic/main.c 2008-04-29 03:29:33 UTC (rev 31170)
+++ grass-addons/gipe/r.out.vic/main.c 2008-04-29 06:28:20 UTC (rev 31171)
@@ -606,7 +606,7 @@
G_is_c_null_value(&c_landcover)||
G_is_c_null_value(&c_fdir)){
/* Do nothing */
- c_fdir = 0;
+ c_fdir = -1;
} else {
/* Make the output .dat file name */
sprintf(result_lat_long,"%s%.4f%s%.4f",result1,latitude-stepy/2.0,"_",longitude-stepx/2);
@@ -649,8 +649,13 @@
/* Convert r.watershed flow dir to AGNPS */
fprintf(ef,"%d ",c_fdir+1);
} else {
- /* Flow direction format is AGNPS */
- fprintf(ef,"%d ",c_fdir);
+ if(c_fdir==-1){
+ /* Flow direction NODATA_value=0 */
+ fprintf(ef,"0 ");
+ } else {
+ /* Flow direction format is AGNPS */
+ fprintf(ef,"%d ",c_fdir);
+ }
}
}
fprintf(ef,"\n");
More information about the grass-commit
mailing list