# User defined wind

**URL:** <https://forums.nlr.gov/t/user-defined-wind/2781>\
**Category:** Structural Analysis\
**Created:** [February 22, 2022, 3:21am UTC](https://forums.nlr.gov/t/user-defined-wind/2781 "2022-02-22T03:21:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Li.Kang](https://avatars.discourse-cdn.com/v4/letter/l/c37758/32.png) [@Li.Kang](https://forums.nlr.gov/u/Li.Kang)\
**Post date:** [February 22, 2022, 3:21am UTC](https://forums.nlr.gov/t/user-defined-wind/2781/1 "2022-02-22T03:21:13Z")

</div>

hello ,  
l’m chen,  
i’m going to input my own wind feild into FAST. so i changed the “NRELOffshrBsline5MW\_InflowWind\_12mps” ./ “WindType” to 6.  
so, my question is how can i input my own wind feild?  
if i changed the “WindType” to 6 ,how can FAST read my wind feild?  
do i need to create a new file ?  
how do my input wind feild format must looks like? do the format same as the turbsine output?  
if it’s possible can someone give me a example about user defined windtype that i can follow it .

In short, i’m going to input the wind feild by my own program.i have no idea how can fast read?  
thank you

---

<div class="post-metadata">

**Author:** ![Jason.Jonkman](https://dub1.discourse-cdn.com/nrel/user_avatar/forums.nlr.gov/jason.jonkman/32/3086_2.png) [@Jason.Jonkman](https://forums.nlr.gov/u/Jason.Jonkman)\
**Post date:** [February 22, 2022, 1:42pm UTC](https://forums.nlr.gov/t/user-defined-wind/2781/2 "2022-02-22T13:42:53Z")

</div>

Dear Chen,

If your own wind data is not in one of the standard formats usable by the InflowWind module of OpenFAST (i.e., uniform, TurbSim, Bladed, or HAWC formats), you either convert the format to one of the supported formats, or implement support for your own wind data within the _IfW\_UserWind.f90_ source file. The latter (`WindType` = 6 option) requires that you update the sample _IfW\_UserWind.f90_ source file provided and recompile OpenFAST. See the InflowWind User’s Guide for more information: [https://www.nrel.gov/wind/nwtc/assets/downloads/InflowWind/InflowWind\_Manual.pdf](https://www.nrel.gov/wind/nwtc/assets/downloads/InflowWind/InflowWind_Manual.pdf).

Best regards,

---

<div class="post-metadata">

**Author:** ![Li.Kang](https://avatars.discourse-cdn.com/v4/letter/l/c37758/32.png) [@Li.Kang](https://forums.nlr.gov/u/Li.Kang)\
**Post date:** [February 23, 2022, 7:00am UTC](https://forums.nlr.gov/t/user-defined-wind/2781/3 "2022-02-23T07:00:44Z")

</div>

thank for your reply,  
but i can’t find my IfW\_UserWind.f90 file , can you tell me where it exist ? or i need to download it?  
so the ’ WindType= 6 option ’ will read the file named IfW\_UserWind.f90, and i need to recompile my own wind data that it can read,am i right?  
thank you, i appreciate.

---

<div class="post-metadata">

**Author:** ![Jason.Jonkman](https://dub1.discourse-cdn.com/nrel/user_avatar/forums.nlr.gov/jason.jonkman/32/3086_2.png) [@Jason.Jonkman](https://forums.nlr.gov/u/Jason.Jonkman)\
**Post date:** [February 23, 2022, 1:21pm UTC](https://forums.nlr.gov/t/user-defined-wind/2781/4 "2022-02-23T13:21:53Z")

</div>

Dear Chen,

In the main branch of OpenFAST v3.0, you can find _IfW\_UserWind.f90_ here: [openfast/IfW\_UserWind.f90 at main · OpenFAST/openfast · GitHub](https://github.com/OpenFAST/openfast/blob/main/modules/inflowwind/src/IfW_UserWind.f90). _IfW\_UserWind.f90_ is a source file of OpenFAST; you’ll need to edit this file and recompile OpenFAST to make use of the `WindType` = 6 option.

Best regards,

---

<div class="post-metadata">

**Author:** ![Li.Kang](https://avatars.discourse-cdn.com/v4/letter/l/c37758/32.png) [@Li.Kang](https://forums.nlr.gov/u/Li.Kang)\
**Post date:** [February 24, 2022, 4:11am UTC](https://forums.nlr.gov/t/user-defined-wind/2781/5 "2022-02-24T04:11:33Z")

</div>

thanks for your reply,  
“IfW\_UserWind.f90” is write by fortran , but i don’t have any basic of fortran.  
is there any example that i can follow it?  
i have my own data that is similar to turbine output data,i have a mesh include all the turbine and also the time history of all point in the mesh

---

<div class="post-metadata">

**Author:** ![Jason.Jonkman](https://dub1.discourse-cdn.com/nrel/user_avatar/forums.nlr.gov/jason.jonkman/32/3086_2.png) [@Jason.Jonkman](https://forums.nlr.gov/u/Jason.Jonkman)\
**Post date:** [February 24, 2022, 4:05pm UTC](https://forums.nlr.gov/t/user-defined-wind/2781/6 "2022-02-24T16:05:00Z")

</div>

Dear Chen,

The _IfW\_UserWind.f90_ source file provides a template for you to fill in. The key thing to do is to complete `SUBROUTINE IfW_UserWind_CalcOutput()`. The `Time` and X,Y,Z positions where wind is requested (`PositionXYZ`) are inputs to this routine and the U,V,W velocities at these positions (`Velocity`) are what you you must provide as the output. You may also need to complete other `SUBROUTINE`s such as `IfW_UserWind_Init()` if you need to initialize parameters or read data in from a file or `IfW_UserWind_End()` if you need to deallocate data.

Best regards,
