[GRASS-user] temporal mapcalc 3hour precipitation to hourly

Hi,

A have a temporal raster of 3hourly_rainrate.

t.rast.list input=3hr_rainrate

name|mapset|start_time|end_time
3hr_rainrate_2014-11-13_0300|PERMANENT|2014-11-13 03:00:00|2014-11-13 06:00:00
3hr_rainrate_2014-11-13_0600|PERMANENT|2014-11-13 06:00:00|2014-11-13 09:00:00

The values are the average hourly rainfall at 3hr snapshot. I want to
get the total rainfall which is (raster * 3). Using t.rast.mapcalc, I
get this error:

t.rast.mapcalc input=3hr_rainrate output=hourly_rainrate basename=hourly_rainrate expression="(3hr_rainrate) * (3.0)" nprocs=4

Start temporal sampling
Start mapcalc computation
Invalid map <3hr_rainrate_2014>
Invalid map <13_0300>
Parse error
ERROR: parse error
...
ERROR: parse error
Invalid map <3hr_rainrate_2014>
Invalid map <13_1200>
Parse error
ERROR: parse error
ERROR: Error while mapcalc computation

I'm using GRASS 7.0.0. Thanks!

--
cheers,
maning
------------------------------------------------------
"Freedom is still the most radical idea of all" -N.Branden
wiki: http://esambale.wikispaces.com/
blog: http://epsg4253.wordpress.com/
------------------------------------------------------

On 02/12/14 13:30, maning sambale wrote:

Hi,

A have a temporal raster of 3hourly_rainrate.

t.rast.list input=3hr_rainrate

name|mapset|start_time|end_time
3hr_rainrate_2014-11-13_0300|PERMANENT|2014-11-13 03:00:00|2014-11-13 06:00:00
3hr_rainrate_2014-11-13_0600|PERMANENT|2014-11-13 06:00:00|2014-11-13 09:00:00

The values are the average hourly rainfall at 3hr snapshot. I want to
get the total rainfall which is (raster * 3). Using t.rast.mapcalc, I
get this error:

t.rast.mapcalc input=3hr_rainrate output=hourly_rainrate basename=hourly_rainrate expression="(3hr_rainrate) * (3.0)" nprocs=4

Start temporal sampling
Start mapcalc computation
Invalid map <3hr_rainrate_2014>
Invalid map <13_0300>
Parse error
ERROR: parse error
...
ERROR: parse error
Invalid map <3hr_rainrate_2014>
Invalid map <13_1200>
Parse error
ERROR: parse error
ERROR: Error while mapcalc computation

I'm using GRASS 7.0.0. Thanks!

AFAIK, r.mapcalc has difficulties dealing with map names that contain a dash in the name as it interprets it as a minus sign.

Try renaming your maps.

Moritz

Thanks Moritz.

I renamed all my maps and its working now.

On Tue, Dec 2, 2014 at 8:59 PM, Moritz Lennert
<mlennert@club.worldonline.be> wrote:

On 02/12/14 13:30, maning sambale wrote:

Hi,

A have a temporal raster of 3hourly_rainrate.

t.rast.list input=3hr_rainrate

name|mapset|start_time|end_time
3hr_rainrate_2014-11-13_0300|PERMANENT|2014-11-13 03:00:00|2014-11-13
06:00:00
3hr_rainrate_2014-11-13_0600|PERMANENT|2014-11-13 06:00:00|2014-11-13
09:00:00

The values are the average hourly rainfall at 3hr snapshot. I want to
get the total rainfall which is (raster * 3). Using t.rast.mapcalc, I
get this error:

t.rast.mapcalc input=3hr_rainrate output=hourly_rainrate
basename=hourly_rainrate expression="(3hr_rainrate) * (3.0)" nprocs=4

Start temporal sampling
Start mapcalc computation
Invalid map <3hr_rainrate_2014>
Invalid map <13_0300>
Parse error
ERROR: parse error
...
ERROR: parse error
Invalid map <3hr_rainrate_2014>
Invalid map <13_1200>
Parse error
ERROR: parse error
ERROR: Error while mapcalc computation

I'm using GRASS 7.0.0. Thanks!

AFAIK, r.mapcalc has difficulties dealing with map names that contain a dash
in the name as it interprets it as a minus sign.

Try renaming your maps.

Moritz

--
cheers,
maning
------------------------------------------------------
"Freedom is still the most radical idea of all" -N.Branden
wiki: http://esambale.wikispaces.com/
blog: http://epsg4253.wordpress.com/
------------------------------------------------------