pvl_orgill_hollands.m mathematical mistake calculating diffuse fraction
Closed this issue · 1 comments
CNNielsen commented
There is a mistake in the calculation of the diffuse fraction in the Orgill Hollands function. There should be no jump discontinuities when plotting.
This should be changed from
if Kt(i)<=.35
DF(i) = 1.0 - 0.249*Kt(i);
% For Kt > 0.35 and Kt <= 0.75, set the diffuse fraction
elseif Kt(i)>.35 && Kt(i)<.75
DF(i) = 1.577 - 1.84*Kt(i);
% For Kt > 0.75, set the diffuse fraction
else
DF(i) = 0.177;
end
To this
if Kt(i)<=.35
DF(i) = 1.0 - 0.249*Kt(i);
% For Kt > 0.35 and Kt <= 0.75, set the diffuse fraction
elseif Kt(i)>.35 && Kt(i)<=.75
DF(i) = 1.557 - 1.84*Kt(i);
% For Kt > 0.75, set the diffuse fraction
else
DF(i) = 0.177;
end
To make it very clear DF(i) = 1.577 - 1.84*Kt(i);
should be DF(i) = 1.557 - 1.84*Kt(i);
and
elseif Kt(i)>.35 && Kt(i)<.75
should be elseif Kt(i)>.35 && Kt(i)<=.75
All according to Orgill, J. F. and Hollands K. G. T. "Correlation Equation for Hourly Diffuse Radiation on a Horizontal Surface" 1977.
cwhanse commented
Indeed. It appear that code was published when it was not quite done. Many thanks letting us know.