[GRASS-user] error in r.sun with latin and longin maps

Hi all

I want to create a map with r.sun but I get the following error:

Mode 1: instantaneous solar incidence angle & irradiance using a set local
time

pj_transform() failed: latitude or longitude exceeded limits

my instruction is:

r.sun -s elevin=dem aspin=aspecto.allen slopein=pendiente lin=3.0
albedo=albedo_178 latin=latitud longin=longitud
beam_rad=beam_inst_pixel_178 diff_rad=diffuse_inst_pixel_178
refl_rad=reflected_inst_pixel_178 day=178 step=0.5 declin=0.406818033
time=11.11667 dist=1.0 numpartitions=1

r.info latitud:

  Type of Map: raster Number of Categories: 255 |
| Data Type: FCELL
|
| Rows: 7231
|
| Columns: 8051
|
| Total Cells: 58216781
|
| Projection: UTM (zone 14)
|
| N: 4098600 S: 3881670 Res: 30
|
| E: 449130 W: 207600 Res: 30
|
| Range of data: min = 35.03556 max = 37
|
|

r.info longitud:
|
|
| Type of Map: raster Number of Categories: 255
|
| Data Type: FCELL
|
| Rows: 7231
|
| Columns: 8051
|
| Total Cells: 58216781
|
| Projection: UTM (zone 14)
|
| N: 4098600 S: 3881670 Res: 30
|
| E: 449130 W: 207600 Res: 30
|
| Range of data: min = 99.55805 max = 102.285

Any idea how I can solve this problem?

Thank you!

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/error-in-r-sun-with-latin-and-longin-maps-tp4984349.html
Sent from the Grass - Users mailing list archive at Nabble.com.

tigrida wrote:

I want to create a map with r.sun but I get the
following error:

...

my instruction is:

r.sun -s elevin=dem aspin=aspecto.allen slopein=pendiente
lin=3.0
albedo=albedo_178 latin=latitud longin=longitud
beam_rad=beam_inst_pixel_178
diff_rad=diffuse_inst_pixel_178
refl_rad=reflected_inst_pixel_178 day=178 step=0.5
declin=0.406818033
time=11.11667 dist=1.0 numpartitions=1

...

Any idea how I can solve this problem?

don't use the latin= and lonin= options. You don't need them
from a UTM source location, the values will be calculated
automatically. (which turns out to be no slower than reading
them off the disk)

Hamish

Ok, thank you very much Hamish

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/error-in-r-sun-with-latin-and-longin-maps-tp4984349p4984654.html
Sent from the Grass - Users mailing list archive at Nabble.com.

On Wed, Jun 27, 2012 at 11:13 PM, Hamish <hamish_b@yahoo.com> wrote:
...

don't use the latin= and lonin= options. You don't need them
from a UTM source location, the values will be calculated
automatically. (which turns out to be no slower than reading
them off the disk)

I'd suggest to disactivate them (make them "fake" along with
a G_message() ) since this comes up regularly. Likewise for
other unneeded options of r.sun.

Markus

Hamish wrote:

...
> don't use the latin= and lonin= options. You don't need
> them from a UTM source location, the values will be
> calculated automatically. (which turns out to be no slower
> than reading them off the disk)

Markus N:

I'd suggest to disactivate them (make them "fake" along
with a G_message() ) since this comes up regularly. Likewise
for other unneeded options of r.sun.

I threw the "UTM" in my comment as I'm not sure if you might
need them for other map projections where reverse projection is
not possible on-the-fly. Maybe it's ok, I haven't looked into it
deeply, but it needs to be verified before removing them.
Perhaps r.sun is not too interesting for mainly cartographic
projections like Winkel Tripel, but it may be quite interesting
to run it in e.g. high latitude polar stereographic regions
(is that projection reversible?).

wrt aspect and slope input maps the jury is still out/confused
on which cases are buggy or not. Seems both ways might be buggy
for different cases, and maybe it's a situation where all native
map resolutions and the current region resolution must match?
More work is needed here to figure that out..

My main priorities for r.sun are to get the slope and aspect map
issues understood+resolved, starting with the re-simplified (&
OpenCL'able) version of things in trunk.

see also
  http://grass.osgeo.org/wiki/R.sun#Seed_maps
  https://trac.osgeo.org/grass/ticket/498#comment:14

cheers,
Hamish