NREL / ROSCO

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

Rosco walkthrough - jupiter notebook run error #270

Closed TordMalmei closed 1 year ago

TordMalmei commented 1 year ago

Hi, I'm trying to run the ROSCO_walkthrough. I get the error: ValueError: invalid literal for int() with base 10: '"NRELOffshrBsline5MW_Onshore_ServoDyn.dat"'. (SEE BELOW). What is the problem? I have ROSCO 2.8


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

Loading FAST model: NREL-5MW.fst

ValueError Traceback (most recent call last)

in 4 path_params['FAST_InputFile'], 5 os.path.join('../Tune_Cases/',path_params['FAST_directory']), ----> 6 rot_source='txt',txt_filename=os.path.join('../Tune_Cases/',path_params['FAST_directory'],path_params['rotor_performance_filename']) 7 ) ~\Anaconda3\envs\GEOF105\lib\site-packages\ROSCO_toolbox\turbine.py in load_from_fast(self, FAST_InputFile, FAST_directory, FAST_ver, dev_branch, rot_source, txt_filename) 180 fast.FAST_InputFile = FAST_InputFile 181 fast.FAST_directory = FAST_directory --> 182 fast.execute() 183 184 if txt_filename: ~\Anaconda3\envs\GEOF105\lib\site-packages\ROSCO_toolbox\ofTools\fast_io\FAST_reader.py in execute(self) 396 def execute(self): 397 --> 398 self.read_MainInput() 399 self.read_ElastoDyn() 400 self.read_ElastoDynBlade() ~\Anaconda3\envs\GEOF105\lib\site-packages\ROSCO_toolbox\ofTools\fast_io\FAST_reader.py in read_MainInput(self) 482 self.fst_vt['Fst']['DT_Out'] = float_read(f.readline().split()[0]) 483 self.fst_vt['Fst']['TStart'] = float_read(f.readline().split()[0]) --> 484 self.fst_vt['Fst']['OutFileFmt'] = int(f.readline().split()[0]) 485 self.fst_vt['Fst']['TabDelim'] = bool_read(f.readline().split()[0]) 486 self.fst_vt['Fst']['OutFmt'] = f.readline().split()[0][1:-1] ValueError: invalid literal for int() with base 10: '"NRELOffshrBsline5MW_Onshore_ServoDyn.dat"'
dzalkind commented 1 year ago

Hi,

I'm not able to reproduce your error. Have you changed any of the input files in Test_Cases/ or the input in Tune_Cases/ from the base repository?

Can you confirm that the main OpenFAST file you are trying to read in this step looks like this file?

Are you pointing your jupyter notebook to the correct conda rosco environment?

Best, Dan

TordMalmei commented 1 year ago

Hi, Dan I haven't changed anything in the files and I use the exact same file as you link to. I also use the rosco-environment.

dzalkind commented 1 year ago

Can you try with the latest main branch and install a new environment using python setup.py develop instead of install? I suspect there's a mismatch between your OpenFAST input and the file reader.

TordMalmei commented 1 year ago

Hi, now it works! Thank you so much!