Skip to content

3D Shade Calculator generates UI callback error #1678

@cpaulgilman

Description

@cpaulgilman

Describe the bug

SAM displays a UI callback error after shade data is generated by 3D Shade Calculator.

To Reproduce

  1. Create a Detailed PV / Residential case.
  2. On the Shading and Layout page, click Open 3D shade calculator.
  3. Add an active surface to the shade scene.
  4. Click Save and close.
  5. Click Yes to answer both prompts.
  6. Note callback error.
Could not evaluate callback function:edit_3d_scene->on_change
[221]: error in call to 'value()': data type mismatch attempting to set 'subarray1_shading' (number) to { string_option=0 en_timestep=1 timestep=[ [ 100 ], [ 100 ], [ 100 ], [ 100 ], [ 100 ], [ 100 ], [ 100 ], [ 100 ], [ 0 ], [ 0 ], [ 0 ], [ 0 ], [ 0 ], [ 0 ], [ 0 ], [ 0 ], [ 0 ], [ 100 ], [ 100 ], [ 100 ], [ 100 ], [ 100 ], [ 100 ], [ 100 ], [ 100 ], [ 100 ], [ 100 ], [ 100 ], [ 100 ], [ 100 ], [ 100 ], [ 100 ], [ 0 ], [ 0 ], [ 0 ], [ 0 ], [ 0 ], [ 0 ], [ 0 ], [ 0 ], [ 0 ], [ 0 ], [194]: eval error in statement list
[113]: eval error in statement list
[97]: eval error in statement list

Expected behavior

Time series shade data should be applied to each subarray as appropriate.

Operating System and Version

  • OS: Windows 11
  • Version: SAM 2023.12.17

Workaround Solution

A workaround is to run a shade analysis in the 3D shade calculator, export the time series results to CSV, and copy and paste the resulting shade data from the CSV file to the time series shade table in SAM.

  1. In the 3D Shading Calculator, click Analyze.
  2. On the Analyze tab, click Time series analysis.
  3. Enter the simulation time step in minutes (this should be the same as the weather file time step): 60 for hourly, 15 for 15-minute, etc.
  4. When you see the "Time series shading ([n] scenes in [t] ms)," click OK.
  5. Save the .csv file. This file contains information about the location, time stamps, and the shading data.
  6. Open the file in a spreadsheet program like Excel.
  7. Select and copy (ctrl-C) the shading data in Column E. Be sure to select only the shading data: For hourly data this should be a single column of 8760 rows.
  8. In SAM, close the 3D Shade Calculator by clicking the "x" at the top corner of the window (or the appropriate circle to close the window in Mac and Linux versions). Do not save and close.
  9. On the Shading and Layout page, click Edit shading for the appropriate subarray.
  10. Check Enable beam irradiance shading losses by time step to expand the panel with the beam shading loss table.
  11. Choose the appropriate options for the time step, enable partial shading, and number of strings in subarray.
  12. Click Paste to paste the data you copied from the CSV file. This should paste values between 0 and 100 in the table.
  13. Click OK.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions