<p>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. </p>

<p>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.</p>

<p>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.</p>

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

<p>I've looked at CRAN and GitHub, but the best thing I've found is the python pysolarcalc (<a href="https://github.com/borevitzlab/pysolarcalc/tree/master/docs/src" rel="nofollow noreferrer">https://github.com/borevitzlab/pysolarcalc/tree/master/docs/src</a>).  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.</p>

<p>Does anyone know of an implemntation of this algorithm in R?</p>

<p>Does anyone have a better solution to suggest?</p>

<p>Bill</p>

CC BY-SA 4.0
2018-08-15T22:12:23.247Z
@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
CC BY-SA 4.0
2023-05-06T08:00:02.967Z
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](https://www.fao.org/3/x0490e/x0490e07.htm#solar%20radiation) and b) deriving solar radiation from r0 either using sunshine hours (Angstrom, eq. 35) or minimum/maximum temperature (Hargreaves, eq. 50)?
dimfalk
<software><insolation>
Hourly solar radiation estimates on a horizontal plane, preferably in R
Bill
# Hourly solar radiation estimates on a horizontal plane, preferably in R

(Asked by: username_0 on 2018-08-14)

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?

username_0

**Tags:** software, insolation

> **Comments:**
> **username_0**: @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).  
> **username_1**: 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](https://www.fao.org/3/x0490e/x0490e07.htm#solar%20radiation) and b) deriving solar radiation from r0 either using sunshine hours (Angstrom, eq. 35) or minimum/maximum temperature (Hargreaves, eq. 50)?  

---

## 0 answers

