added README_changes.txt
[wrffire.git] / wrfv2_fire / phys / normal_spread.F
blob0f2ffc1e1f53aa0d672dd3fb1fa5da08a6dd06d5
1     ! fake physics module - simple spread formula
2     
3     module module_fr_sfire_phys
4     
5     contains
6     ! the speed function
7     
8     subroutine normal_spread(  &
9         ims,ime,jms,jme, &  ! memory bounds
10         its,ite,jts,jte, &  ! tile bounds
11         nvx,nvy,         &  ! in: directions to compute the speed in
12         speed            &  ! out: the spread speed
13 #ifdef SPEED_VARS_ARGS      /* extra arguments for normal_spread */
14 #include SPEED_VARS_ARGS
15 #endif
16     )
17     use module_fr_sfire_util
18     implicit none
19 !   arguments
20     integer, intent(in)::its,ite,jts,jte,ims,ime,jms,jme
21     real,intent(in),dimension(ims:ime,jms:jme)::nvx,nvy
22     real,intent(out),dimension(ims:ime,jms:jme)::speed
23 #ifdef SPEED_VARS_DECL      /* extra arguments for normal_spread */
24 #include SPEED_VARS_DECL
25 #endif
26     real::e,c
27     ! calls
28     intrinsic nint
29     !  internal
30     integer i,j
32  !  compute speed at all nodes
33  !
34  !  pull coeffiecients
35  !
36     e=normal_spread_e
37     c=normal_spread_c
38     write(*,*)'c=',normal_spread_c,' e=',normal_spread_e
39     do j=jts,jte+1
40         do i=its,ite+1
41             speed(i,j) = r(i,j) + max(vx(i,j)*nvx(i,j) + vy(i,j)*nvy(i,j),0.0)**e * c
42         enddo
43     enddo
44     
45     end subroutine normal_spread
47     end module module_fr_sfire_phys