[GRASS-user] How to use properly r.sun in mode 1

Hi,

I have develop a python script for running r.sun (GRASS GIS 7.0.5) in mode 2 for multiple days in a loop without problem.

But now, I have to run r.sun in a loop for a given time range (mode 1) and I would like to define properly the start_time and end_time of the loop for a given day of year. I am not sure if I have to run r.sunmask for every day before running r.sun, or maybe this computation is included in r.sun (mode 1) and it’s redundant

Does anyone have a suggestion on what is the best way to develop this routine ?

I have checked the following links:

https://grass.osgeo.org/grass72/manuals/addons/r.sun.hourly.html
https://grass.osgeo.org/grass73/manuals/r.sunmask.html

https://grass.osgeo.org/grass73/manuals/r.sun.html

Many thanks in advance !

A.