-
Notifications
You must be signed in to change notification settings - Fork 512
Closed
Description
Bug description
Within the FAST_AllocateTurbines routine, the Turbine data structure is allocated using the c/c++ convention of index 0 start (Turbine(0:NumTurbines-1). However, elsewhere in the OpenFAST library code, the indexing to this array of derived types is assumed to start at 1 (Turbine(1:NumTurbines)). This has caused issues with checkpoint files not getting closed when called from AMR-Wind (see Exawind/amr-wind#984).
I propose we remedy this by:
- Changing the name of
ExternInitData%TurbineIDto ExternInitData%TurbIDforNameto properly reflect the usage of this variable. This variable is only ever used to set the name of the output file (_i.e._SimName.T0.out`). This variable may be allowed to be 0 or larger. - All data storage for turbine data within OpenFAST will use the Fortran indexing starting at index 1.
- Arguments passed from c/c++ for a turbine ID will be incremented by 1 to match the internal indexing used by OpenFAST.
- Update any documentation about this indexing
Since the name is generated from ExternInitData%TurbIDforName, it is completely independent of the internal data storage array indexing method.
This should correct the issue with closing checkpoint files from AMR-Wind.
Reactions are currently unavailable