Hi everyone,

I am trying to get some values using ssc.data_get_number() function in Python. I can get values like

subarray1_gcr,

subarray2_gcr,

subarray1_tilt,

kwh_per_kw, and

annual_energy,

but it didn't work for values like

solar_resource,

subarray1_nstrings,

subarray2_nstrings,

total_inverter_capacity,

annual_ac_inv_clip_loss_percent, etc.

We also have a LK code in which we can use get() function to get all of these values. I want to ask how we can get these values in Python.

Here's part of our Python code.

system_capacity_dc[sim_count] = ssc.data_get_number(data, b'system_capacity')

total_inverter_capacity[sim_count] = ssc.data_get_number(data, b'total_inverter_capacity')

dc_ac_ratio[sim_count] = 0#system_capacity_dc[sim_count] / total_inverter_capacity[sim_count]

annual_ac_inv_clip_loss_percent[sim_count] = ssc.data_get_number(data, b'annual_ac_inv_clip_loss_percent')

poa_shading_loss[sim_count] = ssc.data_get_number(data, b'annual_poa_shading_loss_percent')

res_total_installed_cost[sim_count] = ssc.data_get_number(data, b'total_installed_cost')

And here's part of our LK code.

system_capacity_dc[sim_count]=get('system_capacity');

total_inverter_capacity[sim_count]=get('total_inverter_capacity');

dc_ac_ratio[sim_count] = system_capacity_dc[sim_count]/total_inverter_capacity[sim_count];

annual_ac_inv_clip_loss_percent[sim_count]=get('annual_ac_inv_clip_loss_percent');

poa_shading_loss[sim_count]=get('annual_poa_shading_loss_percent');

total_installed_cost[sim_count] = get('total_installed_cost');

Thanks.

Hello,

I'm not sure exactly what is preventing your code from reading the values of those variables, but here are some things to check:

Your strategy of using LK to test your code and variables is a good one. You can use the data container and module browser in SDKtool to investigate problems with the code because you can quickly see what values of variables are, and what variables are being used.

Best regards,

Paul.