Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions sorc/ncep_post.fd/UPP_PHYSICS.f
Original file line number Diff line number Diff line change
Expand Up @@ -998,6 +998,7 @@ END SUBROUTINE CALCAPE
!> 2015-??-?? | S Moorthi | Optimization and threading
!> 2021-09-03 | J Meng | Modified to add 0-3km CAPE/CINS, LFC, effective helicity, downdraft CAPE, dendritic growth layer depth, ESP
!> 2021-09-01 | E Colon | Equivalent level height index for RTMA
!> 2022-08-27 | S Trahan | Fixed bug in CALCAPE2 where extreme atmospheric conditions cause an out-of-bounds access
!>
!> @author Russ Treadon W/NP2 @date 1993-02-10
SUBROUTINE CALCAPE2(ITYPE,DPBND,P1D,T1D,Q1D,L1D, &
Expand Down Expand Up @@ -1399,6 +1400,10 @@ SUBROUTINE CALCAPE2(ITYPE,DPBND,P1D,T1D,Q1D,L1D, &
ENDDO
ENDDO
!
!Ensure later calculations do not access LM+1
Comment thread
SamuelTrahanNOAA marked this conversation as resolved.
!
LEND=MIN(LEND,LM-1)
!
!reverse L order from bottom up for ESRH calculation
!
ESRHH = LCL
Expand Down