Skip to content

Commit

Permalink
Comment out negative time error in SetTimeIndex subroutine
Browse files Browse the repository at this point in the history
  • Loading branch information
hkross committed Dec 23, 2024
1 parent 0dfd571 commit 78fc824
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions modules/seastate/src/SeaSt_WaveField.f90
Original file line number Diff line number Diff line change
Expand Up @@ -836,10 +836,10 @@ subroutine SetTimeIndex(Time, deltaT, nMax, Indx_Lo, Indx_Hi, isopc, ErrStat, Er
isopc = -1.0
Indx_Lo = 0
Indx_Hi = 0
if ( Time < 0.0_DbKi ) then
CALL SetErrStat(ErrID_Fatal,'Time value must be greater than or equal to zero!',ErrStat,ErrMsg,'SetTimeIndex') !error out if time is outside the lower bounds
RETURN
end if
!if ( Time < 0.0_DbKi ) then
! CALL SetErrStat(ErrID_Fatal,'Time value must be greater than or equal to zero!',ErrStat,ErrMsg,'SetTimeIndex') !error out if time is outside the lower bounds
! RETURN
!end if

! if there are no timesteps, don't proceed
if (EqualRealNos(deltaT,0.0_ReKi) .or. deltaT < 0.0_ReKi) return;
Expand All @@ -850,7 +850,7 @@ subroutine SetTimeIndex(Time, deltaT, nMax, Indx_Lo, Indx_Hi, isopc, ErrStat, Er
! wrap it back to index 0, if Indx_Lo = 11 we want to wrap back to index 1.

Tmp = real( (Time/ real(deltaT,DbKi)) ,ReKi)
Tmp = MOD(Tmp,real((nMax), ReKi))
Tmp = MODULO(Tmp,real((nMax), ReKi))
Indx_Lo = INT( Tmp ) ! convert REAL to INTEGER

isopc = 2.0_ReKi * (Tmp - REAL(Indx_Lo , ReKi)) - 1.0_ReKi ! convert to value between -1 and 1
Expand Down

0 comments on commit 78fc824

Please sign in to comment.