Skip to content

Use calculated DNI for Allen method when there is no DNI in weather file#1126

Merged
mjprilliman merged 2 commits into
patchfrom
allen-method-dni-decomp
Feb 12, 2024
Merged

Use calculated DNI for Allen method when there is no DNI in weather file#1126
mjprilliman merged 2 commits into
patchfrom
allen-method-dni-decomp

Conversation

@mjprilliman

@mjprilliman mjprilliman commented Jan 25, 2024

Copy link
Copy Markdown
Collaborator

-Fixes #1123
-Fixes NatLabRockies/SAM#1685
-Check for nan for weather file DNI, use calculated DNI as alternative

@mjprilliman mjprilliman added bug pv photovoltaic, pvsam, pvwatts labels Jan 25, 2024
@mjprilliman mjprilliman added this to the 2023 Release Patch 1 milestone Jan 25, 2024
@mjprilliman mjprilliman self-assigned this Jan 25, 2024

@cpaulgilman cpaulgilman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The simulation runs without crashing now, but the subhourly clipping loss seems very high. This is for the default Detailed PV / No Financial model with the weather file attached below:

image

Weather file used for testing:

38.13_-86.34_psm3-tmy_60_tmy_no_dni.zip

@mjprilliman

Copy link
Copy Markdown
Collaborator Author

The simulation runs without crashing now, but the subhourly clipping loss seems very high. This is for the default Detailed PV / No Financial model with the weather file attached below:

image

Weather file used for testing:

38.13_-86.34_psm3-tmy_60_tmy_no_dni.zip

Which Irradiance data option did you use for these results? I'm having trouble replicating results.

@cpaulgilman

Copy link
Copy Markdown
Collaborator

I'm not seeing those results now. Perhaps I was in the wrong version of SAM. Please ignore my previous comment.

However, I am getting an exception in cmod_pvsamv1.cpp when I run a simulation with the default DNI+DHI option with the weather file that has no DNI data. The release version of SAM 2023.12.17 correctly generates an SSC error message, so I think this may have been introduced in this branch:

image

@mjprilliman

Copy link
Copy Markdown
Collaborator Author

I'm not seeing those results now. Perhaps I was in the wrong version of SAM. Please ignore my previous comment.

However, I am getting an exception in cmod_pvsamv1.cpp when I run a simulation with the default DNI+DHI option with the weather file that has no DNI data. The release version of SAM 2023.12.17 correctly generates an SSC error message, so I think this may have been introduced in this branch:

image

Paul, I caught that error too, apologies for not updating. I am working on a fix and will push shortly.

@cpaulgilman

Copy link
Copy Markdown
Collaborator

That will fix NatLabRockies/SAM#1685

@cpaulgilman cpaulgilman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good now. I tested weather file with no DNI with and without subhourly clipping. I'll work on the UI change for NatLabRockies/SAM#1666 next.

@mjprilliman mjprilliman merged commit 5061b0a into patch Feb 12, 2024
@mjprilliman mjprilliman deleted the allen-method-dni-decomp branch February 12, 2024 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

added to release notes bug pv photovoltaic, pvsam, pvwatts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Detailed PV model crashes for weather file with no DNI Allen model not working when weather file has no DNI

2 participants