Skip to content

Commit 99fcf4b

Browse files
authored
Merge pull request #22 from pedro-jm/misc
Adding several refinements and changing default options
2 parents 3b79c13 + c7ea8d3 commit 99fcf4b

File tree

7 files changed

+25
-26
lines changed

7 files changed

+25
-26
lines changed

io/namelist_mod.F90

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ module namelist_mod
4949
integer :: fast_dist_reinit_freq = 600 ! Number of time steps to perform a reinit with fast distance reinit method
5050

5151
real :: fire_wind_height = 6.096 ! "height of uah,vah wind in fire spread formula" "m"
52-
integer :: wind_vinterp_opt = 0 ! "mid-flame height wind interpolation option: 0) Interp to specified height, 1) Use WAFs"
53-
integer :: hinterp_opt = 1 ! "Horizontal interpolation from atm to fire (offline option): 1) ngp, 2)bi-linear"
52+
integer :: wind_vinterp_opt = 1 ! "mid-flame height wind interpolation option: 0) Interp to specified height, 1) Use WAFs"
53+
integer :: hinterp_opt = 2 ! "Horizontal interpolation from atm to fire (offline option): 1) ngp, 2)bi-linear"
5454
logical :: fire_lsm_zcoupling = .false. ! "flag to activate reference velocity at a different height from fire_wind_height"
5555
real :: fire_lsm_zcoupling_ref = 50.0 ! "reference height from wich u at fire_wind_hegiht is calculated using a logarithmic profile" "m"
5656

@@ -411,8 +411,8 @@ subroutine Init_fire_block (this, file_name)
411411
integer :: fmoist_freq = 0 ! "frequency to run moisture model 0: use fmoist_dt, k>0: every k timesteps" "1"
412412
real :: fmoist_dt = 600 ! "moisture model time step" "s"
413413
real :: fire_wind_height = 6.096 ! "height of uah,vah wind in fire spread formula" "m"
414-
integer :: wind_vinterp_opt = 0 ! "mid-flame height wind interpolation option: 0) Interp to specified height, 1) Use WAFs"
415-
integer :: hinterp_opt = 1 ! "Horizontal interpolation from atm to fire (offline option): 1) ngp, 2) bi-linear"
414+
integer :: wind_vinterp_opt = 1 ! "mid-flame height wind interpolation option: 0) Interp to specified height, 1) Use WAFs"
415+
integer :: hinterp_opt = 2 ! "Horizontal interpolation from atm to fire (offline option): 1) ngp, 2) bi-linear"
416416
logical :: fire_is_real_perim = .false. ! .false. = point/line ignition, .true. = observed perimeter"
417417
real :: frac_fburnt_to_smoke = 0.02 ! "parts per unit of burned fuel becoming smoke " "g_smoke/kg_air"
418418
real :: fuelmc_g = 0.08 ! Fuel moisture content ground (Dead FMC)

io/wrf_mod.F90

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -728,13 +728,10 @@ subroutine Interp_var2grid (this, lats_out, lons_out, ifms, ifme, jfms, jfme, &
728728
case ('rain')
729729
var_wrf = this%rain
730730

731-
case ('fz0')
732-
var_wrf = this%z0
733-
734-
case ('uf')
731+
case ('ua')
735732
var_wrf = this%ua
736733

737-
case ('vf')
734+
case ('va')
738735
var_wrf = this%va
739736

740737
case default
@@ -1129,10 +1126,10 @@ subroutine Update_atm_state (this, datetime_now, config_flags)
11291126
call this%Get_q2 (datetime_now)
11301127
call this%Get_psfc (datetime_now)
11311128
call this%Get_rain (datetime_now)
1132-
call this%Get_z0 (datetime_now)
11331129

11341130
select case (config_flags%wind_vinterp_opt)
11351131
case (VINTERP_WINDS_FROM_3D_WINDS)
1132+
call this%Get_z0 (datetime_now)
11361133
call this%Get_u3d (datetime_now)
11371134
call this%Get_v3d (datetime_now)
11381135
call this%Get_phl (datetime_now)
@@ -1164,7 +1161,7 @@ subroutine Update_atm_state (this, datetime_now, config_flags)
11641161
call this%Destroy_u3d ()
11651162
call this%Destroy_v3d ()
11661163
call this%Destroy_phl ()
1167-
! call this%Destroy_z0 ()
1164+
call this%Destroy_z0 ()
11681165

11691166
case (VINTERP_WINDS_FROM_10M_WINDS)
11701167
call this%Get_u10 (datetime_now)

state/state_mod.F90

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -780,17 +780,13 @@ subroutine Interpolate_vars_atm_to_fire (this, wrf, config_flags)
780780
if (.not. allocated (this%lats) .or. .not. allocated (this%lons)) &
781781
call Stop_simulation ('Init lats/lons before calling hinterp atm variables')
782782

783-
if (this%datetime_now == this%datetime_start) call wrf%Interp_var2grid (this%lats, this%lons, &
784-
this%ifms, this%ifme, this%jfms, this%jfme, config_flags%num_tiles, this%i_start, this%i_end, &
785-
this%j_start, this%j_end, 'fz0', config_flags%hinterp_opt, this%fz0)
786-
787783
call wrf%Interp_var2grid (this%lats, this%lons, this%ifms, this%ifme, this%jfms, this%jfme, &
788784
config_flags%num_tiles, this%i_start, this%i_end, this%j_start, this%j_end, &
789-
'uf', config_flags%hinterp_opt, this%uf)
785+
'ua', config_flags%hinterp_opt, this%uf)
790786

791787
call wrf%Interp_var2grid (this%lats, this%lons, this%ifms, this%ifme, this%jfms, this%jfme, &
792788
config_flags%num_tiles, this%i_start, this%i_end, this%j_start, this%j_end, &
793-
'vf', config_flags%hinterp_opt, this%vf)
789+
'va', config_flags%hinterp_opt, this%vf)
794790

795791
if (config_flags%wind_vinterp_opt == 1) then
796792
call this%Apply_wafs ()

tests/test7/namelist.fire

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
end_second = 10
1414
dt = 0.5
1515
interval_output = 1
16+
num_tiles = 16,
1617
/
1718

1819
&atm
@@ -35,5 +36,6 @@
3536
fire_atm_feedback = 1.0, ! real, multiplier for heat fluxes, 1.=normal, 0.=turn off two-way coupling
3637
fire_viscosity = 0.4, ! artificial viscosity in level set method (max 1, needed with fire_upwinding=0)
3738
fire_upwinding = 9, ! 0=none, 1=standard, 2=godunov, 3=eno, 4=sethian
39+
wind_vinterp_opt = 0,
3840
/
3941

tests/test8.s

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ then
8080

8181
test=$(diff ./file1.dat ./file2.dat | wc -l)
8282
# Here we allow one difference since we are not expecting bit4bit results
83-
echo $test
83+
# echo $test
8484
if [ $test -eq 4 ]
8585
then
8686
echo ' Ignore this difference:'
@@ -105,8 +105,9 @@ then
105105
grep "$var" $file_wrf | awk '{print $2, $7}' > ./file2.dat
106106

107107
test=$(diff ./file1.dat ./file2.dat | wc -l)
108-
echo $test
109-
if [ $test -eq 8 ]
108+
# echo $test
109+
# Here we allow one difference since we are not expecting bit4bit results
110+
if [ $test -eq 4 ]
110111
then
111112
echo ' Ignore this difference:'
112113
diff ./file1.dat ./file2.dat
@@ -130,12 +131,11 @@ then
130131
grep "$var" $file_wrf | awk '{print $2, $7}' > ./file2.dat
131132

132133
test=$(diff ./file1.dat ./file2.dat | wc -l)
133-
echo $test
134-
# Here we allow one difference since we are not expecting bit4bit results
135-
if [ $test -eq 4 ]
134+
# echo $test
135+
if [ $test -eq 0 ]
136136
then
137-
echo ' Ignore this difference:'
138-
diff ./file1.dat ./file2.dat
137+
# echo ' Ignore this difference:'
138+
# diff ./file1.dat ./file2.dat
139139
echo ' Test8.4 PASSED'
140140
n_test_passed=$(expr $n_test_passed + 1)
141141
else
@@ -157,7 +157,7 @@ then
157157

158158
test=$(diff ./file1.dat ./file2.dat | wc -l)
159159
# Here we allow one difference since we are not expecting bit4bit results
160-
echo $test
160+
# echo $test
161161
if [ $test -eq 8 ]
162162
then
163163
echo ' Ignore this difference:'

tests/test8/namelist.fire

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
end_second = 10
1414
dt = 0.5
1515
interval_output = 1
16+
num_tiles = 16,
1617
/
1718

1819
&atm
@@ -37,5 +38,6 @@
3738
fire_upwinding = 9, ! 0=none, 1=standard, 2=godunov, 3=eno, 4=sethian
3839
fmoist_run = .true., ! Run fuel moisture model
3940
fmoist_freq = 1, ! Fuel moisture model updated every time step
41+
wind_vinterp_opt = 0
4042
/
4143

tests/testx/namelist.fire

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
end_second = 10
1414
dt = 0.5
1515
interval_output = 1
16+
num_tiles = 16,
1617
/
1718

1819
&atm
@@ -35,6 +36,7 @@
3536
fire_atm_feedback = 1.0, ! real, multiplier for heat fluxes, 1.=normal, 0.=turn off two-way coupling
3637
fire_viscosity = 0.4, ! artificial viscosity in level set method (max 1, needed with fire_upwinding=0)
3738
fire_upwinding = 9, ! 0=none, 1=standard, 2=godunov, 3=eno, 4=sethian
39+
wind_vinterp_opt = 0
3840
/
3941

4042
&ideal

0 commit comments

Comments
 (0)