[Rodbcext-commits] r47 - pkg/geoclimate/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Oct 18 12:21:29 CEST 2013


Author: jaunario
Date: 2013-10-18 12:21:29 +0200 (Fri, 18 Oct 2013)
New Revision: 47

Modified:
   pkg/geoclimate/R/trmm.r
Log:
Changed condition for flagging values as NA

Modified: pkg/geoclimate/R/trmm.r
===================================================================
--- pkg/geoclimate/R/trmm.r	2013-10-01 06:38:51 UTC (rev 46)
+++ pkg/geoclimate/R/trmm.r	2013-10-18 10:21:29 UTC (rev 47)
@@ -68,7 +68,8 @@
 		cell <- cellFromXY(baseraster, txy)		
 		
 		prec <- matrix(readBin(rawtrmm, double(), endian="big", size=4, n=ncell(trmmraster)), ncol=ncol(trmmraster), nrow=nrow(trmmraster), byrow=TRUE)
-		prec[prec==min(prec)] <- NA
+		prec[prec<0] <- NA
+		# TODO: review why this was done
 		prec <- prec[nrow(prec):1,]
 		
 		trmmraster[] <- prec



More information about the Rodbcext-commits mailing list