[GRASS-SVN] r64430 - grass-addons/grass7/raster/r.popgrowth

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Feb 3 08:16:01 PST 2015


Author: jradinger
Date: 2015-02-03 08:16:01 -0800 (Tue, 03 Feb 2015)
New Revision: 64430

Modified:
   grass-addons/grass7/raster/r.popgrowth/r.popgrowth.py
Log:
Manual remove of temporary files of raster arrays

Modified: grass-addons/grass7/raster/r.popgrowth/r.popgrowth.py
===================================================================
--- grass-addons/grass7/raster/r.popgrowth/r.popgrowth.py	2015-02-03 16:01:24 UTC (rev 64429)
+++ grass-addons/grass7/raster/r.popgrowth/r.popgrowth.py	2015-02-03 16:16:01 UTC (rev 64430)
@@ -260,6 +260,10 @@
 		ricker_map.write("exponential_output_tmp_%d" % os.getpid())
 		tmp_map_rast.append("exponential_output_tmp_")
 
+		#remove temporary arrays
+		grass.try_remove(n0_map.filename)
+		grass.try_remove(exponential_map.filename)
+		grass.try_remove(r.filename)
 
 		# Retransform in case of patches
 		if options['population_patches']:
@@ -337,6 +341,12 @@
 		ricker_map.write("ricker_output_tmp_%d" % os.getpid())
 		tmp_map_rast.append("ricker_output_tmp_")
 
+		#remove temporary arrays
+		grass.try_remove(n0_map.filename)
+		grass.try_remove(ricker_map.filename)
+		grass.try_remove(r.filename)
+		grass.try_remove(k.filename)		
+
 		# Retransform in case of patches
 		if options['population_patches']:
 			grass.mapcalc("$ricker_output = if($n0,(round(($n0*1.0/$n0_tmp)*$ricker_output_tmp)),null())",



More information about the grass-commit mailing list