Clear Sky Radiation Models and CSMQ!
Clear sky radiation models provide estimates of the total radiation reaching the surface of the Earth under cloud-less conditions. These important models, form the basis for radiation data quality control and its analysis, and they are an inherent part of satellite based radiation estimatesAlso, clear sky radiation models coupled with a PV system simulation, are a great tool for PV data quality control and for simulating unmonitored PV system power output via KPV.
The anusolar Rpackage makes computing clear-sky radiation models very easy, and comes pre-loaded with several of the following modelling options:
The relevant citations for each of these models and the basic formulas required for their computation can be found in my Solar Energy paper which validated these models using Australia radiation data.
Now, onto computing these models!
Much like in the last post, we'll start by following along with the Engerer 2 separation model example for Melbourne (R Manual Entry #4). You can find this example code in the /code/examples/ directory of the Rpackage.
# Example script for calculating the diffuse fraction
## First Example: using the Engerer2 & Perez models
# using Melbourne data provided by the Bureau of Meteorology
# for 15 January 2013, only data provided by default in repository
pathto = "" # Enter your path to repository here, end with "/"
# load environment & initialise
# set the local region ('macro')
mlb = rad.meta("MLB")
# load in example radiation data, 15 Jan 2015 in Melbourne
indf = read.rad(mlb,2013,1,15) # macro, year, month, day, resolution (sec)
# generate solar position info for the time series
sza = SZAQ(indf,mlb)
# load in some weather data
wx = read.wx(mlb,2013,1,15)
# load up clear-sky model output, using rest2 model
csm = CSMQ(sza,wx,'rest2',mlb)
Reading through the above, in order to compute a clear sky model, we can see that we need to:
- Initialise the R Environment
- Load in some metadata from our $macro
- Create a time-stamped data.frame, indf (here we use the radiation data from read.rad)
- Calculate the solar geometry
- Load in some weather data
- Compute the CSMQ function
Steps 1-4 should be familiar to you by now. We covered some details about step 5 in the #3 Working with Data post, but we'll need some more information about weather data in a future post (coming soon!).
Step 6 is new, and introduces the CSMQ() function, which stands for Clear Sky Modelling (Quick - Vectorised). This whiz-bang ninja of a function allows us to compute any of the clear sky models from the above list.
This function requires 4 inputs:
sza, the output from the SZAQ function
cwx, timestamped weather observation data which matches the timestamps in sza
modl, a string value selecting the clear sky model to compute
ar, your metadata array (list object) which should be the same as what you used for SZAQ
The options for the modl variable are:
'rest2', Gueymard (2008)
'esra', Rigollier et al. (2000)
'ineichen_perez', Ineichen and Perez (2002)
'bird', Bird and Hulstrom (1981)
'iqbal', Iqbal (1983)
'mac', Davies and McKay (1982)
'solis', Ineichen (2008)
Note that these are character strings, and need to be wrapped in quotation marks within R. Using 'rest2' or 'esra' are my recommendations for any modelling in Australia.
The function returns several useful outputs:
$Egc, global horizontal clear sky radiation
$Ebnc, beam normal clear sky radiation
$Ebhc, beam horizontal clear sky radiation
$Ebtc, beam tilted clear sky radiation (plane of array surface, PV systems only)
$Edhc, diffuse horizontal clear sky radiation
$Edtc, diffuse tilted clear sky radiation (plane of array surface, PV systems only)
$Egtc, global tilted clear sky radiation (plane of array surface, PV systems only)
$ama, absolute air mass
$aoir, angle of incidence (radians) (plane of array surface, PV systems only)
Let's take a look at the data...
It's also fun to see how different models behave:
csm.bird = CSMQ(sza,wx,'bird',mlb)
csm.esra = CSMQ(sza,wx,'esra',mlb)
csm.rest = CSMQ(sza,wx,'rest2',mlb)
With this information, you should be able to use each of the included clear radiation models in your analysis. Be sure to read up on the papers to figure out how these models work, my review paper will be a great starting point! I intentionally include the original basic functions of each model in the manuscript, to make it easier for others to learn.