###################################################################################################################################
# Registry for Waves in the FAST Modularization Framework
# This Registry file is used to create MODULE Waves_Types  which contains all of the user-defined types needed in Waves.
# It also contains copy, destroy, pack,  and unpack routines associated with each defined data types.
# See NWTC Programmer's Handbook for further information on the format/contents of this file.
#
# Entries are of the form
# <keyword> <ModuleName/ModName> <TypeName>  <FieldType> <FieldName> <Dims>   <IO>  <DNAME>  <DESCRIP>   <UNITS>
#
# Use ^ as a shortcut for the value in the same column from the previous line.
###################################################################################################################################

# ...... Include files (definitions from NWTC Library) ............................................................................
# make sure that the file name does not have any trailing white spaces!
include  Registry_NWTC_Library.txt

# ..... Initialization data .......................................................................................................
# Define inputs that the initialization routine may need here:
#   e.g.,  the name of the input file,  the file root name,etc.
#
typedef     Waves/Waves       InitInputType     CHARACTER(1024)      InputFile         -        -        -        "Name of the input file"   -
typedef     ^                 ^                 CHARACTER(1024)      DirRoot           -        -        -        "The name of the root file including the full path.  This may be useful if you want this routine to write a permanent record of what it does to be stored with the simulation results: the results should be stored in a file whose name (including path) is generated by appending any suitable extension to DirRoot." -
typedef     ^                 ^                 CHARACTER(1024)      WvKinFile          -        -        -       "The root name of user input wave kinematics files" -
typedef     ^                 ^                 ReKi                 Gravity           -        -        -        "Gravitational acceleration"  (m/s^2)
typedef     ^                 ^                 integer              nGrid             3        -        -        "Grid dimensions"
typedef     ^                 ^                 INTEGER              WaveNDir          -        -        -        "Number of wave directions [only used if WaveDirMod = 1] [Must be an odd number -- will be adjusted within the waves module]"     (-)
typedef     ^                 ^                 SiKi                 WaveDirSpread     -        -        -        "Spreading coefficient [WaveMod=2,3,4 and WaveDirMod=1]"   -
typedef     ^                 ^                 SiKi                 WaveDirRange      -        -        -        "Range of wave directions (full range: WaveDir +/- WaveDirRange/2) [only used if WaveMod=6]"   (degrees)
typedef     ^                 ^                 DbKi                 WaveDT            -        -        -        "Time step for incident wave calculations"   (sec)
typedef     ^                 ^                 SiKi                 WaveHs            -        -        -        "Significant wave height of incident waves"  (meters)
typedef     ^                 ^                 LOGICAL              WaveNDAmp         -        -        -        "Flag for normally-distributed amplitudes in incident waves spectrum [flag]"  -
typedef     ^                 ^                 SiKi                 WavePhase         -        -        -        "Specified phase for regular waves"    (radians)
typedef     ^                 ^                 SiKi                 WavePkShp         -        -        -        "Peak shape parameter of incident wave spectrum [1.0 for Pierson-Moskowitz]"  -
typedef     ^                 ^                 DbKi                 WaveTMax          -        -        -        "Analysis time for incident wave calculations; the actual analysis time may be larger than this value in order for the maintain an effecient FFT"  (sec)
typedef     ^                 ^                 SiKi                 WaveTp            -        -        -        "Peak spectral period of incident waves"  (sec)
typedef     ^                 ^                 INTEGER              NWaveElevGrid     -        -        -        "Number of grid points where the incident wave elevations are computed (the XY grid point locations)"  -
typedef     ^                 ^                 INTEGER              NWaveKinGrid      -        -        -        "Number of grid points where the incident wave kinematics will be computed"  -
typedef     ^                 ^                 SiKi                 WaveKinGridxi     {:}      -        -        "xi-coordinates for grid points where the incident wave kinematics will be computed (grid points); these are relative to the mean sea level"  (meters)
typedef     ^                 ^                 SiKi                 WaveKinGridyi     {:}      -        -        "yi-coordinates for grid points where the incident wave kinematics will be computed (grid points); these are relative to the mean sea level"  (meters)
typedef     ^                 ^                 SiKi                 WaveKinGridzi     {:}      -        -        "zi-coordinates for grid points where the incident wave kinematics will be computed (grid points); these are relative to the mean sea level"  (meters)
typedef     ^                 ^                 SiKi                 CurrVxi           {:}      -        -        "xi-component of the current velocity at elevation i" (m/s)
typedef     ^                 ^                 SiKi                 CurrVyi           {:}      -        -        "yi-component of the current velocity at elevation i" (m/s)
typedef     ^                 ^                 SiKi                 PCurrVxiPz0       -        -        -        "xi-component of the partial derivative of the current velocity at elevation near mean sea level"  (m/s)
typedef     ^                 ^                 SiKi                 PCurrVyiPz0       -        -        -        "yi-component of the partial derivative of the current velocity at elevation near mean sea level"  (m/s)
typedef     ^                 ^   NWTC_RandomNumber_ParameterType    RNG               -        -        -        "Parameters for the pseudo random number generator"  -
typedef     ^                 ^                 INTEGER              ConstWaveMod      -        -        -        "Mode of the constrained wave" -
typedef     ^                 ^                 SiKi                 CrestHmax         -        -        -        "crest height or double the crest elevation" m
typedef     ^                 ^                 SiKi                 CrestTime         -        -        -        "time of the wave crest" sec
typedef     ^                 ^                 SiKi                 CrestXi           -        -        -        "xi-coordinate for the wave crest" m
typedef     ^                 ^                 SiKi                 CrestYi           -        -        -        "yi-coordinate for the wave crest" m
typedef     ^                 ^                 INTEGER              WaveFieldMod      -        -        -        "Wave field handling (-) (switch) 0: use individual SeaState inputs without adjustment, 1: adjust wave phases based on turbine offsets from farm origin"   -
typedef     ^                 ^                 ReKi                 PtfmLocationX     -        -        -        "Supplied by Driver:  X coordinate of platform location in the wave field"    "m"
typedef     ^                 ^                 ReKi                 PtfmLocationY     -        -        -        "Supplied by Driver:  Y coordinate of platform location in the wave field"    "m"

# Define outputs from the initialization routine here:
#
typedef     ^                 InitOutputType    INTEGER              WaveNDir          -        -        -        "Number of wave directions [only used if WaveDirMod = 1] [Must be an odd number -- will be adjusted within the waves module]"     (-)
typedef     ^                 InitOutputType    DbKi                 WaveTMax          -        -        -        "Analysis time for incident wave calculations; the actual analysis time may be larger than this value in order for the maintain an effecient FFT"  (sec)

