Skip to content

Commit

Permalink
Bug fix in allocating tower elevation array (#201)
Browse files Browse the repository at this point in the history
* Check for tower nodes before allocating data

* Bug fix in the travis ci macos configuration

* Resolve a merge conflict
  • Loading branch information
rafmudaf authored Nov 13, 2018
1 parent db89762 commit 75d0ca8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions modules-local/aerodyn/src/AeroDyn.f90
Original file line number Diff line number Diff line change
Expand Up @@ -231,14 +231,14 @@ subroutine AD_SetInitOut(p, InputFileData, InitOut, errStat, errMsg)
end do

!Tower data
ALLOCATE(InitOut%TwrElev(p%NumTwrNds), STAT = ErrStat2)
IF (ErrStat2 /= 0) THEN
CALL SetErrStat(ErrID_Fatal,"Error allocating memory for TwrElev.", ErrStat, ErrMsg, RoutineName)
RETURN
END IF
InitOut%TwrElev(:) = InputFileData%TwrElev(:)

IF ( p%NumTwrNds > 0 ) THEN
ALLOCATE(InitOut%TwrElev(p%NumTwrNds), STAT = ErrStat2)
IF (ErrStat2 /= 0) THEN
CALL SetErrStat(ErrID_Fatal,"Error allocating memory for TwrElev.", ErrStat, ErrMsg, RoutineName)
RETURN
END IF
InitOut%TwrElev(:) = InputFileData%TwrElev(:)

ALLOCATE(InitOut%TwrDiam(p%NumTwrNds), STAT = ErrStat2)
IF (ErrStat2 /= 0) THEN
CALL SetErrStat(ErrID_Fatal,"Error allocating memory for TwrDiam.", ErrStat, ErrMsg, RoutineName)
Expand Down

0 comments on commit 75d0ca8

Please sign in to comment.