PAN to SAM macro automation

  • Andy Berrios
  • Topic Author
More
10 Feb 2023 11:58 #11914 by Andy Berrios
PAN to SAM macro automation was created by Andy Berrios
Hi everyone! 

I am curious if anyone has tried to write a python script to batch process a large volume of PVSyst PAN files using the PAN to SAM macro. We are currently trying to process our 3rd-party file database for internal use.

Can this macro be called from the command line? Any experience anyone can share in this regard would be greatly appreciated!

All the best, -AB

Please Log in or Create an account to join the conversation.

  • Paul Gilman
More
14 Feb 2023 00:33 #11925 by Paul Gilman
Replied by Paul Gilman on topic PAN to SAM macro automation
Hi AB,

The best approach for this might be to translate the "PVsyst OND - PAN to SAM.lk" script from LK into Python. LK is a C-like scripting language, so someone familar with both C/C++ and Python should be able to do a translation.

To see the macro's LK script in SAM, click View code on the Macro page. You could also modify the LK script to do a batch conversion.

See the "Macros and Scripting" Help topic for more about LK and macros, and for steps for running a macro from the command line: samrepo.nrelcloud.org/help/macros.htm

There are a couple of SAM-related Python scripts in the SAM GitHub repository (github.com/NREL/SAM/tree/patch/samples/Python%20Scripts). If anyone does write a Python script for this and wants to share it, we would be happy to post it there.

Best regards,
Paul.

p.s. There are separate Python samples for PySAM here: github.com/NREL/pysam/tree/main/Examples.
 

Please Log in or Create an account to join the conversation.

  • Andy Berrios
  • Topic Author
More
14 Feb 2023 15:00 #11926 by Andy Berrios
Replied by Andy Berrios on topic PAN to SAM macro automation
Hi Paul, thank you for the reply and the provided references. We'll delve deeper into this! Best wishes! -AB

Please Log in or Create an account to join the conversation.

Moderators: Paul Gilman
Powered by Kunena Forum