- Posts: 7
Mermoud Lejeune IAM cubic spline option causes Splinter error
- Joe_Hack
- Topic Author
Less
More
20 Dec 2018 16:46 #6567
by Joe_Hack
Mermoud Lejeune IAM cubic spline option causes Splinter error was created by Joe_Hack
Hello-
I recently implemented the Mermoud-LeJeune model into code a colleague and I use to run pv simulations. We want to use the parameter "mlm_IAM_mode" to put in our own IAM profile, and so we set 'mlm_IAM_mode' to 3, then put in arrays for 'mlm_IAM_c_cs_incAngle' and 'mlm_IAM_c_cs_iamValue'.
ssc.data_set_number(data, b'mlm_IAM_mode', 3)
ssc.data_set_number(data, b'mlm_IAM_c_as', 0.04)
ssc.data_set_number(data, b'mlm_IAM_c_sa0', 0)
ssc.data_set_number(data, b'mlm_IAM_c_sa1', 0)
ssc.data_set_number(data, b'mlm_IAM_c_sa2', 0)
ssc.data_set_number(data, b'mlm_IAM_c_sa3', 0)
ssc.data_set_number(data, b'mlm_IAM_c_sa4', 0)
ssc.data_set_number(data, b'mlm_IAM_c_sa5', 0)
ssc.data_set_array(data, b'mlm_IAM_c_cs_incAngle', [0.0,30.0,40.0,50.0,60.0,70.0,75.0,80.0,85.0,90.0])
ssc.data_set_array(data, b'mlm_IAM_c_cs_iamValue', [1.0,0.999,0.995,0.987,0.962,0.892,0.816,0.681,0.44,0.0])
ssc.data_set_number(data, b'mlm_groundRelfectionFraction', 0.2)
However, the code above always fails, throwing the error:
terminate called after throwing an instance of 'SPLINTER::Exception'
what(): knotVectorMovingAverage: Only 1 unique interpolation points are given. A minimum of degree+1 = 4 unique points are required to build a B-spline basis of degree 3.
Aborted
I've tried passing in explicit arrays and numpy arrays in float and double datatypes in addition to lists, but I always get this error. I've looked into the splinter python code and splinter tests implemented in the release branch of ssc in splinter_test.cpp, but haven't been able to find the error.
Thank you
I recently implemented the Mermoud-LeJeune model into code a colleague and I use to run pv simulations. We want to use the parameter "mlm_IAM_mode" to put in our own IAM profile, and so we set 'mlm_IAM_mode' to 3, then put in arrays for 'mlm_IAM_c_cs_incAngle' and 'mlm_IAM_c_cs_iamValue'.
ssc.data_set_number(data, b'mlm_IAM_mode', 3)
ssc.data_set_number(data, b'mlm_IAM_c_as', 0.04)
ssc.data_set_number(data, b'mlm_IAM_c_sa0', 0)
ssc.data_set_number(data, b'mlm_IAM_c_sa1', 0)
ssc.data_set_number(data, b'mlm_IAM_c_sa2', 0)
ssc.data_set_number(data, b'mlm_IAM_c_sa3', 0)
ssc.data_set_number(data, b'mlm_IAM_c_sa4', 0)
ssc.data_set_number(data, b'mlm_IAM_c_sa5', 0)
ssc.data_set_array(data, b'mlm_IAM_c_cs_incAngle', [0.0,30.0,40.0,50.0,60.0,70.0,75.0,80.0,85.0,90.0])
ssc.data_set_array(data, b'mlm_IAM_c_cs_iamValue', [1.0,0.999,0.995,0.987,0.962,0.892,0.816,0.681,0.44,0.0])
ssc.data_set_number(data, b'mlm_groundRelfectionFraction', 0.2)
However, the code above always fails, throwing the error:
terminate called after throwing an instance of 'SPLINTER::Exception'
what(): knotVectorMovingAverage: Only 1 unique interpolation points are given. A minimum of degree+1 = 4 unique points are required to build a B-spline basis of degree 3.
Aborted
I've tried passing in explicit arrays and numpy arrays in float and double datatypes in addition to lists, but I always get this error. I've looked into the splinter python code and splinter tests implemented in the release branch of ssc in splinter_test.cpp, but haven't been able to find the error.
Thank you
Please Log in or Create an account to join the conversation.
- sjanzou
Less
More
- Posts: 22
10 Jan 2019 02:49 #6568
by sjanzou
Replied by sjanzou on topic Mermoud Lejeune IAM cubic spline option causes Splinter error
The SPLINTER::Exception has been fixed in the patch branch of ssc and will be in the next patch to SAM and ssc. Your example has been added to the cmod_pvyield_test.cpp unit test in ssc. The fix is in lib_mlmodel.cpp line 153.
Let us know if you have any additional questions
Let us know if you have any additional questions
Please Log in or Create an account to join the conversation.
Moderators: pgilman