Skip to content

Commit 31427ed

Browse files
committed
FF: handle out and outb files
1 parent c42f200 commit 31427ed

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

openfast_toolbox/fastfarm/postpro/ff_postpro.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,13 @@ def readTurbineOutput(caseobj, dt_openfast, dt_processing=1, saveOutput=True, ou
206206
turbs_t=[]
207207
for t in np.arange(iTurbine, fTurbine, 1):
208208
print(f'Processing Condition {cond}, Case {case}, Seed {seed}, turbine {t+1}')
209-
ff_file = os.path.join(caseobj.path, caseobj.condDirList[cond], caseobj.caseDirList[case], f'Seed_{seed}', f'{_get_fstf_filename(caseobj)}.T{t+1}.outb')
209+
ff_file = os.path.join(caseobj.path, caseobj.condDirList[cond], caseobj.caseDirList[case], f'Seed_{seed}', f'{_get_fstf_filename(caseobj)}.T{t+1}')
210+
if os.path.isfile(ff_file+'.outb'):
211+
ff_file = ff_file + '.outb'
212+
elif os.path.isfile(ff_file+'.out'):
213+
ff_file = ff_file + '.out'
214+
else:
215+
raise ValueError(f'ERROR: neither output file {ff_file}.out[b] exists. ')
210216
df = FASTOutputFile(ff_file).toDataFrame()
211217
# Won't be able to send to xarray if columns are non-unique
212218
if not df.columns.is_unique:

0 commit comments

Comments
 (0)