###################################################################################################################################
# Registry for IfW_UniformWind, creates MODULE IfW_UniformWind_Types
# Module IfW_UniformWind_Types contains all of the user-defined types needed in IfW_UniformWind. It also contains copy, destroy, pack, and
# unpack routines associated with each defined data types.
###################################################################################################################################
# Entries are of the form
# keyword <IfW_UniformWind[/ModuleAbvr]> <TypeName>   <FieldType>    <FieldName>  <Dims>  <Ctrl> <DNAME> <DESCRIP> <UNITS>
###################################################################################################################################

include Registry_NWTC_Library.txt


#########################

typedef IfW_UniformWind/IfW_UniformWind InitInputType CHARACTER(1024) WindFileName      -     -     -     "Name of the wind file to use"                                 -
typedef  ^                       ^                       ReKi         ReferenceHeight   -     -     -     "Hub height of the turbine"                                    meters
typedef  ^                       ^                       ReKi         RefLength         -     -     -     "RefLength of the wind field to use"                           meters
typedef  ^                       ^                       IntKi        SumFileUnit       -     -     -     "Unit number for the summary file (-1 for none).  Provided by IfW." -
typedef  ^                       ^                       LOGICAL      UseInputFile      -   .TRUE.  -     "Flag for toggling file based IO in wind type 2."                -
typedef  ^                       ^                       FileInfoType   PassedFileData  -     -     -     "Optional slot for wind type 2 data if file IO is not used."                -



# Init Output
typedef  ^                       InitOutputType       ProgDesc    Ver               -     -     -     "Version information off HHWind submodule"                     -
typedef  ^                       ^                       DbKi     WindFileDT        -     -     -     "TimeStep of the wind file -- zero value for none"             seconds
typedef  ^                       ^                       ReKi     WindFileTRange    {2}   -     -     "Time range of the wind file"                                  seconds
typedef  ^                       ^                       IntKi    WindFileNumTSteps -     -     -     "Number of timesteps in the time range of wind file"           -
typedef  ^                       ^                       LOGICAL  WindFileConstantDT -    -     -     "Timesteps are the same throughout file"                       -


# ..... Misc/Optimization variables.................................................................................................
# Define any data that are used only for efficiency purposes (these variables are not associated with time):
#   e.g. indices for searching in an array, large arrays that are local variables in any routine called multiple times, etc.
typedef  ^                       MiscVarType          IntKi    TimeIndex         -     0     -     "An Index into the TData array"                                -


# ..... Parameters ................................................................................................................
# Define parameters here:
# Time step for integration of continuous states (if a fixed-step integrator is used) and update of discrete states:
typedef  ^                    ParameterType              ReKi     TData             :     -     -     "Time array from the HH file"                                  seconds
typedef  ^                       ^                       ReKi     DELTA             :     -     -     "HH Wind direction (angle)"                                    degrees
typedef  ^                       ^                       ReKi     Upflow            :     -     -     "HH upflow angle"                                              degrees
typedef  ^                       ^                       ReKi     V                 :     -     -     "HH horizontal wind speed"                                     meters/sec
typedef  ^                       ^                       ReKi     VZ                :     -     -     "wind, including tower shadow, along the Z axis"               meters/sec
typedef  ^                       ^                       ReKi     HSHR              :     -     -     "HH Horizontal linear shear"                                   -
typedef  ^                       ^                       ReKi     VSHR              :     -     -     "HH vertical shear exponent"                                   -
typedef  ^                       ^                       ReKi     VLINSHR           :     -     -     "HH vertical linear shear"                                     -
typedef  ^                       ^                       ReKi     VGUST             :     -     -     "HH wind gust"                                                 -
typedef  ^                       ^                       ReKi     RefHt             -     -     -     "reference height; was HH (hub height); used to center the wind"  meters
typedef  ^                       ^                       ReKi     RefLength         -     -     -     "reference length used to scale the linear shear"              meters
typedef  ^                       ^                       IntKi    NumDataLines      -     -     -     ""                                                             -

# ..... Input (dummy type for extrap/interp routine) ................................................................................................................
#typedef  ^                    InputType                  SiKi     dummy             -     -     -     "dummy type because we need extrap/interp routine if we put the below outputs in the InflowWind type"                            

# ..... Output (for extended AD inputs in linearization) ................................................................................................................
typedef  ^            IfW_UniformWind_Intrp              ReKi     DELTA             -     -     -     "HH Wind direction (angle)"                                    degrees
typedef  ^                       ^                       ReKi     Upflow            -     -     -     "HH upflow angle"                                              degrees
typedef  ^                       ^                       ReKi     V                 -     -     -     "HH horizontal wind speed"                                     meters/sec
typedef  ^                       ^                       ReKi     VZ                -     -     -     "wind, including tower shadow, along the Z axis"               meters/sec
typedef  ^                       ^                       ReKi     HSHR              -     -     -     "HH Horizontal linear shear"                                   -
typedef  ^                       ^                       ReKi     VSHR              -     -     -     "HH vertical shear exponent"                                   -
typedef  ^                       ^                       ReKi     VLINSHR           -     -     -     "HH vertical linear shear"                                     -
typedef  ^                       ^                       ReKi     VGUST             -     -     -     "HH wind gust"                                                 -


