Skip to content

Commit

Permalink
Fixed the error checkings in line_interp and four_pnts_interp
Browse files Browse the repository at this point in the history
  • Loading branch information
Volodymyr Kondratenko authored and Volodymyr Kondratenko committed Mar 16, 2011
1 parent ed2e398 commit d9cfc6e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions wrfv2_fire/phys/module_fr_sfire_core.F
Expand Up @@ -641,16 +641,16 @@ subroutine tign_line_interp(tign1,tign2,lfn1,lfn2,lfn_subcl,tign_subcl,time_now)

err=0.1

if((lfn1.lt.0).AND.(lfn2.lt.0)) then
if((lfn1.le.0).AND.(lfn2.le.0)) then
tign_subcl=0.5*(tign1+tign2)
elseif((lfn1.ge.0).AND.(lfn2.ge.0))then
elseif((lfn1.gt.0).AND.(lfn2.gt.0))then
if ((abs(tign1-time_now).gt.err).or.(abs(tign2-time_now).gt.err)) then
write(*,*)"lfn1,lfn2,tign1,tign2,timenow",lfn1,lfn2,tign1,tign2,time_now
call crash('line_interp: when lfn1(2)>0 their tign1(2) should = time_now')
else
tign_subcl=time_now;
endif
elseif(lfn_subcl.ge.0) then
elseif(lfn_subcl.gt.0) then
tign_subcl=time_now;
else
!lfn_subcl<=0;
Expand Down Expand Up @@ -715,12 +715,12 @@ subroutine tign_four_pnts_interp(tign1,tign2,tign3,tign4,lfn1,lfn2, &
real :: a,b,c,err
err=0.0001
! Case 1
if((lfn1.lt.0).AND.(lfn2.lt.0).AND.(lfn3.lt.0).AND.(lfn4.lt.0)) then
if((lfn1.le.0).AND.(lfn2.le.0).AND.(lfn3.le.0).AND.(lfn4.le.0)) then
tign_subcl=0.25*(tign1+tign2+tign3+tign4)
! Case 2
elseif((lfn1.ge.0).AND.(lfn2.ge.0).AND.(lfn3.ge.0).AND.(lfn4.ge.0))then
elseif((lfn1.gt.0).AND.(lfn2.gt.0).AND.(lfn3.gt.0).AND.(lfn4.gt.0))then
tign_subcl=time_now;
elseif(lfn_subcl.ge.0) then
elseif(lfn_subcl.gt.0) then
tign_subcl=time_now;
else
! Case 3
Expand Down

0 comments on commit d9cfc6e

Please sign in to comment.