CEC Files missing

Hey all!

I am having difficulty finding the CEC files needed in Grasshopper. The sam.nrel.gov/libraries link is just a blank page. At one point I thought I had found a link (see bellow) but now this file does not function with the ImportCECPhotovoltaicsModule.

From what I can tell, the issue is caused by a new or different csv column order. Do we have a solution? Is there a plan for an update that will work with the new file format? Or is there a link to updated CEC files? My company relies heavily on this model for use in solar calculations.

In the mean time, I wish to provide a copy of the file we have been using so that others might use it too. This file is not up to date, and is from Early 2019, but seeing as there is no version of it online that I can find, I felt like I should share my stop gap measure. However, I currently can no since I’m still a “new member”. When this Changes I will upload my file.

This seems like a quick and easy fix. Can you share a sample workflow with the file that doesn’t work?

First, I go to https://github.com/NREL/SAM/tree/develop/deploy/libraries and download the cec modules file.

Second, in grasshopper, I insert an ImportCECPhotovoltaicsModule component.

Third, to the file input, I attach a path to the csv file from step one.

Forth, I choose the index of the panel I wish to use.

Please try this file and report back if it works with CEC.csv CEC.gh (370.5 KB)

1 Like

Worked Great, Thanks!

Side idea since you seem to be able to develop this, is it possible you can add a member index in as well? It would be nice to look up a panel by name instead of by index number, that way if the order in the file changes it doesn’t effect the output.

I am not sure if it would be practical to do that since there are thousands of modules in the file.

Hello - I am having a similar issue. Although the fix didn’t work… when i download the CEC.gh file and open the 'CEC Modules.csv" I get the following error:

Current document units is in Millimeters
Conversion to Meters will be applied = 0.001
Runtime error (UnboundLocalException): Local variable ‘mountType_library’ referenced before assignment.

Traceback:
line 256, in main, “”
line 417, in script

Any advice?

Thank you

Hi @djordje , Even i am getting the same error. I downloaded the latest library from github (https://github.com/NREL/SAM/tree/develop/deploy/libraries). Sandia .csv file works fine but CEC .csv file pops out error. Can you help with this. I am attaching the gh files for your convenience.PV_CEC.gh (385.0 KB)

HI @MariaGrimm, @Asisnath,
Can you try using an older CEC library?
Download it as a .csv file from here:

Thanks for the prompt reply @djordje. I am still geting the same error for the old CEC library mentioned above. No luck.

Hi @Asisnath,
It seems @devang made improvements with “Import CEC Photovoltaics Module” component in February this year.

The previous version of the component worked with the old CEC library:


Attached is this v0.68 version from January this year and the CEC library.
CECmodule v0.68.gh (385.1 KB)
samlibrarycecmodules2015630.zip (461.8 KB)

I assume Devang changed the code so that it would support the newest CEC .csv library.

Hello @djordje @devang, After testing above files i concluded that :
1> The CEC component edited by @devang is compaitable to the above .csv file shared. It doesn’t work with the latest .csv file in github (sandia file works fine).
2> The CEC component that has been edited is Version 0.068 and it has not been edited to latest CEC component version 0.069 in github page.
Hope this is sorted out for uninterrupted workflow. Thank you for the help.

1 Like

Hi @Asisnath,
The .gh file I attached (v0.68 January 2020) is the original, non-edited CEC module component.
Glad it worked.

1 Like

@djordje Yes. But the latest version is not working vers 0.0.69 after updating ladybug tools. Have you tried that.

The code has been changed by Devang.

@djordje @maria Hello again. I have edited the component here. I am not aware of how to pull a fix on github page. Thanks for the help .