# Hourly solar radiation estimates on a horizontal plane, preferably in R

I'm looking to estimate the temperature at the end of a river reach of a few miles in length based on known (measured) temperature at the start of the reach plus weather information: historical data for model fitting and forecast data for forecasting. I'd like this on a sub-day temporal timescale--let's say hourly.

From what I read, I presume that solar radiation is a key factor in determining the change in temperature from the start to the end of the reach, so I'm looking for ways to estimate the hourly solar radiation. Then I can try a regression model of end-of-reach temperature vs. start-of-reach temperature and solar radiation.

I tend to work in R, so solutions that come as part of an R package would be nice, solutions easy to implement in R would probably be okay. The R packages solaR and insol seem like potential candidates, but neither strike me as obvious choices yet.

I also found the 2005 "Estimating hourly incoming solar radiation from limited meteorological data" by spokas et al. (https://naldc.nal.usda.gov/download/1910/PDF) and a USDA implementation in Java of the algorithm in SolarCalc (https://www.ars.usda.gov/research/software/download/?softwareid=62). Its data requirements--max and min daily air temperatures and rainfall--seem minimal.

I've looked at CRAN and GitHub, but the best thing I've found is the python pysolarcalc (https://github.com/borevitzlab/pysolarcalc/tree/master/docs/src). I've skimmed the titles and summaries of many of the 160 questions here on solar radiation, too, but I haven't seen an answer.

Does anyone know of an implemntation of this algorithm in R?

Does anyone have a better solution to suggest?

Bill

– user12525
Aug 15, 2018 at 16:21
• @Universal_learner: Thanks. I didn't know about that. In theory, I should be okay with Octave. I tend to work in org-mode with org-babel, so different languages can work. I have two concerns: my relative lack of familiarity with Octave and the difficulty I think I've read about in getting Octave running on Windows (the target system).
– Bill
Aug 15, 2018 at 22:12
• I don't know if there are troubles on windows. exe files are at their site. The interface is quite similar to R if I remember well, but you migth lose a bit of time understanding syntaxis
– user12525
Aug 16, 2018 at 6:37
• This might be not relevant anymore, but since I was dealing with similiar topics lately, how about a) estimating extraterrestrial radiation (r0) for hourly time steps using eq. 28 from Allen et al. (1998): FAO-56 and b) deriving solar radiation from r0 either using sunshine hours (Angstrom, eq. 35) or minimum/maximum temperature (Hargreaves, eq. 50)? May 6, 2023 at 8:00