I'm trying to reproduce the code here using a 'CECMod' module instead of a 'SandiaMod' module
So, instead of instantiating sandia_modules = pvlib.pvsystem.retrieve_sam('SandiaMod'), I do sandia_modules = pvlib.pvsystem.retrieve_sam('CECMod').
However, the CECMod DataFrame has fewer rows than the SandiaMod DataFrame. As such, there are some rows in SandiaMod (like A[0], A1, A[2], A[3], A[4], B[0], etc.) that don't occur in CECMod. Unfortunately, those rows are utilized to calculate the effective irradiance, and thus the ultimate energy output of our system. Since CECMod has incomplete information, the energy output cannot be calculated. That means none of the modules in CECMod can be used to calculate the energy output of the system using this method.
Can someone direct me toward a way to calculate energy output that is compatible with modules in the CECMod DataFrame?
I had the same issue and I solved in the following way:
Import dependencies:
Use Temperature_Model_parameters in order to set model at the top level.
Here I set up module and inverter regarding to my system you should be able to change this according to your cec_module and inversor
then declare your location variables
instance a Location class:
declare variables for the configuration of your system
Instance a PVSystem class with your variables declared:
then instance a ModelChain class:
At this point you already have simulated your system but now you have to declare your weather forecast model and your time variables in order to get the power otput.
import dependencies related to forecast models:
get and process data from the forecast model:
Now this is the tricky part, in order to use the .run_model method, you need a pandas.DataFrame with weather data:
You should use .T method in order to transpose the data according to the weather parameter required in .run_model method
Now use .run_model method with weather dataframe as parameter:
then you can now use .ac, .dc and some other methods for your modelChain instance: