[GRASS-SVN] r60716 - grass-addons/grass7/raster/r.hants

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jun 5 13:56:27 PDT 2014


Author: neteler
Date: 2014-06-05 13:56:27 -0700 (Thu, 05 Jun 2014)
New Revision: 60716

Modified:
   grass-addons/grass7/raster/r.hants/r.hants.html
Log:
r.hants manual: example extended (thanks to Veronica Andreo)

Modified: grass-addons/grass7/raster/r.hants/r.hants.html
===================================================================
--- grass-addons/grass7/raster/r.hants/r.hants.html	2014-06-05 18:12:39 UTC (rev 60715)
+++ grass-addons/grass7/raster/r.hants/r.hants.html	2014-06-05 20:56:27 UTC (rev 60716)
@@ -98,7 +98,7 @@
 </pre></div>
 
 <p>
-Since HANTS is CPU intensive, we test at lower resolution:
+Since HANTS is CPU intensive, we test for now at lower resolution:
 <div class="code"><pre>
 g.region -p res=5000
 
@@ -112,13 +112,18 @@
     r.colors $map color=celsius
 done
 
+# assign degree Celsius color table
+r.colors 2000_06_tempmean_hants color=celsius
+
 # verify with one of the 156 results (still at reduced resolution):
 r.mapcalc "2000_06_tempmean_diff = 2000_06_tempmean - 2000_06_tempmean_hants"
 
 r.colors 2000_06_tempmean_diff color=differences
 d.mon wx0
+d.rast 2000_06_tempmean_hants
 d.rast 2000_06_tempmean_diff
 
+
 r.univar 2000_06_tempmean_diff -g
 n=5066
 null_cells=5040
@@ -131,6 +136,27 @@
 
 # see HANTS time series as animation
 g.gui.animation rast=`g.mlist rast pattern="*tempmean_hants" sep=comma`
+
+
+# Check HANTS behaviour in a given point 
+east=740830
+north=168832
+
+for map in `g.mlist rast pat="20??_??_tempmean"` ; do   
+  r.what map=$map coordinates=$east,$north >> time_series_orig.csv
+done
+
+for map in `g.mlist rast pat="*tempmean_hants"` ; do 
+  r.what map=$map coordinates=$east,$north >> time_series_hants.csv 
+done
+
+# merge files:
+echo "east|north|temp_orig|temp_hants" > time_series_final.csv
+
+paste -d'|' time_series_orig.csv time_series_hants.csv | \
+      cut -d'|' -f1,2,4,8 >> time_series_final.csv
+
+# Resulting CSV file: 'time_series_final.csv'
 </pre></div>
 
 <h2>SEE ALSO</h2>



More information about the grass-commit mailing list