FAST: Error in AeroDyn/AD_WindVelocityWithDisturbance()


I have problems with FAST compiled to use a BladedDLL as controller. I am using Intel Fortran compiler 9.1 with Microsoft Inkremental Linker 9.00.
Then I simulated a wind turbine first with TwrPotent activated, then with TwrPotent deactivated. The first runs fine for the whole 600s, the second stops at 131s. Both simulations look fine until they stop (rpm and pitch angles are not going unstable, but look rather well).

[code] Running FAST (v7.00.00a-bjj, 31-Mar-2010).
Linked with NWTC Subroutine Library (v1.02.00, 16-Mar-2010).


Aerodynamic loads calculated using AeroDyn (v13.00.00a-bjj, 31-Mar-2010).
Heading of the AeroDyn input file: XXXXXXXXXXXXXXXXXXXXXXXXXX

Assuming Wind\Windfile.wnd is a binary FF wind file.

Reading a 14x14 grid (96 m wide, 47.45 m to 143.45 m above ground) with a characterstic wind
speed of 14 m/s.
Processed 14538 time steps of 20-Hz full-field data (726.85 seconds).

Timestep: 131 of 600 seconds. Estimated final completion at 09:18:58.
Error: FF wind array was exhausted at 131.79 seconds (trying to access data at 0 seconds).
Error getting velocity in AeroDyn/AD_WindVelocityWithDisturbance().

Aborting FAST.

I looked into the source code and found the error source to be in FFWind.f90, FUNCTION FF_Interp(…), around line 2000. There I changed the error message to give some more information:

CALL WrScr( ' Error: FF wind array was exhausted at '//TRIM( Flt2LStr( REAL( TIME, ReKi ) ) )// & ' seconds (trying to access data at '//TRIM( Flt2LStr( REAL( TimeShifted, ReKi ) ) )// & ' seconds at position '//TRIM( Flt2LStr( REAL( Position(1), ReKi ) ) )// & '. TGRID='//TRIM( Flt2LStr( REAL( TGRID, ReKi ) ) )// & ' ITLO='//TRIM( Int2LStr( INT( ITLO ) ) )//'.' )
After compiling again, the error is:

Error: FF wind array was exhausted at 131.79 seconds (trying to access data at 0 seconds at position 0. TGRID=0 ITLO=-2147483647. Error getting velocity in AeroDyn/AD_WindVelocityWithDisturbance().
I am new to Fortran, so I hope I used the correct formatting functions for printing the variables. If I am correct the variables are:
TIME = 131.79
TimeShifted = 0
Position(1) = 0
ITLO = -2147483647

If you now look at the formulas to calculate the values there seem to happen strange things:
TimeShifted = TIME + ( FFYHWid - Position(1) )*InvMFFWS
= 131.79 + (96/2 - 0) * 1/14 = 135.21 but FAST tells me that is 0 ?!

TGRID = TimeShiftedFFRate = 0??? = 0 seems to be correct

ITLO = INT( TGRID ) + 1 = INT(0)+1 = 1 but FAST tells me thats -2147483647

Can anybody tell me what is happening here?

Thank you very much in advance,


I just simulated the 1.5MW Turbine delivered with FAST and run into the same problem for one out of 27 windfiles. If you are interested, I can upload that wind file.

Best regards,


I installed Intel Fortran Compiler 11.0 and recompiled FAST. Things have changed now, the error-message is:

Timestep: 231 of 600 seconds. Estimated final completion at 11:13:52. Error: FF wind array was exhausted at 231.52 seconds (trying to access data at NaN seconds at position NaN. TGRID=NaN ITLO=-2147483647. Error getting velocity in AeroDyn/AD_WindVelocityWithDisturbance().

So FUNCTION FF_Interp(…) gets a NaN in Position(1) and the calculations in FF_Interp() are correct. So back to the error source in
AeroSubs.f90, FUNCTION AD_WindVelocityWithDisturbance( InputPosition, ErrStat ).
This function is called with InputPosition(1) == NaN. I changed the error to a warning and made it more verbose to print the exact position. So I found out that the position is [NaN, NaN, NaN]

How does it happen, that AD_WindVelocityWithDisturbance is called with x-Position NaN, if TwrPotent is not activated?

Best regards,

By the way: How do you debug fortran code? Which IDE do you recommend?

Hi, Felix.

I’ve never seen this error so I don’t know what the problem is. My first thought was that IVF 9.1 was causing a problem, but it looks like there is also a problem when you compile with IVF 11.0. You could look at the time-series output and/or the position input of the AD_WindVelocityWithDisturbance() function for one element (either the first blade element or whatever particular blade element first produces the error). Here are some other questions that may help us figure out what’s going on:

Do you get this error only with the code you have compiled, or does the FAST v7.00.00a-bjj executable from the web also produce an error? Have you tried using the executable for the Bladed-style DLL interface here:
Have you tried to compile in what Microsoft Visual Studio calls the “debug” configuration (turning off optimizations using /Od and adding lots of warnings, array checking, etc.)?
If the problem is only when TwrPotent is .TRUE., what are the other inputs in your AeroDyn input file?
Could the problem be coming from the Bladed-style controller?
Is there only one particular wind file causing the problem?

You might also consider changing the error messages to print using the following syntax (temporarially, during your debugging) instead of calling WrScr():

print *, "TIME = ", Time print *, "Position = ", Position

and so forth. That will avoid calling more subroutines (and potentially adding other sources of errors).

I still use Microsoft Visual Studio .NET 2003 to compile, though I’ll likely have to upgrade soon. I have used the debugger in it a couple of times, but I typically just add some extra print statements or write an extra output file if I need to debug. I’m sure other people have better suggestions!

Hi Bonnie,

first of all, the error occures only when TwrPotent is .FALSE, using the new tower model in FAST 7.0.
I tried the executable with the Bladed-style DLL interface from your website. It runs into the same error.
Next I used Test13.fst from the FAST archive with the controller in pitch.ipt and the same windfile - now error happens. So one might argue the problem is caused by my controller-DLL. However I can’t see any instability. The output of my controller is smooth.

I did not compile with a debug configuration, I am just using the compile-fast-batch-file. There are a few wind files which produce that error. I can avoid it by regenerating these files with different seeds. This is what I have done, as I currently do not have a lot of time to look into that issue.

Thank you for your help so far,


I have to admit that the controller I was useing might have been the reason for the problem. In very rare cases it did return NaN or Inf. Of course FAST was not happy with that and got stuck with the errors mentioned before.