[GRASS-user] r.sun and XY locations

Dear all,

I want to create a WPS module which is calculating solar irradiance. As WPS architecture I have to use PyWPS which is creating a XY-location and mapsets on the fly to process the data.

What is the current status of running r.sun in a XY location? On a testing machine I got back an error message [1] while providing latitude and longtiude grids to the r.sun command [2]. Is it feasible at all?

I am aware of the setting in PyWPS to have the GRASS processing done in a predefined GRASS location, but this is not an option because of how the WPS should work.

Greetings from Luxembourg,
Christian

[1]
WARNING: <PROJ_INFO> file not found for location <XY>
ERROR: Can't get projection info of current location

[2]
r.sun -s elevin=ro_dsm latin=ro_latitude longin=ro_longitude lin=3 alb=0.17 beam_rad=ro_irra_B_hc diff_rad=ro_irra_D_hc glob_rad=ro_irra_G_hc day=180 step=1

------------------------------------------------------------
Christian Braun
R+D Engineer
Environmental Modelling, Geocomputation

Tel: +352- 425991-6608
Mobil: +49-179-6845896
Mail: christian.braun@tudor.lu

Resource Centre for Environmental Technologies,
Public Research Centre Henri Tudor,
Technoport Schlassgoart,
66 rue de Luxembourg,
P.O. BOX 144,
L-4002 Esch-sur-Alzette, Luxembourg

Hi Christian,

Determining the position of the sun relative to a given pixel requires knowing the pixel’s latitude at the very least. That’s why using r.sun in an XY location won’t work. r.sun definitely needs a geographic location to work with - otherwise it doesn’t know which way is north and south and where the sun’s at at a given time of day or year.

Best,
Daniel

B.Sc. Daniel Lee
Geschäftsführung für Forschung und Entwicklung
ISIS - International Solar Information Solutions GbR
Vertreten durch: Daniel Lee, Nepomuk Reinhard und Nils Räder

Softwarecenter 3
35037 Marburg
Festnetz: +49 6421 379 6256
Mobil: +49 176 6127 7269
E-Mail: Lee@isi-solutions.org
Web: http://www.isi-solutions.org

2012/8/8 Christian Braun <Christian.Braun@tudor.lu>

Dear all,

I want to create a WPS module which is calculating solar irradiance. As WPS architecture I have to use PyWPS which is creating a XY-location and mapsets on the fly to process the data.

What is the current status of running r.sun in a XY location? On a testing machine I got back an error message [1] while providing latitude and longtiude grids to the r.sun command [2]. Is it feasible at all?

I am aware of the setting in PyWPS to have the GRASS processing done in a predefined GRASS location, but this is not an option because of how the WPS should work.

Greetings from Luxembourg,
Christian

[1]
WARNING: <PROJ_INFO> file not found for location
ERROR: Can’t get projection info of current location

[2]
r.sun -s elevin=ro_dsm latin=ro_latitude longin=ro_longitude lin=3 alb=0.17 beam_rad=ro_irra_B_hc diff_rad=ro_irra_D_hc glob_rad=ro_irra_G_hc day=180 step=1


Christian Braun
R+D Engineer
Environmental Modelling, Geocomputation

Tel: +352- 425991-6608
Mobil: +49-179-6845896
Mail: christian.braun@tudor.lu

Resource Centre for Environmental Technologies,
Public Research Centre Henri Tudor,
Technoport Schlassgoart,
66 rue de Luxembourg,
P.O. BOX 144,
L-4002 Esch-sur-Alzette, Luxembourg


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Hi Daniel,
it’s clear to me that r.sun needs some sort of spatial reference.
I thought that is why I can provide latitude and longitude grids as input for the very special case of an XY location. Isn’t it like that?

cheers
Christian


Christian Braun,
R+D Engineer
Environmental Modelling, Geocomputation

Tel: +352- 425991-6608
Mobil: +49-179-6845896
Mail: christian.braun@tudor.lu

Resource Centre for Environmental Technologies,
Public Research Centre Henri Tudor,
Technoport Schlassgoart,
66 rue de Luxembourg,
P.O. BOX 144,
L-4002 Esch-sur-Alzette, Luxembourg

From: Daniel Lee lee@isi-solutions.org
To: Christian Braun Christian.Braun@tudor.lu,
Cc: grass-user@lists.osgeo.org
Date: 08/08/2012 17:44
Subject: Re: [GRASS-user] r.sun and XY locations


Hi Christian,

Determining the position of the sun relative to a given pixel requires knowing the pixel’s latitude at the very least. That’s why using r.sun in an XY location won’t work. r.sun definitely needs a geographic location to work with - otherwise it doesn’t know which way is north and south and where the sun’s at at a given time of day or year.

Best,
Daniel

B.Sc. Daniel Lee
Geschäftsführung für Forschung und Entwicklung
ISIS - International Solar Information Solutions GbR
Vertreten durch: Daniel Lee, Nepomuk Reinhard und Nils Räder

Softwarecenter 3
35037 Marburg
Festnetz: +49 6421 379 6256
Mobil: +49 176 6127 7269
E-Mail: Lee@isi-solutions.org
Web: http://www.isi-solutions.org

2012/8/8 Christian Braun <Christian.Braun@tudor.lu>
Dear all,

I want to create a WPS module which is calculating solar irradiance. As WPS architecture I have to use PyWPS which is creating a XY-location and mapsets on the fly to process the data.

What is the current status of running r.sun in a XY location? On a testing machine I got back an error message [1] while providing latitude and longtiude grids to the r.sun command [2]. Is it feasible at all?

I am aware of the setting in PyWPS to have the GRASS processing done in a predefined GRASS location, but this is not an option because of how the WPS should work.

Greetings from Luxembourg,
Christian

[1]
WARNING: <PROJ_INFO> file not found for location
ERROR: Can’t get projection info of current location

[2]
r.sun -s elevin=ro_dsm latin=ro_latitude longin=ro_longitude lin=3 alb=0.17 beam_rad=ro_irra_B_hc diff_rad=ro_irra_D_hc glob_rad=ro_irra_G_hc day=180 step=1


Christian Braun
R+D Engineer
Environmental Modelling, Geocomputation

Tel: +352- 425991-6608
Mobil: +49-179-6845896
Mail: christian.braun@tudor.lu

Resource Centre for Environmental Technologies,
Public Research Centre Henri Tudor,
Technoport Schlassgoart,
66 rue de Luxembourg,
P.O. BOX 144,
L-4002 Esch-sur-Alzette, Luxembourg


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

On Wed, Aug 8, 2012 at 4:39 PM, Christian Braun
<Christian.Braun@tudor.lu> wrote:

Dear all,

I want to create a WPS module which is calculating solar irradiance. As WPS architecture I have to use PyWPS which is creating a XY-location and mapsets on the fly to process the data.

Why this? I am fairly sure that PyWPS supports projections.
Then r.sun should work fine for your purposes.

Markus

Hi,

of course it does support projections, but just for a predefined location. This means that this specific process needs input data in that predefined CRS. If you then have “clients” using different CRS this would mean that either the client has to reproject in advance or the WPS is doing reprojection on-the-fly. We just wanted to avoid this.

Maybe a soultion would be that we modify pyWPS in a way that it creates a location for each process not just mapsets. It would then be possible with g.proj -c to set projection information during run time…

regards,
Christian

On 9 Aug 2012, at 12:50, Markus Neteler wrote:

On Wed, Aug 8, 2012 at 4:39 PM, Christian Braun
<Christian.Braun@tudor.lu> wrote:

Dear all,

I want to create a WPS module which is calculating solar irradiance. As WPS architecture I have to use PyWPS which is creating a XY-location and mapsets on the fly to process the data.

Why this? I am fairly sure that PyWPS supports projections.
Then r.sun should work fine for your purposes.

Markus


Christian Braun

R+D Engineer
Environmental Modelling, Geocomputation

Tel: +352- 425991-6608
Mobil: +49-179-6845896
Mail: christian.braun@tudor.lu

Resource Centre for Environmental Technologies,
Public Research Centre Henri Tudor,
Technoport Schlassgoart,
66 rue de Luxembourg,
P.O. BOX 144,
L-4002 Esch-sur-Alzette, Luxembourg

2012/8/9 <christian.braun@tudor.lu>

it’s clear to me that r.sun needs some sort of spatial reference.
I thought that is why I can provide latitude and longitude grids as input for the very special case of an XY location. Isn’t it like that?

I’ve heard that before, but never used it, to be honest with you. I find it a lot more annoying to create a coordinate raster than to work with geolocated data. I’ve also got the ghost of some conversation running around in my head claiming that the location grid function is deprecated, but I couldn’t say when I’ve heard it, from whom and whether it’s true or not :wink:

Reworkign pyWPS to create a location on the fly is a really interesting idea :wink: But I’m a little bit confused as to what you have planned - are you wanting to do an analysis with r.sun for different rasters at runtime and show them on demand? I would suggest running r.sun beforehand and storing the result, since r.sun can take a long time with larger areas.

Cheers,
Daniel