Linking windfiles in AeroDyn

Dear Bonnie, dear Jason,

I would like to link the XXX.ipt file to an arbitrary folder containing a XXX.wnd file. Unfortunately , as far as I know, it is only possible to link subfolders with XXX.wnd files starting from the folder containing the XXX.ipt file. Is it somehow possible to get it working in the same way as FAST does the linking?
I would change the code on my own, if you could give me a hint where to start.

Best Regards.


All file names in FAST v7.01.00a-bjj are relative to the input file in which they are specified, unless you hard-code the absolute path (i.e., you could specify the wind file as “C:\WindFiles\MyWindFile.wnd”). The FAST input file asks for the name of the AeroDyn input file (so the AeroDyn .ipt file is relative to the FAST file); the wind file is specified in the AeroDyn input file (so the wind file .wnd file is relative to the location of the AeroDyn .ipt file).

If you have a need to change the way this works, you can modify the code without too much trouble. Just look for wherever the NWTC Library subroutine called PathIsRelative is used.

Good morning,

I downloaded FAST v7.02.00 d-bjj and NWTC Library v1.07.00b-mlb last week because I need forces in various nodes (blade and tower). I’d like to work with absolute paths (to the current work directory) in all my input files (AeroDyn and FAST). I did:

          1. I found the subroutine [b]PathIsRelative[/b] in NWTC_IO.f90
          2. I changed this subroutine (just commented some lines -red color-. You can see it below). Thank other proposals.
          3. ???? What's the next step? I think I have to compile NWTC_IO.f90; am I right? If so, what will be the result or the next step? I haven't experience in this issue and I don't know how do it. I can't do any test because I don't have Fortran.

Thanks in advance


FUNCTION PathIsRelative ( GivenFil )

  ! Let's determine in the given file name is absolute or relative.
  ! We'll consider an absolute path one that satisfies one of the
  ! following four criteria:
  !     1) It contains ":/"
  !     2) It contains ":\"
  !     3) It starts with "/"
  !     4) It starts with "\"
  ! All others are considered relative.

  ! Argument declarations.

CHARACTER(*), INTENT(IN) :: GivenFil ! The name of the given file.
LOGICAL :: PathIsRelative ! The function return value

  ! Determine if file name begins with an absolute path name or if it is relative

PathIsRelative = .FALSE.

! IF ( ( INDEX( GivenFil, ‘:/’) == 0 ) .AND. ( INDEX( GivenFil, ‘:’) == 0 ) ) THEN ! No drive is specified (by ‘:’ or ‘:/’)

! IF ( INDEX( ‘/’, GivenFil(1:1) ) == 0 ) THEN ! The file name doesn’t start with ‘’ or ‘/’

! PathIsRelative = .TRUE.



END FUNCTION PathIsRelative ! ( GivenFil )

Best Regards,

Ana Carrillo

You get absolute paths if you start the file name with “/”, “”, or something like “C:”. Unless I misunderstood what you asked, it is not necessary to modify the code.

I agree with Marshall. If you want to use the absolute paths, you only need to specify them in the appropriate input files; no modifying the code is necessary. You can also specify either absolute or relative names for the input file when you call FAST from the command line. For example,

Examples of relative file names:FAST myInputFile.fst FAST ..\myInputFile.fst Examples of absolute file names:FAST C:\MyDir\myInputFile.fst FAST \\\MyDir\myInputFile.fst
In my opinion, It is often more useful to use the relative names in the input files, though. For instance, the latest versions of FAST allow you to specify all of the input files relative to the location of the primary FAST input file. That allows you to (1) run the code from any directory, and (2) easily move input files to another location without having to change all of your input files.

The changes you made in your source code will basically tell the code that all files are relative to the directory you are working in. Instead of changing the code or source files (and then compiling), you could just move your primary FAST input file (.fst) to the directory you want to work in (if it isn’t there already).

Thanks Marshall, thanks Bonnie,

I,ve get to run FAST following your tips but I’d like to say how I was working to help other users. I use the interface FAST-Simulink (I don’t call FAST from the command line) and I’m running all design load cases. Therefore, I have a lot of .fst input files in different directories but I just need, e.g., one .dat tower file (common for all simulations), so if I work with absolute paths I avoid repeated files. I run each simulation from the Command Window of MatLab by a script. My parameter input_fast is a string and contains both the path (absolute to my current work directory) and the file name. If it starts with “/” or “” FAST, obviously, doesn’t find the file; then I tried to type the full path (e.g. C:…) and it worked.

Thanks again,

Best Regards

Ana Carrillo