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.
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.
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.
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.
// 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])
}