Getting irradproc to run, or, best workflow for using pv6parmod?

  • sfrank
  • Topic Author
More
10 Jul 2015 14:45 #3519 by sfrank
I'd like to use the pv6parmod module to do some script-based parametric analysis of PV module performance, and I am trying to figure out the best workflow for this. Based on the variable names in the various modules, the logical order seems to be:

1. wfreader
2. irradproc
3. pv6parmod

However, I've not been able to get this workflow to work for me; the irradproc module is failing. Here's my sample code:

/** Configuration **/
// Clear all variables
clear();

// Weather file
var('file_name', 'C:/SAM/2015.1.30/solar_resource/USA CO Denver Centennial [golden - Nrel] (TMY3).csv');

// Model configuration
var('irrad_mode', 0);
var('sky_model', 2);
//var('albedo_const', 0.2);

// Array Configuration
var('track_mode', 0);
var('azimuth', 180);
var('tilt', 10);

/** Calculate POA Irradiance **/
// Read weather data then calculate POA irradiance
run('wfreader');
run('irradproc'); // Fails... why?

Using this, I get the rather cryptic error:

Error: check fail: reason unassigned referenced, with 'irrad_mode!' for: beam time -1.000000
EXEC_FAIL: irradproc

This sounds like an unassigned variable, but the error doesn't say which one, and as far as I can tell all the required variables for irradproc are assigned in the data container. What I am missing?

(Note: I'm testing this with SDKtool on Windows, 64-bit, SDK release 2015-1-30).

Alternative question: is there a better workflow for getting the required irradiance inputs for pv6parmod?

EDIT: I just saw that SAM 2015-06-30 is out, so I downloaded and tried it as well. Same error.

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

  • Paul Gilman
More
10 Jul 2015 15:59 #3520 by Paul Gilman
Hi Steve,
I think the problem may be that you have not assigned values to all of the 21 inputs for irradproc. The wfreader module sets the value of some of those inputs (beam, diffuse, lat, lon, etc.) but not others (track_mode, rotlim, etc.)
After you run the script in SDKtool (even if it generates an error), look in the data container to see what variables have assigned values, and use the module browser to see what the required inputs are for each module in your script.
Best regards,

Paul.

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

  • sfrank
  • Topic Author
More
10 Jul 2015 16:24 #3521 by sfrank
Right; I have checked through the list. I set 'irrad_mode' and 'sky_model' (even though they have defaults) as well as 'track_mode', 'azimuth', and 'tilt'. It appears that everything else either (a) has a default, (b) is an output from wfreader, or (c) is not required for the set inputs I specified. However, I still get the error.

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

  • sfrank
  • Topic Author
More
10 Jul 2015 16:28 #3522 by sfrank
Also, I would upload the script, but apparently the .lk extension is not a permitted file type for upload. Here is my updated test script. Note that I tried putting in values for the optional 'gcr' and 'albedo_const' variables with no change in error message.

/** Configuration **/
// Clear all variables
clear();

// Weather file
var('file_name', 'C:/SAM/2015.6.30/solar_resource/USA CO Denver Centennial [golden - Nrel] (TMY3).csv');

// Model configuration
var('irrad_mode', 0);
var('sky_model', 2);
//var('albedo_const', 0.2);

// Array Configuration
var('track_mode', 0);
var('azimuth', 180);
var('tilt', 10);
//var('gcr', 0.50259);

/** Calculate POA Irradiance **/
// Read weather data then calculate POA irradiance
run('wfreader');
run('irradproc'); // Fails... why?

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

  • ndiorio
10 Jul 2015 22:34 #3523 by ndiorio
Hi Steve,

You've helped identify a parsing bug in SAM that has now been fixed. For the time being, please use the following modification and your script should run. Note, I believe you also need to define 'gcr':

var('irrad_mode!', 0);

Thanks,
Nick DiOrio

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

  • sfrank
  • Topic Author
More
15 Jul 2015 17:35 #3524 by sfrank
That worked; thanks!

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

Moderators: Paul Gilman
Powered by Kunena Forum