SWH Simulations

  • jperez92
  • Topic Author
More
04 Feb 2020 16:07 #7942 by jperez92
SWH Simulations was created by jperez92
Hello,

I am working on a SDK model on python where I update the weather file with data from 624 locations in the state of California. I am trying to retrieve the hourly T_deliv for each node but I am not exactly sure how. The code simulates the swh model for 624 nodes (624 stations where DNI, Tamb, etc. are obtained from) but I am not able to get the T_del for each node. Can someone suggest any ideas please. Thank you. 

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

  • pgilman
More
05 Feb 2020 15:47 #7951 by pgilman
Replied by pgilman on topic SWH Simulations
Hi Julio,

Are you able to read the value of "t_deliv' for a single simulation? Note that the variable name is all lower case.

That variable should be an array of 8760 values.

Best regards,
Paul.

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

  • jperez92
  • Topic Author
More
05 Feb 2020 18:47 #7952 by jperez92
Replied by jperez92 on topic SWH Simulations
Yes, I am only able to get the hourly T_deliv for the last node for some reason. I retrieve the T_deliv via [ T_deliv = ssc.data.get_array(data, 'T_deliv") ] but only for the last node. I need to loop this for each node and retrieve it with would be a matrix of (624 x 8760) but I am not exactly sure how. I hope this is clear enough and thanks in advance. 

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

  • pgilman
More
10 Feb 2020 10:35 #7963 by pgilman
Replied by pgilman on topic SWH Simulations
Hi Julio,

That sounds like it might be caused by your method for building the matrix. It might be an array of nodes, each containing an array of hourly values:

[  [ h0, h2, h3, ..., h8759]  ,  [ h0, h2, h3, ..., h8759] ,  ...  ,  [ h0, h2, h3, ..., h8759]  ]

Thanks,
Paul.

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

  • jperez92
  • Topic Author
More
11 Feb 2020 13:35 #7965 by jperez92
Replied by jperez92 on topic SWH Simulations
Hi Paul,

Exactly!! Do you have any suggestions how I can extract the matrix? Every time each node is ran simulation I should be getting T_deliv (array of 9760) but I am not sure how to loop it within the 'swh' execution. Thanks. 

-Julio

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

  • pgilman
More
12 Feb 2020 10:23 - 12 Feb 2020 10:23 #7973 by pgilman
Replied by pgilman on topic SWH Simulations
Hi Julio,

If I understand your question correctly, your algorithm should look something like the following. I've written this in pseudocode so you will need to write your own code based on it.
Code:
// run simulations and store results // results is an array of size n_nodes x 8760 for i = 0 to n_nodes { set input parameters simulate results[i] = get(t_deliv) } // extract results for i = 0 to length(results) { // results[i] is an array of length 8760 print(results[i]) }

Best regards,
Paul.
Last edit: 12 Feb 2020 10:23 by pgilman.

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

Moderators: pgilman
Powered by Kunena Forum