Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

fast_output_file ERROR #43

Closed
kpramng opened this issue Oct 12, 2022 · 3 comments
Closed

fast_output_file ERROR #43

kpramng opened this issue Oct 12, 2022 · 3 comments

Comments

@kpramng
Copy link

kpramng commented Oct 12, 2022

Hi,

I ran the script fast_output_file.py but ran into the below error. I was trying to read a *.out file to data frame or excel. The *.out file is attached below.

The error message also said CSVFile not available, but I have kept the folder structure as shown below.

image

image

I am pasting the contents of .out below

Predictions were generated on 10-Oct-2022 at 17:59:31 using OpenFAST, compiled as a 64-bit application using single precision at commit v3.1.0
linked with NWTC Subroutine Library; ElastoDyn; InflowWind; AeroDyn; ServoDyn

Description from the FAST input file: FAST Certification Test #18: NREL 5.0 MW Baseline Wind Turbine (Onshore)

Time Wind1VelX Wind1VelY Wind1VelZ OoPDefl1 IPDefl1 TwstDefl1 BldPitch1 Azimuth RotSpeed GenSpeed TTDspFA TTDspSS TTDspTwst Spn2MLxb1 Spn2MLyb1 RootFxb1 RootFyb1 RootFzb1 RootMxb1 RootMyb1 RootMzb1 RotTorq LSSGagMya LSSGagMza YawBrFxp YawBrFyp YawBrFzp YawBrMxp YawBrMyp YawBrMzp TwrBsFxt TwrBsFyt TwrBsFzt TwrBsMxt TwrBsMyt TwrBsMzt GenPwr GenTq
(s) (m/s) (m/s) (m/s) (m) (m) (deg) (deg) (deg) (rpm) (rpm) (m) (m) (deg) (kN-m) (kN-m) (kN) (kN) (kN) (kN-m) (kN-m) (kN-m) (kN-m) (kN-m) (kN-m) (kN) (kN) (kN) (kN-m) (kN-m) (kN-m) (kN) (kN) (kN) (kN-m) (kN-m) (kN-m) (kW) (kN-m)
0.0000 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 1.210E+01 1.174E+03 0.000E+00 0.000E+00 0.000E+00 3.499E+00 -1.214E+01 1.391E+01 -6.403E-01 4.527E+02 4.838E+00 1.258E+02 -5.664E-07 -5.593E-05 -1.924E+03 -4.249E+01 1.286E+01 -7.880E-02 -3.320E+03 -1.172E+00 -3.984E+02 3.943E-05 -1.505E+01 2.315E-02 -6.727E+03 -4.483E-01 -3.413E+02 3.943E-05 5.000E+03 4.309E+01

@ebranlard
Copy link
Collaborator

Hi @kpramng

Make sure you followed the steps listed here (in particular the pip install) :
https://github.com/OpenFAST/python-toolbox#installation-and-testing

From any folder, you should be able to run:

from pyFAST.input_output import FASTOutputFile
f = FASTOutputFile('5MW.out')  #<<<< Put the relative/absolute path to you .out file here
df = f.toDataFrame()

If you still have issue, let us know.

@kpramng
Copy link
Author

kpramng commented Oct 12, 2022

Hi @ebranlard

Thanks a lot for getting back.
I tried 2 things:

Try 1:

I followed the steps mentioned in https://github.com/OpenFAST/python-toolbox#installation-and-testing and then tried the code in https://github.com/OpenFAST/python-toolbox/blob/main/pyFAST/input_output/fast_summary_file.py but gave the error as shown below:
image

image


Try 2

**But, when I tried the code as shown below it ran with the .out file pasted below named as "5MW_Land_BD_Linear.out (Figure 1)"
from pyFAST.input_output import FASTOutputFile f = FASTOutputFile('5MW.out') #<<<< Put the relative/absolute path to you .out file here df = f.toDataFrame()

I couldn't upload the .out file so pasting a screen shot of it (Figure 1) (and hence messed up, sorry for that).
But when I ran the same code with the out file (screen shot in Figure 2), it failed with the error ValueError: Shape of passed values is (39, 1), indices imply (39, 39) is that because of the .out format?

Figure 1
image

Figure 2
image

@ebranlard
Copy link
Collaborator

ebranlard commented Oct 13, 2022

Hi,

It's a bit hard to figure this out without having access to the out file.
The r-test repository of openfast contains several .out and .outb files. You can for instance download the two here:
https://github.com/OpenFAST/r-test/tree/main/glue-codes/openfast/5MW_Land_DLL_WTurb/linux-gnu

At first, let's not use Spyder and make sure it works in your anaconda terminal, where you installed pyFAST.
Launch python (type python in the terminal) and try the following:

from pyFAST.input_output import FASTOutputFile
f = FASTOutputFile('5MW_Land_DLL_WTurb.out')
df = f.toDataFrame()

If this works, but doesn't work with your out file, then we can figure out a way for you to send the out file to us.
If this doesn't work, please report your version of python, and of your packages (pip list).
If we are unlucky, maybe it's something related to the 'locale' settings on your machine.

Keep us in touch
Emmanuel

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants