Changeset 3642 for palm/trunk/SOURCE


Ignore:
Timestamp:
Dec 23, 2018 11:20:22 PM (3 years ago)
Author:
knoop
Message:

Bugfix: prevent index out of bound error in radiation model

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/radiation_model_mod.f90

    r3636 r3642  
    87728772        k = len(TRIM(var))
    87738773        j = len(TRIM(dirname(i)))
    8774         IF ( TRIM(var(k-j+1:k)) == TRIM(dirname(i)) )  THEN
    8775             ids = i
    8776             idsint_u = dirint_u(ids)
    8777             idsint_l = dirint_l(ids)
    8778             var = var(:k-j)
    8779             EXIT
     8774        IF ( k-j+1 >= 1_iwp ) THEN
     8775           IF ( TRIM(var(k-j+1:k)) == TRIM(dirname(i)) )  THEN
     8776               ids = i
     8777               idsint_u = dirint_u(ids)
     8778               idsint_l = dirint_l(ids)
     8779               var = var(:k-j)
     8780               EXIT
     8781           ENDIF
    87808782        ENDIF
    87818783    ENDDO
Note: See TracChangeset for help on using the changeset viewer.