Skip to content

Commit

Permalink
Use decomposed DNI when weather file DNI not available for allen
Browse files Browse the repository at this point in the history
clipping correction
  • Loading branch information
mjprilliman committed Jan 25, 2024
1 parent d4dfcee commit b6fa37d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ssc/cmod_pvsamv1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1971,7 +1971,12 @@ void cm_pvsamv1::exec()
PVSystem->p_poaDiffuseFrontCS[nn][idx] = (ssc_number_t)(ignddiff_csky);
PVSystem->p_poaRearCS[nn][idx] = (ssc_number_t)(ipoa_rear_after_losses_cs[nn]);
if (dni_cs != 0) {
PVSystem->p_DNIIndex[nn][idx] = (ssc_number_t)(Irradiance->p_weatherFileDNI[idx] / dni_cs);
if (!isnan(Irradiance->p_weatherFileDNI[idx])) {
PVSystem->p_DNIIndex[nn][idx] = (ssc_number_t)(Irradiance->p_weatherFileDNI[idx] / dni_cs);
}
else {
PVSystem->p_DNIIndex[nn][idx] = (ssc_number_t)(Irradiance->p_IrradianceCalculated[2][idx] / dni_cs);
}
}
else {
PVSystem->p_DNIIndex[nn][idx] = 0;
Expand Down

0 comments on commit b6fa37d

Please sign in to comment.