Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
12 changes: 8 additions & 4 deletions sorc/ncep_post.fd/MDL2SIGMA.f
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,9 @@ SUBROUTINE MDL2SIGMA
AHF =D00
FAC =D00
DONEFSL1=.TRUE.
ELSEIF(T(I,J,NL1XF(I,J))<SPVAL &
& .AND. Q(I,J,NL1XF(I,J))<SPVAL)THEN
ELSEIF(NL1XF(I,J)<LP1) THEN
IF(T(I,J,NL1XF(I,J))<SPVAL &
& .AND. Q(I,J,NL1XF(I,J))<SPVAL)THEN
Comment thread
WenMeng-NOAA marked this conversation as resolved.
Outdated
!== B =T(I,J,NL1XF(I,J)) !Marina Tsidulko Dec22, 2003
B =T(I,J,NL1XF(I,J))*(H1+D608*Q(I,J,NL1XF(I,J)))
DENOM=(ALPINT(I,J,NL1XF(I,J)+1)-ALPINT(I,J,NL1XF(I,J)-1))
Expand All @@ -287,6 +288,7 @@ SUBROUTINE MDL2SIGMA
/DENOM !Marina Tsidulko Dec22, 2003
FAC =H2*LOG(PMID(I,J,NL1XF(I,J)))
DONEFSL1=.TRUE.
END IF
END IF
!
if(DONEFSL1)FSL1(I,J)=(PNL1-PFSIGO)/(PFSIGO+PNL1) &
Expand Down Expand Up @@ -656,8 +658,9 @@ SUBROUTINE MDL2SIGMA
TSLDONE=.TRUE.
!
!
ELSEIF(T(I,J,NL1XF(I,J))<SPVAL &
& .AND. Q(I,J,NL1XF(I,J))<SPVAL)THEN
ELSEIF(NL1XF(I,J)<LP1) THEN
IF(T(I,J,NL1XF(I,J))<SPVAL &
& .AND. Q(I,J,NL1XF(I,J))<SPVAL)THEN
Comment thread
SamuelTrahanNOAA marked this conversation as resolved.
Outdated
!
! INTERPOLATION BETWEEN LOWER AND UPPER BOUNDS.
!
Expand All @@ -674,6 +677,7 @@ SUBROUTINE MDL2SIGMA
/DENOMF !Marina Tsidulko Dec22, 2003
!
DONEFSL1=.TRUE.
ENDIF
ENDIF
!
IF(DONEFSL1)then
Expand Down
12 changes: 6 additions & 6 deletions sorc/ncep_post.fd/MISCLN.f
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,7 @@ SUBROUTINE MISCLN

CALL FDLVL(ITYPEFDLVL,T7D,Q7D,U7D,V6D,P7D,ICINGFD,AERFD)
!
DO 10 IFD = 1,NFD
loop_10: DO IFD = 1,NFD
!
! FD LEVEL TEMPERATURE.
iget1 = IGET(059)
Expand Down Expand Up @@ -1328,7 +1328,7 @@ SUBROUTINE MISCLN
ENDIF
ENDIF

10 CONTINUE
END DO loop_10
DEALLOCATE(T7D,Q7D,U7D,V6D,P7D,ICINGFD,AERFD)
ENDIF

Expand Down Expand Up @@ -1807,7 +1807,7 @@ SUBROUTINE MISCLN

!
! LOOP OVER NBND BOUNDARY LAYERS.
DO 20 LBND = 1,NBND
boundary_layer_loop: DO LBND = 1,NBND
!
! BOUNDARY LAYER PRESSURE.
IF (IGET(067)>0) THEN
Expand Down Expand Up @@ -2118,7 +2118,7 @@ SUBROUTINE MISCLN
ENDIF
!
! END OF ETA BOUNDARY LAYER LOOP.
20 CONTINUE
END DO boundary_layer_loop
deallocate(OMGBND,PWTBND,QCNVBND)
!
! BEST LIFTED INDEX FROM BOUNDARY LAYER FIELDS.
Expand Down Expand Up @@ -2208,7 +2208,7 @@ SUBROUTINE MISCLN
ENDDO
ENDDO
!
DO 80 LBND = 1,NBND
loop_80: DO LBND = 1,NBND
CALL CALTHTE(PBND(ista,jsta,LBND),TBND(ista,jsta,LBND), &
QBND(ista,jsta,LBND),EGRID1)
!$omp parallel do private(i,j)
Expand All @@ -2223,7 +2223,7 @@ SUBROUTINE MISCLN
ENDIF
ENDDO
ENDDO
80 CONTINUE
ENDDO loop_80
!
DPBND = 0.
CALL CALCAPE(ITYPE,DPBND,P1D,T1D,Q1D,LB2,EGRID1, &
Expand Down
3 changes: 3 additions & 0 deletions sorc/ncep_post.fd/UPP_PHYSICS.f
Original file line number Diff line number Diff line change
Expand Up @@ -1320,6 +1320,9 @@ SUBROUTINE CALCAPE2(ITYPE,DPBND,P1D,T1D,Q1D,L1D, &
THUNDER(I,J) = .FALSE.
ENDIF
ENDIF

! Limit LCL to prevent out-of-bounds accesses later
LCL(I,J) = max(min(LCL(I,J),LM-1),1)
Comment thread
WenMeng-NOAA marked this conversation as resolved.
ENDDO
ENDDO
!-----------------------------------------------------------------------
Expand Down