Skip to content

Commit

Permalink
fixes: restore err=0, pval initialized, fix psi-to-chi typo
Browse files Browse the repository at this point in the history
  • Loading branch information
KarinaAsmar-NOAA committed Jan 2, 2025
1 parent eebe362 commit 83d9d19
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sorc/ncep_post.fd/UPP_PHYSICS.f
Original file line number Diff line number Diff line change
Expand Up @@ -4886,9 +4886,11 @@ SUBROUTINE CALCHIPSI (UWND,VWND,CHI,PSI)
do jj=1,300
call exch(psi(ista_2l:iend_2u,jsta_2l:jend_2u))
ptmp=psi
err=0
do j=jsta,jend
do i=ista,iend
if (j>1 .and. j<jm) then
pval=psi(i,j)
psi(i,j) = 0.25*(ptmp(i-1,j)+ptmp(i+1,j)+ptmp(i,j-1)+ptmp(i,j+1))-atmp(i,j)
edif=psi(i,j)-pval
edif=abs(edif)
Expand Down Expand Up @@ -4927,11 +4929,13 @@ SUBROUTINE CALCHIPSI (UWND,VWND,CHI,PSI)
do jj=1,300
call exch(chi(ista_2l:iend_2u,jsta_2l:jend_2u))
ptmp=chi
err=0
do j=jsta,jend
do i=ista,iend
if (j>1 .and. j<jm) then
pval=chi(i,j)
chi(i,j) = 0.25*(ptmp(i-1,j)+ptmp(i+1,j)+ptmp(i,j-1)+ptmp(i,j+1))-dtmp(i,j)
edif=psi(i,j)-pval
edif=chi(i,j)-pval
edif=abs(edif)
err=max(edif,err)
endif
Expand Down

0 comments on commit 83d9d19

Please sign in to comment.