4
4
!#define FUEL_LEFT
5
5
!#define DEBUG_OUT_FUEL_LEFT
6
6
7
- module module_fr_sfire_core
7
+ module module_fr_fire_core
8
8
9
- use module_fr_sfire_phys , only: fire_params , fire_ros
10
- use module_fr_sfire_util
9
+ use module_fr_fire_phys , only: fire_params , fire_ros
10
+ use module_fr_fire_util
11
11
12
12
! The mathematical core of the fire spread model. No physical constants here.
13
13
!
14
- ! subroutine sfire_core : only this routine should be called from the outside.
14
+ ! subroutine fire_core : only this routine should be called from the outside.
15
15
! subroutine fuel_left: compute remaining fuel from time of ignition.
16
16
! subroutine prop_ls: propagation of curve in normal direction.
17
17
@@ -180,14 +180,14 @@ subroutine ignite_fire( ifds,ifde,jfds,jfde, & ! fire domain
180
180
aymin= coord_yf(ifts,jfts)
181
181
axmax= coord_xf(ifte,jfte)
182
182
aymax= coord_yf(ifte,jfte)
183
- !$OMP CRITICAL(SFIRE_CORE_CRIT )
183
+ !$OMP CRITICAL(FIRE_CORE_CRIT )
184
184
write (msg,' (a,2f11.6,a,2f11.6)' )' IGN from ' ,sx,sy,' to ' ,ex,ey
185
185
call message(msg)
186
186
write (msg,' (a,2f10.2,a,2f10.2,a)' )' IGN timestep [' ,start_ts,end_ts,' ] in [' ,start_time,end_time,' ]'
187
187
call message(msg)
188
188
write (msg,' (a,2g13.6,a,2g13.6)' )' IGN tile coord from ' ,axmin,aymin,' to ' ,axmax,aymax
189
189
call message(msg)
190
- !$OMP END CRITICAL(SFIRE_CORE_CRIT )
190
+ !$OMP END CRITICAL(FIRE_CORE_CRIT )
191
191
ignited= 0
192
192
dmax= 0
193
193
dmin= huge (dmax)
@@ -206,51 +206,51 @@ subroutine ignite_fire( ifds,ifde,jfds,jfde, & ! fire domain
206
206
207
207
lfn_new= d - min ( radius, ros* (end_ts - time_ign) ) ! lft at end_ts
208
208
if (fire_print_msg.ge. 3 )then
209
- !$OMP CRITICAL(SFIRE_CORE_CRIT )
209
+ !$OMP CRITICAL(FIRE_CORE_CRIT )
210
210
write (msg,* )' IGN1 i,j=' ,i,j,' lfn(i,j)=' ,lfn(i,j),' tign(i,j)=' ,tign(i,j)
211
211
call message(msg)
212
212
write (msg,* )' IGN2 i,j=' ,i,j,' lfn_new= ' ,lfn_new, ' time_ign= ' ,time_ign,' d=' ,d
213
213
call message(msg)
214
- !$OMP END CRITICAL(SFIRE_CORE_CRIT )
214
+ !$OMP END CRITICAL(FIRE_CORE_CRIT )
215
215
endif
216
216
if (.not. lfn_new>0 .) then
217
217
ignited= ignited+1 ! count
218
218
endif
219
219
if (lfn(i,j)>0 . .and. .not. lfn_new > 0 .) then
220
220
tign(i,j)= time_ign + d/ ros ! newly ignited now
221
221
if (fire_print_msg.ge. 3 )then
222
- !$OMP CRITICAL(SFIRE_CORE_CRIT )
222
+ !$OMP CRITICAL(FIRE_CORE_CRIT )
223
223
write (msg,' (a,2i6,a,2g13.6,a,f10.2,a,2f10.2,a)' )' IGN ignited cell ' ,i,j,' at' ,ax,ay, &
224
224
' time' ,tign(i,j),' in [' ,start_ts,end_ts,' ]'
225
225
call message(msg)
226
226
write (msg,' (a,g10.3,a,f10.2,a,2f10.2,a)' )' IGN distance' ,d,' from ignition line at' ,time_ign,' in [' ,st,et,' ]'
227
227
call message(msg)
228
- !$OMP END CRITICAL(SFIRE_CORE_CRIT )
228
+ !$OMP END CRITICAL(FIRE_CORE_CRIT )
229
229
endif
230
230
if (tign(i,j) < start_ts .or. tign(i,j) > end_ts )then
231
- !$OMP CRITICAL(SFIRE_CORE_CRIT )
231
+ !$OMP CRITICAL(FIRE_CORE_CRIT )
232
232
write (msg,' (a,2i6,a,f11.6,a,2f11.6,a)' )' WARNING ' ,i,j, &
233
233
' fixing ignition time ' ,tign(i,j),' outside of the time step [' ,start_ts,end_ts,' ]'
234
234
call message (msg)
235
- !$OMP END CRITICAL(SFIRE_CORE_CRIT )
235
+ !$OMP END CRITICAL(FIRE_CORE_CRIT )
236
236
tign(i,j) = min (max (tign(i,j),start_ts),end_ts)
237
237
endif
238
238
endif
239
239
lfn(i,j)= min (lfn(i,j),lfn_new) ! update the level set function
240
240
if (fire_print_msg.ge. 3 )then
241
- !$OMP CRITICAL(SFIRE_CORE_CRIT )
241
+ !$OMP CRITICAL(FIRE_CORE_CRIT )
242
242
write (msg,* )' IGN3 i,j=' ,i,j,' lfn(i,j)=' ,lfn(i,j),' tign(i,j)=' ,tign(i,j)
243
243
call message(msg)
244
- !$OMP END CRITICAL(SFIRE_CORE_CRIT )
244
+ !$OMP END CRITICAL(FIRE_CORE_CRIT )
245
245
endif
246
246
enddo
247
247
enddo
248
- !$OMP CRITICAL(SFIRE_CORE_CRIT )
248
+ !$OMP CRITICAL(FIRE_CORE_CRIT )
249
249
write (msg,' (a,2g13.2,a,g10.2,a,g10.2)' )' IGN units ' ,unit_xf,unit_yf,' m max dist ' ,dmax,' min' ,dmin
250
250
call message(msg)
251
251
write (msg,' (a,f6.1,a,f8.1,a,i10)' )' IGN radius ' ,radius,' time of spread' ,tos,' ignited nodes' ,ignited
252
252
call message(msg)
253
- !$OMP END CRITICAL(SFIRE_CORE_CRIT )
253
+ !$OMP END CRITICAL(FIRE_CORE_CRIT )
254
254
255
255
return
256
256
99 continue
@@ -320,7 +320,7 @@ SUBROUTINE nearest(d,t,ax,ay,sx,sy,st,ex,ey,et,cx2,cy2)
320
320
d= sqrt ((ax- cx)* (ax- cx)* cx2+ (ay- cy)* (ay- cy)* cy2) ! |a- c|^2
321
321
t = (et + st)* 0.5 + mcrel* (et - st)* 0.5 ! interpolate to c by going from m
322
322
if (fire_print_msg.ge. 3 )then
323
- !$OMP CRITICAL(SFIRE_CORE_CRIT )
323
+ !$OMP CRITICAL(FIRE_CORE_CRIT )
324
324
write (msg,12 )' find nearest to [' ,ax,ay,' ] from [' ,sx,sy,' ] [' ,ex,ey,' ]' ! DEB
325
325
call message(msg)
326
326
write (msg,12 )' end times' ,st,et,' scale squared' ,cx2,cy2 ! DEB
@@ -333,7 +333,7 @@ SUBROUTINE nearest(d,t,ax,ay,sx,sy,st,ex,ey,et,cx2,cy2)
333
333
call message(msg)
334
334
write (msg,11 )' am_es=' ,am_es,' cos2=' ,cos2,' dmc2=' ,dmc2 ! DEB
335
335
call message(msg)
336
- !$OMP END CRITICAL(SFIRE_CORE_CRIT )
336
+ !$OMP END CRITICAL(FIRE_CORE_CRIT )
337
337
endif
338
338
END SUBROUTINE nearest
339
339
@@ -526,10 +526,10 @@ subroutine fuel_left(&
526
526
! consistency check
527
527
if (fire_area_ff.lt. - 1e-6 .or. &
528
528
(fire_area_ff.eq. 0 . .and. fuel_left_ff.lt. 1 .- 1e-6 ))then
529
- !$OMP CRITICAL(SFIRE_CORE_CRIT )
529
+ !$OMP CRITICAL(FIRE_CORE_CRIT )
530
530
write (msg,' (a,2i6,2(a,f11.8))' )' fuel_left: at node' ,i,j, &
531
531
' of refined mesh fuel burnt' ,1 - fuel_left_ff,' fire area' ,fire_area_ff
532
- !$OMP END CRITICAL(SFIRE_CORE_CRIT )
532
+ !$OMP END CRITICAL(FIRE_CORE_CRIT )
533
533
call crash(msg)
534
534
endif
535
535
@@ -566,10 +566,10 @@ subroutine fuel_left(&
566
566
do i= its,ite
567
567
if (fire_area(i,j).eq. 0 .)then
568
568
if (fuel_frac(i,j).lt. 1 .- 1e-6 )then
569
- !$OMP CRITICAL(SFIRE_CORE_CRIT )
569
+ !$OMP CRITICAL(FIRE_CORE_CRIT )
570
570
write (msg,' (a,2i6,2(a,f11.8))' )' fuel_left: at node' ,i,j, &
571
571
' fuel burnt' ,1 - fuel_frac(i,j),' but fire area' ,fire_area(i,j)
572
- !$OMP END CRITICAL(SFIRE_CORE_CRIT )
572
+ !$OMP END CRITICAL(FIRE_CORE_CRIT )
573
573
call crash(msg)
574
574
endif
575
575
else
@@ -578,9 +578,9 @@ subroutine fuel_left(&
578
578
endif
579
579
enddo
580
580
enddo
581
- !$OMP CRITICAL(SFIRE_CORE_CRIT )
581
+ !$OMP CRITICAL(FIRE_CORE_CRIT )
582
582
write (msg,' (a,4i6,a,f10.7)' )' fuel_left: tile' ,its,ite,jts,jte,' max fuel burnt/area' ,fmax
583
- !$OMP END CRITICAL(SFIRE_CORE_CRIT )
583
+ !$OMP END CRITICAL(FIRE_CORE_CRIT )
584
584
call message(msg)
585
585
return
586
586
@@ -717,11 +717,11 @@ subroutine fuel_left_cell_1( fuel_frac_left, fire_frac_area, &
717
717
if (area>0 )out = area* exp (ta/ fuel_time_cell) + (1 . - area)
718
718
719
719
if (out >1 .)then
720
- !$OMP CRITICAL(SFIRE_CORE_CRIT )
720
+ !$OMP CRITICAL(FIRE_CORE_CRIT )
721
721
write (msg,* )' out=' ,out ,' >1 area=' ,area,' ta=' ,ta
722
722
call message(msg)
723
723
write (msg,* )' tign=' ,tign00,tign01,tign10,tign11,' time_now=' ,time_now
724
- !$OMP END CRITICAL(SFIRE_CORE_CRIT )
724
+ !$OMP END CRITICAL(FIRE_CORE_CRIT )
725
725
call message(msg)
726
726
!call message(' WARNING: fuel_left_cell_1: fuel fraction > 1' )
727
727
call crash(' fuel_left_cell_1: fuel fraction > 1' )
@@ -1386,12 +1386,12 @@ subroutine prop_ls( id, & ! for debug
1386
1386
1387
1387
!*** executable
1388
1388
1389
- !$OMP CRITICAL(SFIRE_CORE_CRIT )
1389
+ !$OMP CRITICAL(FIRE_CORE_CRIT )
1390
1390
write (msg,' (a8,i5,a6,i5,3(a1,i5))' )' prop_ls:' ,id,' tile ' ,its,' :' ,ite,' ,' ,jts,' :' ,jte
1391
- !$OMP END CRITICAL(SFIRE_CORE_CRIT )
1391
+ !$OMP END CRITICAL(FIRE_CORE_CRIT )
1392
1392
call message(msg)
1393
1393
1394
- a= fire_back_weight ! from module_fr_sfire_util
1394
+ a= fire_back_weight ! from module_fr_fire_util
1395
1395
a1= 1 . - a
1396
1396
1397
1397
! tend = F(lfn)
@@ -1476,16 +1476,16 @@ subroutine prop_ls( id, & ! for debug
1476
1476
1477
1477
tbound= min (tbound,tbound2)
1478
1478
1479
- !$OMP CRITICAL(SFIRE_CORE_CRIT )
1479
+ !$OMP CRITICAL(FIRE_CORE_CRIT )
1480
1480
write (msg,' (a,f10.2,4(a,f7.2))' )' prop_ls: time' ,ts,' dt=' ,dt,' bound' ,min (tbound,999.99 ), &
1481
1481
' dx=' ,dx,' dy=' ,dy
1482
- !$OMP END CRITICAL(SFIRE_CORE_CRIT )
1482
+ !$OMP END CRITICAL(FIRE_CORE_CRIT )
1483
1483
call message(msg)
1484
1484
if (dt>tbound)then
1485
- !$OMP CRITICAL(SFIRE_CORE_CRIT )
1485
+ !$OMP CRITICAL(FIRE_CORE_CRIT )
1486
1486
write (msg,' (2(a,f10.2))' )' prop_ls: WARNING: time step ' ,dt, &
1487
1487
' > bound =' ,tbound
1488
- !$OMP END CRITICAL(SFIRE_CORE_CRIT )
1488
+ !$OMP END CRITICAL(FIRE_CORE_CRIT )
1489
1489
call message(msg)
1490
1490
endif
1491
1491
@@ -1566,10 +1566,10 @@ subroutine prop_ls( id, & ! for debug
1566
1566
endif
1567
1567
enddo
1568
1568
enddo
1569
- !$OMP CRITICAL(SFIRE_CORE_CRIT )
1569
+ !$OMP CRITICAL(FIRE_CORE_CRIT )
1570
1570
write (msg,' (2(a,i6,f8.4))' )' prop_ls: nodes burning' ,nfirenodes, &
1571
1571
(100 .* nfirenodes)/ ((ite1- its1+1 )* (jte1- jts1+1 )),' % next to fireline' ,nfireline
1572
- !$OMP END CRITICAL(SFIRE_CORE_CRIT )
1572
+ !$OMP END CRITICAL(FIRE_CORE_CRIT )
1573
1573
call message(msg)
1574
1574
if (nfireline>0 )then
1575
1575
call print_stat_line(' speed error' ,its1,ite1,jts1,jte1,min_err,max_err,sum_err/ nfireline)
@@ -1599,10 +1599,10 @@ subroutine prop_ls( id, & ! for debug
1599
1599
enddo
1600
1600
goto 10
1601
1601
9 continue
1602
- !$OMP CRITICAL(SFIRE_CORE_CRIT )
1602
+ !$OMP CRITICAL(FIRE_CORE_CRIT )
1603
1603
write (msg,' (a,i2,a,2i8)' )' prop_ls: fire' ,boundary_guard, &
1604
1604
' cells from domain boundary at node ' ,i,j
1605
- !$OMP END CRITICAL(SFIRE_CORE_CRIT )
1605
+ !$OMP END CRITICAL(FIRE_CORE_CRIT )
1606
1606
call message(msg)
1607
1607
call crash(' prop_ls: increase the fire region' )
1608
1608
10 continue
@@ -1936,4 +1936,4 @@ real function speed_func(diffCx,diffCy,dx,dy,i,j,fp)
1936
1936
1937
1937
end function speed_func
1938
1938
1939
- end module module_fr_sfire_core
1939
+ end module module_fr_fire_core
0 commit comments