Closed ckm47 closed 1 year ago
Good catch! It must have come from a misinterpretation of the old code in EnergyPlus:
ESky = (0.787 + 0.764 * std::log(TDewK / TKelvin)) * (1.0 + 0.0224 * OSky - 0.0035 * pow_2(OSky) + 0.00028 * pow_3(OSky));
@nealkruis Was this fixed in https://github.com/bigladder/kiva/pull/58? Should it be closed?
Indeed! Thanks, @shorowit!
If Kiva uses the Clark and Allen + Walton Eplus implementation then I believe line 212 of src/kiva/WeatherData.cpp should be
double eSky = 0.787 + 0.764 * log(Tdp / 273) * (1 + 0.0224 * fc - 0.0035 * pow(fc, 2) + 0.00028 * pow(fc, 3));
Instead of
double eSky = 0.787 + 0.764 * log(Tdp / Tdb) * (1 + 0.0224 * fc - 0.0035 * pow(fc, 2) + 0.00028 * pow(fc, 3));