- Posts: 2
Advised workflow
- Oscar van Laar
- Topic Author
Less
More
29 Sep 2025 06:17 #14315
by Oscar van Laar
Advised workflow was created by Oscar van Laar
Hi all,
I am new to SAM. My project has me run a simulation of a solar array of a certain size with some specific parameters for around 300 different locations. Of these locations I have obtained the weather files and I want to use the yearly electricity generation output for the projects lifetime found in the Cash Flow tab(I found that only PV Residential provides this data). I have tried using PySAM for this purpose, but I can't figure out how to do it. Is silently crashed and does not give me any errors. I also tried to use the LK scripting in SAM but I couldn't figure out how to make that work. Is changing the weather file possible to automate in SAM? What is a good approach for this?
Thanks for any tips you have for me!
Version: 2025.4.26
Model: PV>detailed PV model>distributed>residential owner
Kind regards,
Oscar
I am new to SAM. My project has me run a simulation of a solar array of a certain size with some specific parameters for around 300 different locations. Of these locations I have obtained the weather files and I want to use the yearly electricity generation output for the projects lifetime found in the Cash Flow tab(I found that only PV Residential provides this data). I have tried using PySAM for this purpose, but I can't figure out how to do it. Is silently crashed and does not give me any errors. I also tried to use the LK scripting in SAM but I couldn't figure out how to make that work. Is changing the weather file possible to automate in SAM? What is a good approach for this?
Thanks for any tips you have for me!
Version: 2025.4.26
Model: PV>detailed PV model>distributed>residential owner
Kind regards,
Oscar
Please Log in or Create an account to join the conversation.
- Paul Gilman
Less
More
- Posts: 5652
29 Sep 2025 09:32 #14316
by Paul Gilman
Replied by Paul Gilman on topic Advised workflow
Hi Oscar,
The annual total energy is an output of the financial model that calculates annual cash flows. For the Detailed PV / No Financial configuration, there is no financial model, so the performance model (Detailed PV or Pvsamv1 in this case) runs a simulation over a single year. If you need annual totals over the anlaysis period, you'll need to run a configuration with a financial model.
You can find sample LK scripts in the SAM GitHub repository here: github.com/NREL/SAM/tree/develop/samples/LK%20Scripts%20for%20SAM . The solar-resource-simulate-multiple-files.lk sample script shows two ways to run simulations over multiple weather files.
You should also be able to accomplish this in PySAM. Please send me a copy of your Python script if you would like help troubleshooting it. You can put the .py file and any accompanying file in a .zip file before uploading it here.
Best regards,
Paul.
The annual total energy is an output of the financial model that calculates annual cash flows. For the Detailed PV / No Financial configuration, there is no financial model, so the performance model (Detailed PV or Pvsamv1 in this case) runs a simulation over a single year. If you need annual totals over the anlaysis period, you'll need to run a configuration with a financial model.
You can find sample LK scripts in the SAM GitHub repository here: github.com/NREL/SAM/tree/develop/samples/LK%20Scripts%20for%20SAM . The solar-resource-simulate-multiple-files.lk sample script shows two ways to run simulations over multiple weather files.
You should also be able to accomplish this in PySAM. Please send me a copy of your Python script if you would like help troubleshooting it. You can put the .py file and any accompanying file in a .zip file before uploading it here.
Best regards,
Paul.
Please Log in or Create an account to join the conversation.
Moderators: Paul Gilman