[GRASS-user] Difference in sunset/sunrise time between r.sun and r.sunmask

Dear Group!

Happy New Year @all!

I work on a Linux GRASS 6.4.2 RC1. The area of interest is in central Europe and
the projection is WGS84(EPSG:4326).

When I use the r.sun module and let it show the sunset/sunrise time and compare
it with the sunset/sunrise from a map created with r.sunmask I see great
differences (up to 50 minutes).

It is not the timezone (which is set correctly) in r.sunmask.

The results from r.sunmask seem to be, according to other sources, seem to be
right, but the results from r.sun are fare off.

Please give a suggestions or help!

Stefan

If you use R there is a sunrise.set function in the StreamMetabolism package (shameless promotion). That may be helpful.

Stephen Sefick

On 01/02/2012 06:57 AM, Büro Seling wrote:

Dear Group!

Happy New Year @all!

I work on a Linux GRASS 6.4.2 RC1. The area of interest is in central Europe and
the projection is WGS84(EPSG:4326).

When I use the r.sun module and let it show the sunset/sunrise time and compare
it with the sunset/sunrise from a map created with r.sunmask I see great
differences (up to 50 minutes).

It is not the timezone (which is set correctly) in r.sunmask.

The results from r.sunmask seem to be, according to other sources, seem to be
right, but the results from r.sun are fare off.

Please give a suggestions or help!

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

Am 02.01.2012 16:19, schrieb Stephen Sefick:

If you use R there is a sunrise.set function in the StreamMetabolism package (shameless promotion). That may be helpful.

Stephen Sefick

On 01/02/2012 06:57 AM, Büro Seling wrote:

Dear Group!

Happy New Year @all!

I work on a Linux GRASS 6.4.2 RC1. The area of interest is in central Europe and
the projection is WGS84(EPSG:4326).

When I use the r.sun module and let it show the sunset/sunrise time and compare
it with the sunset/sunrise from a map created with r.sunmask I see great
differences (up to 50 minutes).

It is not the timezone (which is set correctly) in r.sunmask.

The results from r.sunmask seem to be, according to other sources, seem to be
right, but the results from r.sun are fare off.

Please give a suggestions or help!

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

Thanks for Your suggestion Stephen,
but I have to make "shadow" maps with r.sun and my problem is how to get r.sun work within the correct sunrise/sunset timespan.

Oh sorry, good luck.

On Mon 02 Jan 2012 10:46:44 AM EST, Büro Seling wrote:

Am 02.01.2012 16:19, schrieb Stephen Sefick:

If you use R there is a sunrise.set function in the StreamMetabolism package (shameless promotion). That may be helpful.

Stephen Sefick

On 01/02/2012 06:57 AM, Büro Seling wrote:

Dear Group!

Happy New Year @all!

I work on a Linux GRASS 6.4.2 RC1. The area of interest is in central Europe and
the projection is WGS84(EPSG:4326).

When I use the r.sun module and let it show the sunset/sunrise time and compare
it with the sunset/sunrise from a map created with r.sunmask I see great
differences (up to 50 minutes).

It is not the timezone (which is set correctly) in r.sunmask.

The results from r.sunmask seem to be, according to other sources, seem to be
right, but the results from r.sun are fare off.

Please give a suggestions or help!

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

Thanks for Your suggestion Stephen,
but I have to make "shadow" maps with r.sun and my problem is how to get r.sun work within the correct sunrise/sunset timespan.

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

Hello,

Sorry for the late reply, I tried to send this once but something must have
gone wrong.

By default r.sun calculates times as true solar time, whereby solar noon is
always exactly 12 o'clock everywhere. Depending on where you are in your time
zone, this may cause differences of up to an hour, in some cases (like Western
Spain) even more. On top of this, the offset varies during the year according
to the Equation of Time.

You can use the option civiltime=<timezone_offset> in r.sun to make it use
wall clock time. For Central Europe the timezone offset is +1, +2 when
daylight saving time is in effect.

I'm not completely sure about this, but if you use civiltime you may have to
supply the longitude as a raster with the "longin" option. With latlon
projection you can make a longitude raster simply with

r.mapcalc lon_raster='x()'

Hope this helps.

Thomas

On Monday 02 January 2012 12:57:27 pm Büro Seling wrote:

Dear Group!

Happy New Year @all!

I work on a Linux GRASS 6.4.2 RC1. The area of interest is in central
Europe and
the projection is WGS84(EPSG:4326).

When I use the r.sun module and let it show the sunset/sunrise time and
compare
it with the sunset/sunrise from a map created with r.sunmask I see great
differences (up to 50 minutes).

It is not the timezone (which is set correctly) in r.sunmask.

The results from r.sunmask seem to be, according to other sources, seem
to be
right, but the results from r.sun are fare off.

Please give a suggestions or help!

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

--
--------------------------------------------------
Thomas Huld
Joint Research Centre of the European Commission
T.P. 450
I-21027 Ispra, Italy
phone: +39 0332785273
e-mail: Thomas.Huld@jrc.ec.europa.eu
--------------------------------------------------

On Wed, Jan 4, 2012 at 8:26 AM, <thomas.huld@jrc.ec.europa.eu> wrote:

Hello,

Sorry for the late reply, I tried to send this once but something must have
gone wrong.

By default r.sun calculates times as true solar time, whereby solar noon is
always exactly 12 o'clock everywhere. Depending on where you are in your time
zone, this may cause differences of up to an hour, in some cases (like Western
Spain) even more. On top of this, the offset varies during the year according
to the Equation of Time.

You can use the option civiltime=<timezone_offset> in r.sun to make it use
wall clock time. For Central Europe the timezone offset is +1, +2 when
daylight saving time is in effect.

I'll add the upper part slightly modified to the manual, thanks for
the insights.

I'm not completely sure about this, but if you use civiltime you may have to
supply the longitude as a raster with the "longin" option. With latlon
projection you can make a longitude raster simply with

r.mapcalc lon_raster='x()'

The source code of 6.4+ contains:

grass64/raster/r.sun2/main.c line 749:

    if ((latin != NULL || longin != NULL) && (G_projection() == PROJECTION_LL))
        G_warning(_("latin and longin raster maps have no effect when
in a Lat/Lon location"));
        /* true about longin= when civiltime is used? */
        /* civiltime needs longin= but not latin= for non-LL projections -
            better would be it just use pj_proj() if it needs those?? */
    if (latin != NULL && longin == NULL)
        G_fatal_error(_("Both latin and longin raster maps must be
given, or neither"));

More investigations needed...
Markus