NREL / ROSCO

A Reference Open Source Controller for Wind Turbines
https://rosco.readthedocs.io/en/latest/
Apache License 2.0
99 stars 91 forks source link

`interp2d` has been removed in SciPy 1.14.0 #361

Open mfekrysaidahmed opened 1 week ago

mfekrysaidahmed commented 1 week ago

Description

I found this error while running "03_tune_controller.py"

Current Solution

Downgrade to scipy-1.13.1

Current behavior

` >>>> python 03_tune_controller.py Using ofTools in rosco.toolbox...

Loading wind turbine data for NREL's ROSCO tuning and simulation processeses


Tuning a reference wind turbine controller using NREL's ROSCO toolbox

Loading FAST model: NREL-5MW.fst Loading rotor performace data from text file: /home/ROSCO/Examples/Test_Cases/NREL-5MW/Cp_Ct_Cq.NREL5MW.txt Loading rotor performace data from text file: /home/ROSCO/Examples/Tune_Cases/../Test_Cases/NREL-5MW/Cp_Ct_Cq.NREL5MW.txt Traceback (most recent call last): File "/home/ROSCO/Examples/03_tune_controller.py", line 45, in controller.tune_controller(turbine) File "/home/ROSCO/rosco/toolbox/controller.py", line 224, in tune_controller Cp_above_rated = turbine.Cp.interp_surface(0,TSR_above_rated[0]) # Cp during rated operation (not optimal). Assumes cut-in bld pitch to be 0 File "/home/ROSCO/rosco/toolbox/turbine.py", line 673, in interp_surface interp_fun = interpolate.interp2d( File "/home/.conda/envs/rosco-env/lib/python3.10/site-packages/scipy/interpolate/_interpolate.py", line 129, in init raise NotImplementedError(err_mesg) NotImplementedError: interp2d has been removed in SciPy 1.14.0.

For legacy code, nearly bug-for-bug compatible replacements are RectBivariateSpline on regular grids, and bisplrep/bisplev for scattered 2D data.

In new code, for regular grids use RegularGridInterpolator instead. For scattered data, prefer LinearNDInterpolator or CloughTocher2DInterpolator.

For more details see https://scipy.github.io/devdocs/tutorial/interpolate/interp_transition_guide.html `

dzalkind commented 3 days ago

Thanks! You have identified the current workaround: conda install scipy=1.13

We will work on a fix in the meantime.

Dan