[GRASS-user] r.sun.daily ouputs

Hi,
I am using r.sun.daily to perform global radiation maps over a range of dates but I am a little bit confused about the outputs of this module.
I created two outputs: the accumulated map of the whole time period and a temporal dataset with all the daily maps.
I have tried to aggregate the daily maps in the temporal dataset with t.rast.series (average and sum) supposing that one of them was the same with the accumulated output of r.sun.daily but I was wrong.
Here the query on a pixel: the first line is the accumulated map from r.sun.daily, the last two line are the aggregated maps from t.rast.series.
sol_glob_veg@PERMANENT: value: 24291.95
sol_veg_sum@PERMANENT: value: 1495683.87133789
sol_veg_avg@PERMANENT: value: 6989.17696886865

My question now is which kind of accumulation perform r.sun.daily?
TIA

···
-- 
Andrea Balotti

Hi,

On Thu, Sep 28, 2017 at 5:30 AM, <balotti.and@gmail.com> wrote:

Hi,
I am using r.sun.daily to perform global radiation maps over a range of
dates but I am a little bit confused about the outputs of this module.
I created two outputs: the accumulated map of the whole time period and a
temporal dataset with all the daily maps.
I have tried to aggregate the daily maps in the temporal dataset with
t.rast.series (average and sum) supposing that one of them was the same with
the accumulated output of r.sun.daily but I was wrong.
Here the query on a pixel: the first line is the accumulated map from
r.sun.daily, the last two line are the aggregated maps from t.rast.series.
sol_glob_veg@PERMANENT: value: 24291.95
sol_veg_sum@PERMANENT: value: 1495683.87133789
sol_veg_avg@PERMANENT: value: 6989.17696886865

My question now is which kind of accumulation perform r.sun.daily?
TIA

it just sums the maps from each day, so t.rast.series with sum should
give you the same results. I tested it in NC sample datatset and
indeed it gave me identical results. Could you test it in the sample
dataset and perhaps send the commands you are using?

Thank you,

Anna

--
Andrea Balotti

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

Hi Anna,
Here the test on NC dataset, I reduced a little bit the resolution to speedup computation:

  1. g.region raster=elevation res=30 -p

  2. r.resamp.interp input=elevation@PERMANENT output=dem30

  3. r.slope.aspect elevation=dem30@PERMANENT slope=slo aspect=asp

  4. r.sun.daily -t elevation=dem30@PERMANENT aspect=asp@PERMANENT slope=slo@PERMANENT start_day=91 end_day=304 glob_rad=sol_glob glob_rad_basename=sol nprocs=4

  5. t.rast.series input=sol@PERMANENT method=sum output=sol_sum

And the output querying on a random pixel is:

est, nord: 636522.196262, 219573.598131
sol_glob@PERMANENT: value: 28270.75
sol_sum@PERMANENT: value: 1632588.35400391

The only thing that could create problem maybe is that during the execution of r.sun.daily I received many warnings like this (translated: can’t rename file NULL/CELL)

WARNING: Non riesco a rinominare il file null ‘C:.…\GRASS_data\nc_basic_spm_grass7\PERMANENT.tmp/unknown\4860.1’ in ‘C:.…\GRASS_data\nc_basic_spm_grass7\PERMANENT\cell_misc\sol_glob\null’: File exists
WARNING: Non riesco a rinominare il file cella ‘C:.…\GRASS_data\nc_basic_spm_grass7\PERMANENT.tmp/unknown\4860.0’ in ‘C:.…\GRASS_data\nc_basic_spm_grass7\PERMANENT\fcell\sol_glob’: File exists

Since sum by r.sun.daily is less than sum by t.rast.series, maybe the summed file is not properly summed and represent just the sum of the last days of the period?
P.S. I am on Windows with GRASS 7.2.1

···
---
Andrea Balotti

Il 28/09/2017 19:00, Anna Petrášová ha scritto:

Hi,

On Thu, Sep 28, 2017 at 5:30 AM,  [<balotti.and@gmail.com>](mailto:balotti.and@gmail.com) wrote:

Hi,
I am using  r.sun.daily to perform global radiation maps over a range of
dates but I am a little bit confused about the outputs of this module.
I created two outputs: the accumulated map of the whole time period and a
temporal dataset with all the daily maps.
I have tried to aggregate the daily maps in the temporal dataset with
t.rast.series (average and sum) supposing that one of them was the same with
the accumulated output of r.sun.daily but I was wrong.
Here the query on a pixel: the first line is the accumulated map from
r.sun.daily, the last two line are the aggregated maps from t.rast.series.
sol_glob_veg@PERMANENT: value: 24291.95
sol_veg_sum@PERMANENT: value: 1495683.87133789
sol_veg_avg@PERMANENT: value: 6989.17696886865

My question now is which kind of accumulation perform r.sun.daily?
TIA

it just sums the maps from each day, so t.rast.series with sum should
give you the same results. I tested it in NC sample datatset and
indeed it gave me identical results. Could you test it in the sample
dataset and perhaps send the commands you are using?

Thank you,

Anna

--
Andrea Balotti

_______________________________________________
grass-user mailing list
[grass-user@lists.osgeo.org](mailto:grass-user@lists.osgeo.org)
[https://lists.osgeo.org/mailman/listinfo/grass-user](https://lists.osgeo.org/mailman/listinfo/grass-user)

Hi,

That is helpful, thanks, I think I know what might be wrong looking at the code. It apparently works on Linux, but not on Windows. I don’t have time today, but will fix it as soon as possible. Thank you!

Anna

···

On Sep 29, 2017 3:16 AM, <balotti.and@gmail.com> wrote:

Hi Anna,
Here the test on NC dataset, I reduced a little bit the resolution to speedup computation:

  1. g.region raster=elevation res=30 -p

  2. r.resamp.interp input=elevation@PERMANENT output=dem30

  3. r.slope.aspect elevation=dem30@PERMANENT slope=slo aspect=asp

  4. r.sun.daily -t elevation=dem30@PERMANENT aspect=asp@PERMANENT slope=slo@PERMANENT start_day=91 end_day=304 glob_rad=sol_glob glob_rad_basename=sol nprocs=4

  5. t.rast.series input=sol@PERMANENT method=sum output=sol_sum

And the output querying on a random pixel is:

est, nord: 636522.196262, 219573.598131
sol_glob@PERMANENT: value: 28270.75
sol_sum@PERMANENT: value: 1632588.35400391

The only thing that could create problem maybe is that during the execution of r.sun.daily I received many warnings like this (translated: can’t rename file NULL/CELL)

WARNING: Non riesco a rinominare il file null ‘C:.…\GRASS_data\nc_basic_spm_grass7\PERMANENT.tmp/unknown\4860.1’ in ‘C:.…\GRASS_data\nc_basic_spm_grass7\PERMANENT\cell_misc\sol_glob\null’: File exists
WARNING: Non riesco a rinominare il file cella ‘C:.…\GRASS_data\nc_basic_spm_grass7\PERMANENT.tmp/unknown\4860.0’ in ‘C:.…\GRASS_data\nc_basic_spm_grass7\PERMANENT\fcell\sol_glob’: File exists

Since sum by r.sun.daily is less than sum by t.rast.series, maybe the summed file is not properly summed and represent just the sum of the last days of the period?
P.S. I am on Windows with GRASS 7.2.1

---
Andrea Balotti

Il 28/09/2017 19:00, Anna Petrášová ha scritto:

Hi,

On Thu, Sep 28, 2017 at 5:30 AM,  [<balotti.and@gmail.com>](mailto:balotti.and@gmail.com) wrote:

Hi,
I am using  r.sun.daily to perform global radiation maps over a range of
dates but I am a little bit confused about the outputs of this module.
I created two outputs: the accumulated map of the whole time period and a
temporal dataset with all the daily maps.
I have tried to aggregate the daily maps in the temporal dataset with
t.rast.series (average and sum) supposing that one of them was the same with
the accumulated output of r.sun.daily but I was wrong.
Here the query on a pixel: the first line is the accumulated map from
r.sun.daily, the last two line are the aggregated maps from t.rast.series.
sol_glob_veg@PERMANENT: value: 24291.95
sol_veg_sum@PERMANENT: value: 1495683.87133789
sol_veg_avg@PERMANENT: value: 6989.17696886865

My question now is which kind of accumulation perform r.sun.daily?
TIA

it just sums the maps from each day, so t.rast.series with sum should
give you the same results. I tested it in NC sample datatset and
indeed it gave me identical results. Could you test it in the sample
dataset and perhaps send the commands you are using?

Thank you,

Anna

--
Andrea Balotti

_______________________________________________
grass-user mailing list
[grass-user@lists.osgeo.org](mailto:grass-user@lists.osgeo.org)
[https://lists.osgeo.org/mailman/listinfo/grass-user](https://lists.osgeo.org/mailman/listinfo/grass-user)

Hi,

I hopefully fixed that problem in r71516, please test it once the
addon is available for Windows, which should be tomorrow or Monday.

Anna

On Fri, Sep 29, 2017 at 8:20 AM, Anna Petrášová <kratochanna@gmail.com> wrote:

Hi,

On Sep 29, 2017 3:16 AM, <balotti.and@gmail.com> wrote:

Hi Anna,
Here the test on NC dataset, I reduced a little bit the resolution to
speedup computation:

g.region raster=elevation res=30 -p
r.resamp.interp input=elevation@PERMANENT output=dem30
r.slope.aspect elevation=dem30@PERMANENT slope=slo aspect=asp
r.sun.daily -t elevation=dem30@PERMANENT aspect=asp@PERMANENT
slope=slo@PERMANENT start_day=91 end_day=304 glob_rad=sol_glob
glob_rad_basename=sol nprocs=4
t.rast.series input=sol@PERMANENT method=sum output=sol_sum

And the output querying on a random pixel is:

est, nord: 636522.196262, 219573.598131
sol_glob@PERMANENT: value: 28270.75
sol_sum@PERMANENT: value: 1632588.35400391

The only thing that could create problem maybe is that during the execution
of r.sun.daily I received many warnings like this (translated: can't rename
file NULL/CELL)

WARNING: Non riesco a rinominare il file null
'C:\...\GRASS_data\nc_basic_spm_grass7\PERMANENT\.tmp/unknown\4860.1' in
'C:\...\GRASS_data\nc_basic_spm_grass7\PERMANENT\cell_misc\sol_glob\null':
File exists
WARNING: Non riesco a rinominare il file cella
'C:\...\GRASS_data\nc_basic_spm_grass7\PERMANENT\.tmp/unknown\4860.0' in
'C:\...\GRASS_data\nc_basic_spm_grass7\PERMANENT\fcell\sol_glob': File
exists

Since sum by r.sun.daily is less than sum by t.rast.series, maybe the summed
file is not properly summed and represent just the sum of the last days of
the period?
P.S. I am on Windows with GRASS 7.2.1

That is helpful, thanks, I think I know what might be wrong looking at the
code. It apparently works on Linux, but not on Windows. I don't have time
today, but will fix it as soon as possible. Thank you!

Anna

---
Andrea Balotti

Il 28/09/2017 19:00, Anna Petrášová ha scritto:

Hi,

On Thu, Sep 28, 2017 at 5:30 AM, <balotti.and@gmail.com> wrote:

Hi,
I am using r.sun.daily to perform global radiation maps over a range of
dates but I am a little bit confused about the outputs of this module.
I created two outputs: the accumulated map of the whole time period and a
temporal dataset with all the daily maps.
I have tried to aggregate the daily maps in the temporal dataset with
t.rast.series (average and sum) supposing that one of them was the same with
the accumulated output of r.sun.daily but I was wrong.
Here the query on a pixel: the first line is the accumulated map from
r.sun.daily, the last two line are the aggregated maps from t.rast.series.
sol_glob_veg@PERMANENT: value: 24291.95
sol_veg_sum@PERMANENT: value: 1495683.87133789
sol_veg_avg@PERMANENT: value: 6989.17696886865

My question now is which kind of accumulation perform r.sun.daily?
TIA

it just sums the maps from each day, so t.rast.series with sum should
give you the same results. I tested it in NC sample datatset and
indeed it gave me identical results. Could you test it in the sample
dataset and perhaps send the commands you are using?

Thank you,

Anna

--
Andrea Balotti

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

Thanks Anna.
I will check next days and let you know.

---
Andrea Balotti

Il 30/09/2017 23:59, Anna Petrášová ha scritto:

Hi,

I hopefully fixed that problem in r71516, please test it once the
addon is available for Windows, which should be tomorrow or Monday.

Anna

Hi Anna,
now all works like expected. The r.sun.daily output is just rounded respect t.rast.series but the result is the same:

est, nord: 641663.551402, 218879.672897
sol_sum@PERMANENT: value: 1634545.59375
sol_glob@PERMANENT: value: 1634546

Many thanks for your support.
Cheers

···
Andrea Balotti

Il 01/10/2017 21:31, ANDREA BALOTTI ha scritto:

Thanks Anna.
I will check next days and let you know.


Andrea Balotti

Il 30/09/2017 23:59, Anna Petrášová ha scritto:

Hi,

I hopefully fixed that problem in r71516, please test it once the
addon is available for Windows, which should be tomorrow or Monday.

Anna