How can I get hourly data using "data_get_array" command in MATLAB?

  • Ablimit
  • Topic Author
More
10 Jan 2019 03:14 #6592 by Ablimit
Hello,

I was about to run several thousands of simulations on concentrated solar power (CSP) by using SSC in MATLAB. Although I was able to retrieve annual data from the Data Container with "data_get_number" command, I couldn't retrieve any hourly data with "data_get_array" command. Yes, I could get the hourly data from SAM, but I don't want to do that as I'm about to run a huge number of simulations and need to reprocess data with MATLAB. Is it because the names of the hourly variables in the Data Container are different from the ones in SAM?

I would really appreciate if anyone could provide a guide.

Thank you,
Ablimit

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

  • Paul Gilman
More
24 Jan 2019 17:20 #6593 by Paul Gilman
Dear Ablimit,

You should be able to get the hourly data. You can use the SDKtool to see a list of all input and output variables for the different compute modules. For most of the performance models in SAM, including the CSP models, the output variable
gen
is the hourly or subhourly electric power generated by the system.

For the
tcstrough_physical
module, the variables
W_net
and
W_cycle_gross
are the net and gross cycle output, respectively.

Best regards,
Paul.

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

  • Avery Wendell
More
09 Jan 2020 04:18 #7869 by Avery Wendell
Paul in python, "gen" does in fact pull the KWh, but is there an accompanying array of dates and hours? If so, how do I pull that?

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

  • Paul Gilman
More
09 Jan 2020 18:05 - 09 Jan 2020 18:06 #7870 by Paul Gilman
Hi Avery,

The gen array is single value of kW values with no timestamps.

If you are running one of the solar energy modules (pvsamv1, pvwattsv5, trough_physical, etc. and need to know the year, month, day, hour, and minute time stamp values used for the sun position calculations, you can get the time stamp value from the weather file.

Otherwise, SAM assumes that the first row of gen is the first time stamp on Monday, January 1. For an hourly simulation, that would be the hour ending at 1 am on January 1. It does not account for daylight savings time or leap years.

Best regards,
Paul.
Last edit: 09 Jan 2020 18:06 by Paul Gilman.

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

  • Avery Wendell
More
09 Jan 2020 18:21 #7871 by Avery Wendell
Thank you so much for the response! This is an amazing tool
I could not find the documentation for "gen" anywhere. Is ther documentation about what you can call for 
"data_get_array" or "data_get_number?"

Thanks again,

Avery.

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

  • Paul Gilman
More
13 Jan 2020 17:32 #7880 by Paul Gilman
Hi Avery,

The SSC input and output variables are not very well documented. Here are a few suggestions for learning about what the variables represent:

1. Use the SDKtool as described on the SDK webpage .
2. Use the variable documentation functions described in Section 3.4 of the SSC Guide (see link under Documentation on the SDK webpage .
3. Use the SAM desktop application to run simulations and explore the variables on the input pages and results page.

All of that said, the variable 'gen' is a time series array of the electrical output in kW of the power system you are modeling. Its value may be negative for some time steps. For example, a PV system's inverter may consume power at night, resulting in a negative value of gen for night-time time steps.

Best regards,
Paul.

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

Moderators: Paul Gilman
Powered by Kunena Forum