-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Give more helpful error when n_findex = 0 #1011
Comments
I was originally going to suggest a warning, rather than an error, might be most appropriate; but finally, anyone calling |
How closely is this linked to #1007? Could it be addressed in that PR? |
They could be made to be related, but that one is focused on adding error checks to WindData objects and this one to FlorisModel. We could however make #1007 more general and include fixes to that as well since they are both about dealing with NaNs and then NaNs leading to 0-length inputs |
In my mind, having handling in the WindData objects is more in line with the ethos proposed in #1076. The error raised is clear enough, I think, if the user passes something like wind_rose = WindRose(wind_speeds=[], ...)
fmodel.set(wind_data=wind_rose)
fmodel.run() |
Yes I agree, this will match the pattern described in #1076. I wonder if one PR should address this and those? Seems reasonable right? We could open a template PR with the checklist of fixed it should to include to address which issues and then tick through? |
Give more helpful error when n_findex = 0
Working with FLORIS and FLASC, it can sometimes happen that FLORIS is set to have n_findex = 0 (for example there are no rows in the
FlascDataframe
that is being assigned to FLORIS. In this cases, it could be useful for FLORIS to give a more helpful error. Right now this code (run in the examples folder)Has output:
Proposed solution
Raise an error on
run()
when n_findex = 0?The text was updated successfully, but these errors were encountered: