Skip to content

Commit

Permalink
rm debug prints
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Mandel committed Oct 30, 2010
1 parent 1d574d3 commit 161aa29
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 30 deletions.
40 changes: 20 additions & 20 deletions wrfv2_fire/phys/module_fr_sfire_core.F
Original file line number Diff line number Diff line change
Expand Up @@ -201,27 +201,27 @@ subroutine ignite_fire( ifds,ifde,jfds,jfde, & ! fire domain
ax=coord_xf(i,j)
ay=coord_yf(i,j)

print *,'IGNA',i,j,lfn(i,j),tign(i,j)
! print *,'IGNA',i,j,lfn(i,j),tign(i,j)
! get d= distance from the nearest point on the ignition segment
! and time_ign = the ignition time there
call nearest(d,time_ign,ax,ay,sx,sy,st,ex,ey,et,cx2,cy2)
dmax=max(d,dmax)
dmin=min(d,dmin)

lfn_new=d - min( radius, ros*(end_ts - time_ign) ) ! lft at end_ts
print *,'IGN:',i,j,d,time_ign,lfn_new
! print *,'IGN:',i,j,d,time_ign,lfn_new
if(.not.lfn_new>0.) then
ignited=ignited+1 ! count
endif
if(lfn(i,j)>0. .and. .not. lfn_new > 0.) then
tign(i,j)=time_ign + ros*d ! newly ignited now
!$OMP CRITICAL(SFIRE_CORE_CRIT)
write(msg,'(a,2i6,a,2g13.6,a,f10.2,a,2f10.2,a)')'IGN ignited cell ',i,j,' at',ax,ay, &
' time',tign(i,j),' in [',start_ts,end_ts,']'
call message(msg)
write(msg,'(a,g10.3,a,f10.2,a,2f10.2,a)')'IGN distance',d,' from ignition line at',time_ign,' in [',st,et,']'
call message(msg)
!$OMP END CRITICAL(SFIRE_CORE_CRIT)
!!$OMP CRITICAL(SFIRE_CORE_CRIT)
! write(msg,'(a,2i6,a,2g13.6,a,f10.2,a,2f10.2,a)')'IGN ignited cell ',i,j,' at',ax,ay, &
! ' time',tign(i,j),' in [',start_ts,end_ts,']'
! call message(msg)
! write(msg,'(a,g10.3,a,f10.2,a,2f10.2,a)')'IGN distance',d,' from ignition line at',time_ign,' in [',st,et,']'
! call message(msg)
!!$OMP END CRITICAL(SFIRE_CORE_CRIT)
if(tign(i,j) < start_ts)then
!$OMP CRITICAL(SFIRE_CORE_CRIT)
write(msg,'(a,2i6,a,f11.6,a,f11.6)')'IGN ',i,j, &
Expand All @@ -231,7 +231,7 @@ subroutine ignite_fire( ifds,ifde,jfds,jfde, & ! fire domain
endif
endif
lfn(i,j)=min(lfn(i,j),lfn_new) ! update the level set function
print *,'IGNZ',i,j,lfn(i,j),tign(i,j)
! print *,'IGNZ',i,j,lfn(i,j),tign(i,j)

enddo
enddo
Expand Down Expand Up @@ -280,10 +280,10 @@ SUBROUTINE nearest(d,t,ax,ay,sx,sy,st,ex,ey,et,cx2,cy2)
character(len=128):: msg
!*** executable

11 format('IGN ',6(a,g17.7,1x))
12 format('IGN ',4(a,2g13.7,1x))
write(*,12)'find nearest to [',ax,ay,'] from [',sx,sy,'] [',ex,ey,']' ! DEB
write(*,12)'end times',st,et,' scale squared',cx2,cy2 ! DEB
!11 format('IGN ',6(a,g17.7,1x))
!12 format('IGN ',4(a,2g13.7,1x))
! write(*,12)'find nearest to [',ax,ay,'] from [',sx,sy,'] [',ex,ey,']' ! DEB
! write(*,12)'end times',st,et,' scale squared',cx2,cy2 ! DEB

! midpoint m = (mx,my)
mx = (sx + ex)*0.5
Expand All @@ -305,20 +305,20 @@ SUBROUTINE nearest(d,t,ax,ay,sx,sy,st,ex,ey,et,cx2,cy2)
cy = (ey + sy)*0.5 + mcrel*(ey - sy)*0.5 ! interpolate to c by going from m
d=sqrt((ax-cx)*(ax-cx)*cx2+(ay-cy)*(ay-cy)*cy2) ! |a-c|^2
t = (et + st)*0.5 + mcrel*(et - st)*0.5 ! interpolate to c by going from m
write(*,11)'nearest at mcrel=',mcrel,' from middle, t=',t ! DEB
write(*,12)'nearest is [',cx,cy,']' ! DEB
! write(*,11)'nearest at mcrel=',mcrel,' from middle, t=',t ! DEB
! write(*,12)'nearest is [',cx,cy,']' ! DEB
elseif(am_es>0)then ! if cos > 0, closest is e
d = sqrt((ax-ex)*(ax-ex)*cx2+(ay-ey)*(ay-ey)*cy2) ! |a-e|
t = et
write(*,12)'nearest is [',ex,ey,']' ! DEB
! write(*,12)'nearest is [',ex,ey,']' ! DEB
else ! closest is s
d = sqrt((ax-sx)*(ax-sx)*cx2+(ay-sy)*(ay-sy)*cy2) ! |a-s|
t = st
write(*,12)'nearest is [',sx,sy,']' ! DEB
! write(*,12)'nearest is [',sx,sy,']' ! DEB
endif

write(*,11)'distance d=',d,' interpolated time t=',t ! DEB
write(*,11)'dam2=',dam2,'des2=',des2,'dames=',dames,'am_es=',am_es,'cos2=',cos2,'dmc2=',dmc2 ! DEB
! write(*,11)'distance d=',d,' interpolated time t=',t ! DEB
! write(*,11)'dam2=',dam2,'des2=',des2,'dames=',dames,'am_es=',am_es,'cos2=',cos2,'dmc2=',dmc2 ! DEB
END SUBROUTINE nearest


Expand Down
12 changes: 2 additions & 10 deletions wrfv2_fire/phys/module_fr_sfire_model.F
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,6 @@ subroutine sfire_model ( &

call check_mesh_2dim(ifts-1,ifte+1,jfts-1,jfte+1,ifms,ifme,jfms,jfme)

print *,'entry ifun=',ifun,' lfn(168,84)=',lfn(168,84),loc(lfn(168,84))

xifms=ifms ! dimensions for the include file
xifme=ifme
xjfms=jfms
Expand Down Expand Up @@ -263,7 +261,6 @@ subroutine sfire_model ( &

if(.not. freeze_fire)then

print *,'prop1 ifun=',ifun,' lfn(168,84)=',lfn(168,84),loc(lfn(168,84))
call prop_ls(id, &
ifds,ifde,jfds,jfde, & ! fire domain dims - the whole domain
ifms,ifme,jfms,jfme, &
Expand All @@ -272,8 +269,6 @@ subroutine sfire_model ( &
time_start,dt,fdx,fdy,tbound, &
lfn,lfn_out,tign,ros, fp &
)
print *,'prop2 ifun=',ifun,' lfn(168,84)=',lfn(168,84),loc(lfn(168,84))
print *,'prop2 ifun=',ifun,' lfn_out(168,84)=',lfn_out(168,84)

else
call message('sfire_model: EXPERIMENTAL: skipping fireline propagation')
Expand All @@ -300,8 +295,7 @@ subroutine sfire_model ( &
do ig = 1,num_ignitions

! for now, check for ignition every time step...
! if(ignition_line(ig)%end_time>=time_start.and.ignition_line(ig)%start_time<time_start+dt)then
print *,'befor ifun=',ifun,' lfn(168,84)=',lfn(168,84),loc(lfn(168,84))
if(ignition_line(ig)%end_time>=time_start.and.ignition_line(ig)%start_time<time_start+dt)then
call ignite_fire( &
ifds,ifde,jfds,jfde, & ! fire domain dims - the whole domain
ifms,ifme,jfms,jfme, &
Expand All @@ -311,8 +305,6 @@ subroutine sfire_model ( &
coord_xf,coord_yf,unit_xf,unit_yf, &
lfn,tign,ignited)

print *,'after ifun=',ifun,' lfn(168,84)=',lfn(168,84),loc(lfn(168,84))

ignitions_done=ignitions_done+1
ignited_tile(ignitions_done)=ignited

Expand All @@ -322,7 +314,7 @@ subroutine sfire_model ( &
call write_array_m(ifts,ifte,jfts,jfte,ifms,ifme,jfms,jfme,coord_xf,'coord_xf_ig',id)
call write_array_m(ifts,ifte,jfts,jfte,ifms,ifme,jfms,jfme,coord_yf,'coord_yf_ig',id)
#endif
! endif
endif

enddo

Expand Down

0 comments on commit 161aa29

Please sign in to comment.