We will be performing a major infrastructure and web site ugprades on Friday, September 27th 8:00 am - 5:00 pm MST (UTC -7).

The website will be down during that time.

Cycle through TMY3 for PV profiles

  • gorman_will
  • Topic Author
More
14 Nov 2017 19:25 #5878 by gorman_will
Cycle through TMY3 for PV profiles was created by gorman_will
I would like to run through all of the US TMY3 locations provided within SAM to generate solar PV profiles for each site. Running through the 1400 sites individually seemed a little too time consuming and I was wondering whether there is a script already out there which cycles through the simulator using some default characteristics to generate a CSV file with the 8760 PV profile.

If not, what is the best way to write such a script with SAM?

Thanks,
Will

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

  • pgilman
More
15 Nov 2017 00:41 #5879 by pgilman
Replied by pgilman on topic Cycle through TMY3 for PV profiles
Dear Will,

Have a look at Sample LK script #7 on the samples page:

sam.nrel.gov/samples

Best regards,
Paul.

Y

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

  • gorman_will
  • Topic Author
More
16 Nov 2017 18:56 #5880 by gorman_will
Replied by gorman_will on topic Cycle through TMY3 for PV profiles
Worked great, thank you Paul! Within this script, is there an easy way to adjust the tilt of the PV panel to equal to the latitude of the weather location?

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

  • pgilman
More
16 Nov 2017 23:49 #5882 by pgilman
Replied by pgilman on topic Cycle through TMY3 for PV profiles
Dear Will,

Yes, you can do that.

For the Detailed PV model, you can just check the Tilt=latitude check box on the System Design page.

For PVWatts, you have to be a little careful because before you run a simulation, the
lat
might store the value that you see on the Location and Resource page, not the value from the weather file. To make sure you are getting the value from the weather file and not from the user interface, you should run a simulation before reading the tilt value like this, assuming you set the weather file before this code snippet:

output('Latitude before simulation: ' + lat);

simulate();
output('Latitude after simulation: ' + lat);

latitude = get('lat');
set('tilt',latitude);

outln('tilt = ' + tilt);
outln('latitude = ' + lat);

simulate();


Best regards,
Paul.

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

  • pgilman
More
16 Nov 2017 23:49 #5881 by pgilman
Replied by pgilman on topic Cycle through TMY3 for PV profiles
Dear Will,

Yes, you can do that.

For the Detailed PV model, you can just check the Tilt=latitude check box on the System Design page.

For PVWatts, you have to be a little careful because before you run a simulation, the
lat
might store the value that you see on the Location and Resource page, not the value from the weather file. To make sure you are getting the value from the weather file and not from the user interface, you should run a simulation before reading the tilt value like this:

// be sure to set the weather file before this code snippet

output('Latitude before simulation: ' + lat); // might be value from user interface instead of weather file

simulate(); // this will set lat to the value from the weather file
output('Latitude after simulation: ' + lat); // should be value from weather file

latitude = get('lat');
set('tilt',latitude);

outln('tilt = ' + tilt);
outln('latitude = ' + lat);

simulate(); // this should generate results with tilt=latitude


Best regards,
Paul.

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

Moderators: pgilman
Powered by Kunena Forum