function to calculate n (sunshine duration)

Hey, does anybody know, if there is a a way to calculate the sunshine duration in hours in R?
I have the daily solar radiation, the latitude and the longitude.

Hi @tim1,
Check out the suncalc package available from CRAN.

thanks for your answer, but in need the actual sunshine duration, probably calculated with the solar radiation, not the potential sunshine hours from sunrise to sunset.

do you have solar radiation data ?

yes i have daily solar radiation data

Do you have knowledge of the mathematics that should be used, and want help converting your math knowledge to R code ; or are you seeking for someone else existing R function ? The latter will require someone working in this field to see this thread and respond to you with their knowledge of what is available; or someone out of the field to search for it with google-fu ; the former has perhaps more general odds assuming that the calculation is somewhat straightforward (and that the data you have is sufficient to compute it on)

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.