NREL / floris

A controls-oriented engineering wake model.
http://nrel.github.io/floris
BSD 3-Clause "New" or "Revised" License
215 stars 156 forks source link

Add test of nans in inputs to wind data objects #1007

Open paulf81 opened 1 month ago

paulf81 commented 1 month ago

Add tests of nans in inputs to wind data objects

Working with flasc, it's possible to generate data series where wind_directions or wind_speeds contain NaN values, in flasc this typically signifies missing or faulty data. However within the WindData objects in FLORIS, the presense of NaNs in certain inputs can yield ambiguous errors. Further, since inputs like wind_directions and wind_speeds within WindData objects will be used to drive FlorisModel simulations, containing NaN values will further generate additional errors at that point.

This pull request adds a check at inputs to of WindData objects that input arrays wind_directions, wind_speeds, turbulence_intensities and values do not contain NaN values. Some additional tests are added to confirm correct behavior.