[GRASS-user] ERROR: Error reading raster data for row 210 of <cumRAD>

umberto.minora umberto.minora at unimi.it
Thu Sep 3 07:43:38 PDT 2015

I am experiencing this problem. If I run in GRASS 7.0.0 (2015):
    r.mapcalc new_cumRAD = cumRAD + altavaltellina_rad10_250_05.00
I receive:
    ERROR: Error reading raster data for row 210 of <cumRAD>
"cumRAD" is the result of previous calculation, where I summed all the
hourly global radiation maps (derived with "r.sun.hourly" function) one by
one with a Python script. Everything worked fine until I got stucked at
julianday 250 hour 04).
The problem seems to be in the "cumRAD" variable, but I cannot seem to
understand the reason of the error message.
In addition, this is my Python code:

# cumulative global radiation from julian day 152 to 259 (included)
import grass.script as grass

day_month=[range(152,182),range(182,213),range(213,244),range(244,260)] #
list julian days from 1 Jun to 16 Sept divided per month
hour = range(24) # list the hours of the day (0 to 23)
hour = ['{:02d}'.format(x) for x in hour] # change the length to 2

grass.mapcalc('cumRAD = $globrad',
			  globrad = 'altavaltellina_rad7'+ '_'+ str(day_month[0][0])+ '_'+
hour[0]+ '.00')
for m in xrange(len(day_month)):
	for d in day_month[m]:
		for h in hour:
			grass.mapcalc('new_cumRAD = cumRAD + $globrad',
				globrad = 'altavaltellina_rad'+ str(m+7)+ '_'+ str(d)+ '_'+ h+ '.00',
				overwrite = True) # WARNING: the "+7" in "str(m+7)" should refer to
month 6 (June) but it's 7 here due to a previous mistake in the calculation

			print 'altavaltellina_rad'+ str(m+7)+ '_'+ str(d)+ '_'+ h+ '.00 was added

				overwrite = True)

View this message in context: http://osgeo-org.1560.x6.nabble.com/ERROR-Error-reading-raster-data-for-row-210-of-cumRAD-tp5222503.html
Sent from the Grass - Users mailing list archive at Nabble.com.

More information about the grass-user mailing list