Skip to content

Commit

Permalink
removing some dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
janmandel committed Sep 17, 2011
1 parent 2b7c8f1 commit 63d96c4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 103 deletions.
1 change: 0 additions & 1 deletion wrfv2_fire/Registry/registry.fire
Expand Up @@ -162,7 +162,6 @@ rconfig integer fire_fuel_left_jrl namelist,fire max_domains
rconfig real fire_back_weight namelist,fire max_domains 0.5 - "fire_back_weight" "RK timestepping coefficient, 0=forward, 0.5=Heun" "1"
rconfig integer fire_grows_only namelist,fire max_domains 1 - "fire_grows_only" "if >0 level set function cannot increase = fire can only grow" "1"
rconfig integer fire_upwinding namelist,fire max_domains 3 - "fire_upwinding" "upwind normal spread: 1=standard, 2=godunov, 3=eno, 4=sethian" "1"
rconfig integer fire_upwind_split namelist,fire max_domains 0 - "fire_upwind_split" "1=upwind advection separately from normal direction spread" "1"
rconfig real fire_viscosity namelist,fire max_domains 0.4 - "fire_viscosity" "artificial viscosity in level set method" "1"
rconfig real fire_lfn_ext_up namelist,fire max_domains 1.0 - "fire_lfn_ext_up" "0.=extend level set function at boundary by reflection, 1.=always up" "1"
rconfig integer fire_topo_from_atm namelist,fire max_domains 1 - "fire_topo_from_atm" "0 = do nothing, 1 = populate ZSF by interpolating from atmosphere" "1"
Expand Down
74 changes: 3 additions & 71 deletions wrfv2_fire/phys/module_fr_sfire_core.F
Expand Up @@ -1924,7 +1924,7 @@ subroutine tend_ls( id, &
!*** local
real:: te,diffLx,diffLy,diffRx,diffRy, &
diffCx,diffCy,diff2x,diff2y,grad,rr, &
ros_back,ros_wind,ros_slope,advx,advy,scale,nvx,nvy,speed,tanphi
ros_back,ros_wind,ros_slope,advx,advy,scale,nvx,nvy,speed
integer::i,j,itso,iteo,jtso,jteo
character(len=128)msg
Expand All @@ -1939,11 +1939,6 @@ subroutine tend_ls( id, &
intrinsic max,min,sqrt,nint,tiny,huge
#ifdef DEBUG_OUT
real,dimension(tims:time,tjms:tjme)::rra,grada,speeda,tanphia
#endif
!*** executable
! check array dimensions
Expand Down Expand Up @@ -2019,50 +2014,8 @@ subroutine tend_ls( id, &
! set ros for output
if(i.ge.its.and.i.le.ite.and.j.ge.jts.and.j.le.jte)ros(i,j)=rr
if(fire_upwind_split.eq.0)then
! get rate of spread
te = -rr*grad ! normal term
else
! normal direction backing rate only
te = - ros_back*grad
! advection in wind direction
if (abs(speed)> eps) then
advx=fp%vx(i,j)*ros_wind/speed
advy=fp%vy(i,j)*ros_wind/speed
else
advx=0
advy=0
endif
! tanphi = dzdxf*nvx + dzdyf*nvy
! advection from slope direction
if(abs(tanphi)>eps) then
advx=advx+fp%dzdxf(i,j)*ros_slope/tanphi
advy=advy+fp%dzdyf(i,j)*ros_slope/tanphi
endif
if(fire_upwind_split.eq.1)then
! one-sided upwinding
te = te - max(advx,0.)*diffLx - min(advx,0.)*diffRy &
- max(advy,0.)*diffLy - min(advy,0.)*diffRy
elseif(fire_upwind_split.eq.2)then
! Lax-Friedrichs
call crash('prop_ls: bad fire_upwind_split, Lax-Friedrichs not done yet')
else
call crash('prop_ls: bad fire_upwind_split')
endif
endif
! get rate of spread
te = -rr*grad ! normal term
! cfl condition
if (grad > 0.) then
Expand All @@ -2073,30 +2026,9 @@ subroutine tend_ls( id, &
te=te + fire_viscosity*abs(rr)*((diffRx-diffLx)+(diffRy-diffLy))
tend(i,j)=te
#ifdef DEBUG_OUT
rra(i,j)=rr
grada(i,j)=grad
speeda(i,j)=speed
tanphia(i,j)=tanphi
#endif
!write(msg,*)i,j,grad,dzdx,dzdy
!call message(msg)
!if(abs(te)>1e4)then
! write(msg,'(a,2i5,e12.3)')'tend_ls: tend out of bounds at ',i,j,te
! call crash(msg)
!endif
enddo
enddo
#ifdef DEBUG_OUT
call write_array_m(ints,inte,jnts,jnte,tims,time,tjms,tjme,rra,'rr',id)
call write_array_m(ints,inte,jnts,jnte,tims,time,tjms,tjme,grada,'grad',id)
call write_array_m(ints,inte,jnts,jnte,tims,time,tjms,tjme,speeda,'speed',id)
call write_array_m(ints,inte,jnts,jnte,tims,time,tjms,tjme,tanphia,'tanphi',id)
call write_array_m(ints,inte,jnts,jnte,tims,time,tjms,tjme,tend,'tend',id)
#endif
call print_2d_stats(ints,inte,jnts,jnte,tims,time,tjms,tjme, &
tend,'tend_ls: tend out')
Expand Down
1 change: 0 additions & 1 deletion wrfv2_fire/phys/module_fr_sfire_driver.F
Expand Up @@ -1024,7 +1024,6 @@ subroutine set_flags(config_flags)
fire_back_weight = config_flags%fire_back_weight
fire_grows_only = config_flags%fire_grows_only
fire_upwinding = config_flags%fire_upwinding
fire_upwind_split = config_flags%fire_upwind_split
fire_viscosity = config_flags%fire_viscosity
fire_lfn_ext_up = config_flags%fire_lfn_ext_up
fire_test_steps = config_flags%fire_test_steps
Expand Down
31 changes: 1 addition & 30 deletions wrfv2_fire/phys/module_fr_sfire_util.F
Expand Up @@ -28,7 +28,6 @@ module module_fr_sfire_util
boundary_guard=-1, & ! crash if fire gets this many cells to domain boundary, -1=off
fire_grows_only=1, & ! fire can spread out only (level set functions may not increase)
fire_upwinding=3, & ! upwind normal spread: 1=standard, 2=godunov, 3=eno, 4=sethian
fire_upwind_split=0, & ! 1=upwind advection separately from normal direction spread
fire_test_steps=0, & ! 0=no fire, 1=normal, >1 = do specified number of steps and terminate (testing only)
fire_topo_from_atm=1, & ! 0 = expect ZSF set correctly on entry, 1 = populate by interploating from atmosphere
fire_advection=0, & ! 0 = fire spread from normal wind/slope (CAWFE), 1 = full speed projected
Expand Down Expand Up @@ -1207,38 +1206,10 @@ subroutine write_array_m3(its,ite,kts,kte,jts,jte, &


end subroutine write_array_m3

!
!***
!
subroutine read_array_2d_integer(filename,ia,its,ite,jts,jte,ims,ime,jms,jme)
!*** arguments
integer, intent(in)::its,ite,jts,jte,ims,ime,jms,jme
integer, intent(out), dimension(ims:ime,jms:jme):: ia
character(len=*),intent(in)::filename
!*** local
real, allocatable, dimension(:,:)::a
integer::i,j
real::r
character(len=256)msg
!*** executable
allocate(a(ims:ime,jms:jme))
call read_array_2d_real(filename,a,its,ite,jts,jte,ims,ime,jms,jme)
do j=jts,jte
do i=its,ite
ia(i,j)=a(i,j)
r=ia(i,j)
if(r.ne.a(i,j))then
!write(6,*)'Reading file ',trim(filename)
!write(6,*)'value at position ',i,j,' cannot be converted to integer'
!write(6,*)'read ',a(i,j),' converted as',k,' converted as ',r
msg=trim(filename)//' is not integer file'
call crash(msg)
endif
enddo
enddo
end subroutine read_array_2d_integer



subroutine read_array_2d_real(filename,a,its,ite,jts,jte,ims,ime,jms,jme)
use module_dm
Expand Down

0 comments on commit 63d96c4

Please sign in to comment.