[GRASS-user] help with r.hants

Markus Neteler neteler at osgeo.org
Fri May 2 08:19:47 PDT 2014


hi Veronica,

On Thu, May 1, 2014 at 3:17 PM, Veronica Andreo <veroandreo at gmail.com>
wrote:
> Dear all,
>
> I'm using the following command to run r.hants on a series of 506 maps of
> chlorophyll. It seems to start thinking and a few seconds after i get an
> error:
>
> r.hants file=lista_hants nf=6 fet=0.1 dod=5 delta=0.1 base_period=46
>
> ERROR: no temp files available

probably it runs out of memory? How many pixels does one map have?

> As stated before, the total number of images is 506 (11 years) but the
base
> period is 1 year, hence base_period=46 images, and i'm passing a plain
text
> file with the map names (one per line) as stated here:
> http://grass.osgeo.org/grass70/manuals/addons/r.hants.html

You can simply use g.mlist for that, much easier (see below).

> The files are registered in a spatio-temporal raster data set, if that
means
> something, dunno.

I guess that this will be simply ignored, so no problem.

-------------

I have tried myself, using the new dataset prepared by Anna:

Climate dataset for North Carolina from publicly available data, with
monthly temperature average and monthly precipitation from 2000 to 2012:
http://courses.ncsu.edu/mea592/common/media/02/nc_climate_spm_2000_2012.zip

#########

GRASS 7.1.svn (nc_climate_spm_2000_2012):~ >

# set computational region
g.region rast=2004_03_tempmean -p

# check for the maps, especially how many
g.mlist rast pattern=20??_??_tempmean  | wc -l
raster map(s) available in mapset <climate_1970_2012>:
156

# try out at lower resolution for quick assessment:
g.region -p res=5000

# HANTS
# just wildly guessing the parameters for a test run:
r.hants input=`g.mlist rast pattern=20??_??_tempmean sep=comma` \
      nf=6 fet=0.1 dod=5 delta=0.1 base_period=12
Harmonic analysis of 156 input maps...
 100%

# assign reasonable color tables
for map in `g.mlist rast pattern="*tempmean_hants"` ; do
      r.colors $map color=celsius
done

# verify with one of the 156 results:
# remember that we had reduced the resolution
# by factor 10 to this quick assessment
r.mapcalc "diff = 2000_06_tempmean - 2000_06_tempmean_hants"

r.colors diff color=differences
d.mon wx0
d.rast diff

r.univar diff -g
n=5066
null_cells=5040
cells=10106
min=-0.0899336115228095
max=0.359362050140941
range=0.449295661663751
mean=0.188579838052468
...

# see original as animation (still at 5km resolution)
# note: color table is different from standard "celsius"
g.gui.animation rast=`g.mlist rast pattern="*tempmean" sep=comma`

# see HANTS time series as animation
g.gui.animation rast=`g.mlist rast pattern="*tempmean_hants" sep=comma`

Looks all fine!

Best
markusN
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20140502/ddef3efd/attachment.html>


More information about the grass-user mailing list