@@ -186,12 +186,11 @@ subroutine fire_danger_index ( currentSite, bc_in)
186186 end subroutine fire_danger_index
187187
188188
189- ! *****************************************************************
190- subroutine characteristics_of_fuel ( currentSite )
191- ! *****************************************************************
189+ ! *****************************************************************
190+ subroutine characteristics_of_fuel ( currentSite )
191+ ! *****************************************************************
192192
193- use SFParamsMod, only: SF_val_drying_ratio, SF_val_SAV, SF_val_FBD, &
194- SF_val_miner_total
193+ use SFParamsMod, only: SF_val_drying_ratio, SF_val_SAV, SF_val_FBD, SF_val_miner_total
195194
196195 type (ed_site_type), intent (in ), target :: currentSite
197196
@@ -206,63 +205,65 @@ subroutine characteristics_of_fuel ( currentSite)
206205 fuel_moisture(:) = 0.0_r8
207206
208207 currentPatch = > currentSite% oldest_patch;
209- do while (associated (currentPatch))
208+
209+ do while (associated (currentPatch))
210210
211- if (currentPatch% nocomp_pft_label .ne. nocomp_bareground)then
211+ if (currentPatch% nocomp_pft_label .ne. nocomp_bareground) then
212212
213- litt_c = > currentPatch% litter(element_pos(carbon12_element))
214-
215- ! How much live grass is there?
216- currentPatch% livegrass = 0.0_r8
217- currentCohort = > currentPatch% tallest
218- do while (associated (currentCohort))
219- ! for grasses sum all aboveground tissues
220- if ( prt_params% woody(currentCohort% pft) == ifalse)then
221-
222- currentPatch% livegrass = currentPatch% livegrass + &
223- ( currentCohort% prt% GetState(leaf_organ, carbon12_element) + &
224- currentCohort% prt% GetState(sapw_organ, carbon12_element) + &
225- currentCohort% prt% GetState(struct_organ, carbon12_element) ) * &
226- currentCohort% n/ currentPatch% area
213+ litt_c = > currentPatch% litter(element_pos(carbon12_element))
214+
215+ ! How much live grass is there?
216+ currentPatch% livegrass = 0.0_r8
217+ currentCohort = > currentPatch% tallest
218+ do while (associated (currentCohort))
219+ ! for grasses sum all aboveground tissues
220+ if ( prt_params% woody(currentCohort% pft) == ifalse)then
221+
222+ currentPatch% livegrass = currentPatch% livegrass + &
223+ ( currentCohort% prt% GetState(leaf_organ, carbon12_element) + &
224+ currentCohort% prt% GetState(sapw_organ, carbon12_element) + &
225+ currentCohort% prt% GetState(struct_organ, carbon12_element) ) * &
226+ currentCohort% n/ currentPatch% area
227227
228228 endif
229229 currentCohort = > currentCohort% shorter
230- enddo
231-
232- ! There are SIX fuel classes
233- ! 1:4) four CWD_AG pools (twig, s branch, l branch, trunk), 5) dead leaves and 6) live grass
234- ! NCWD =4 NFSC = 6
235- ! tw_sf = 1, lb_sf = 3, tr_sf = 4, dl_sf = 5, lg_sf = 6,
236-
230+ enddo
237231
238- if (write_sf == itrue)then
232+ ! There are SIX fuel classes
233+ ! 1:4) four CWD_AG pools (twig, s branch, l branch, trunk), 5) dead leaves and 6) live grass
234+ ! NCWD =4 NFSC = 6
235+ ! tw_sf = 1, lb_sf = 3, tr_sf = 4, dl_sf = 5, lg_sf = 6,
236+
237+
238+ if (write_sf == itrue)then
239239 if ( hlm_masterproc == itrue ) write (fates_log(),* ) ' leaf_litter1 ' ,sum (litt_c% leaf_fines(:))
240240 if ( hlm_masterproc == itrue ) write (fates_log(),* ) ' leaf_litter2 ' ,sum (litt_c% ag_cwd(:))
241241 if ( hlm_masterproc == itrue ) write (fates_log(),* ) ' leaf_litter3 ' ,currentPatch% livegrass
242- endif
242+ endif
243243
244- currentPatch% sum_fuel = sum (litt_c% leaf_fines(:)) + &
245- sum (litt_c% ag_cwd(:)) + &
246- currentPatch% livegrass
247- if (write_SF == itrue)then
244+ currentPatch% sum_fuel = sum (litt_c% leaf_fines(:)) + &
245+ sum (litt_c% ag_cwd(:)) + &
246+ currentPatch% livegrass
247+ if (write_SF == itrue) then
248248 if ( hlm_masterproc == itrue ) write (fates_log(),* ) ' sum fuel' , currentPatch% sum_fuel,currentPatch% area
249- endif
250- ! ===============================================
251- ! Average moisture, bulk density, surface area-volume and moisture extinction of fuel
252- ! ================================================
253-
254- if (currentPatch% sum_fuel > 0.0 ) then
249+ endif
250+
251+ ! ===============================================
252+ ! Average moisture, bulk density, surface area-volume and moisture extinction of fuel
253+ ! ================================================
254+
255+ if (currentPatch% sum_fuel > 0.0 ) then
255256 ! Fraction of fuel in litter classes
256257 currentPatch% fuel_frac(dl_sf) = sum (litt_c% leaf_fines(:))/ currentPatch% sum_fuel
257258 currentPatch% fuel_frac(tw_sf:tr_sf) = litt_c% ag_cwd(:) / currentPatch% sum_fuel
258259
259- if (write_sf == itrue)then
260- if ( hlm_masterproc == itrue ) write (fates_log(),* ) ' ff2a ' , &
261- lg_sf,currentPatch% livegrass,currentPatch% sum_fuel
260+ if (write_sf == itrue) then
261+ if ( hlm_masterproc == itrue ) write (fates_log(),* ) ' ff2a ' , &
262+ lg_sf,currentPatch% livegrass,currentPatch% sum_fuel
262263 endif
263264
264265 currentPatch% fuel_frac(lg_sf) = currentPatch% livegrass / currentPatch% sum_fuel
265-
266+
266267 ! MEF (moisure of extinction) depends on compactness of fuel, depth, particle size, wind, slope
267268 ! Eq here is Eq 27 from Peterson and Ryan (1986) "Modeling Postfire Conifer Mortality for Long-Range Planning"
268269 ! but lots of other approaches in use out there...
@@ -278,28 +279,28 @@ subroutine characteristics_of_fuel ( currentSite)
278279 ! dead leaves and twigs included in 1hr pool per Thonicke (2010)
279280 ! Calculate fuel moisture for trunks to hold value for fuel consumption
280281 alpha_FMC(tw_sf:dl_sf) = SF_val_SAV(tw_sf:dl_sf)/ SF_val_drying_ratio
281-
282+
282283 fuel_moisture(tw_sf:dl_sf) = exp (- 1.0_r8 * alpha_FMC(tw_sf:dl_sf) * currentSite% acc_NI)
283-
284+
284285 if (write_SF == itrue)then
285- if ( hlm_masterproc == itrue ) write (fates_log(),* ) ' ff3 ' ,currentPatch% fuel_frac
286- if ( hlm_masterproc == itrue ) write (fates_log(),* ) ' fm ' ,fuel_moisture
287- if ( hlm_masterproc == itrue ) write (fates_log(),* ) ' csa ' ,currentSite% acc_NI
288- if ( hlm_masterproc == itrue ) write (fates_log(),* ) ' sfv ' ,alpha_FMC
286+ if ( hlm_masterproc == itrue ) write (fates_log(),* ) ' ff3 ' ,currentPatch% fuel_frac
287+ if ( hlm_masterproc == itrue ) write (fates_log(),* ) ' fm ' ,fuel_moisture
288+ if ( hlm_masterproc == itrue ) write (fates_log(),* ) ' csa ' ,currentSite% acc_NI
289+ if ( hlm_masterproc == itrue ) write (fates_log(),* ) ' sfv ' ,alpha_FMC
289290 endif
290-
291+
291292 ! live grass moisture is a function of SAV and changes via Nesterov Index
292293 ! along the same relationship as the 1 hour fuels (live grass has same SAV as dead grass,
293294 ! but retains more moisture with this calculation.)
294295 fuel_moisture(lg_sf) = exp (- 1.0_r8 * ((SF_val_SAV(tw_sf)/ SF_val_drying_ratio) * currentSite% acc_NI))
295-
296+
296297 ! Average properties over the first three litter pools (twigs, s branches, l branches)
297298 currentPatch% fuel_bulkd = sum (currentPatch% fuel_frac(tw_sf:lb_sf) * SF_val_FBD(tw_sf:lb_sf))
298299 currentPatch% fuel_sav = sum (currentPatch% fuel_frac(tw_sf:lb_sf) * SF_val_SAV(tw_sf:lb_sf))
299300 currentPatch% fuel_mef = sum (currentPatch% fuel_frac(tw_sf:lb_sf) * MEF(tw_sf:lb_sf))
300301 currentPatch% fuel_eff_moist = sum (currentPatch% fuel_frac(tw_sf:lb_sf) * fuel_moisture(tw_sf:lb_sf))
301- if (write_sf == itrue)then
302- if ( hlm_masterproc == itrue ) write (fates_log(),* ) ' ff4 ' ,currentPatch% fuel_eff_moist
302+ if (write_sf == itrue) then
303+ if ( hlm_masterproc == itrue ) write (fates_log(),* ) ' ff4 ' ,currentPatch% fuel_eff_moist
303304 endif
304305 ! Add on properties of dead leaves and live grass pools (5 & 6)
305306 currentPatch% fuel_bulkd = currentPatch% fuel_bulkd + sum (currentPatch% fuel_frac(dl_sf:lg_sf) * SF_val_FBD(dl_sf:lg_sf))
@@ -313,28 +314,25 @@ subroutine characteristics_of_fuel ( currentSite)
313314 currentPatch% fuel_sav = currentPatch% fuel_sav * (1.0_r8 / (1.0_r8 - currentPatch% fuel_frac(tr_sf)))
314315 currentPatch% fuel_mef = currentPatch% fuel_mef * (1.0_r8 / (1.0_r8 - currentPatch% fuel_frac(tr_sf)))
315316 currentPatch% fuel_eff_moist = currentPatch% fuel_eff_moist * (1.0_r8 / (1.0_r8 - currentPatch% fuel_frac(tr_sf)))
316-
317+
317318 ! Pass litter moisture into the fuel burning routine (all fuels: twigs,s branch,l branch,trunk,dead leaves,live grass)
318319 ! (wo/me term in Thonicke et al. 2010)
319320 currentPatch% litter_moisture(tw_sf:lb_sf) = fuel_moisture(tw_sf:lb_sf)/ MEF(tw_sf:lb_sf)
320321 currentPatch% litter_moisture(tr_sf) = fuel_moisture(tr_sf)/ MEF(tr_sf)
321322 currentPatch% litter_moisture(dl_sf) = fuel_moisture(dl_sf)/ MEF(dl_sf)
322323 currentPatch% litter_moisture(lg_sf) = fuel_moisture(lg_sf)/ MEF(lg_sf)
323-
324- else
325-
326- if (write_SF == itrue)then
327-
328- if ( hlm_masterproc == itrue ) write (fates_log(),* ) ' no litter fuel at all' ,currentPatch% patchno, &
329- currentPatch% sum_fuel,sum (litt_c% ag_cwd(:)),sum (litt_c% leaf_fines(:))
330324
325+ else
326+ if (write_SF == itrue) then
327+ if ( hlm_masterproc == itrue ) write (fates_log(),* ) ' no litter fuel at all' ,currentPatch% patchno, &
328+ currentPatch% sum_fuel,sum (litt_c% ag_cwd(:)),sum (litt_c% leaf_fines(:))
331329 endif
332330 currentPatch% fuel_sav = sum (SF_val_SAV(1 :nfsc))/ (nfsc) ! make average sav to avoid crashing code.
333331
334- if ( hlm_masterproc == itrue .and. write_SF == itrue)then
335- write (fates_log(),* ) ' problem with spitfire fuel averaging'
332+ if ( hlm_masterproc == itrue .and. write_SF == itrue) then
333+ write (fates_log(),* ) ' problem with spitfire fuel averaging'
336334 end if
337-
335+
338336 ! FIX(SPM,032414) refactor...should not have 0 fuel unless everything is burnt
339337 ! off.
340338 currentPatch% fuel_eff_moist = 0.0000000001_r8
@@ -343,20 +341,22 @@ subroutine characteristics_of_fuel ( currentSite)
343341 currentPatch% fuel_mef = 0.0000000001_r8
344342 currentPatch% sum_fuel = 0.0000000001_r8
345343
346- endif
347- ! check values.
348- ! FIX(SPM,032414) refactor...
349- if (write_SF == itrue.and. currentPatch% fuel_sav <= 0.0_r8 .or. currentPatch% fuel_bulkd <= &
350- 0.0_r8 .or. currentPatch% fuel_mef <= 0.0_r8 .or. currentPatch% fuel_eff_moist <= 0.0_r8 )then
351- if ( hlm_masterproc == itrue ) write (fates_log(),* ) ' problem with spitfire fuel averaging'
352- endif
353-
354- ! remove mineral content from net fuel load per Thonicke 2010
355- ! for ir calculation in subr. rate_of_spread
356- ! slevis moved here because rate_of_spread is now called twice/timestep
357- currentPatch% sum_fuel = currentPatch% sum_fuel * (1.0_r8 - SF_val_miner_total) ! net of minerals
344+ endif
345+ ! check values.
346+ ! FIX(SPM,032414) refactor...
347+ if (write_SF == itrue.and. currentPatch% fuel_sav <= 0.0_r8 .or. currentPatch% fuel_bulkd <= &
348+ 0.0_r8 .or. currentPatch% fuel_mef <= 0.0_r8 .or. currentPatch% fuel_eff_moist <= 0.0_r8 ) then
349+ if ( hlm_masterproc == itrue ) write (fates_log(),* ) ' problem with spitfire fuel averaging'
350+ endif
358351
359- currentPatch = > currentPatch% younger
352+ ! remove mineral content from net fuel load per Thonicke 2010
353+ ! for ir calculation in subr. rate_of_spread
354+ ! slevis moved here because rate_of_spread is now called twice/timestep
355+ currentPatch% sum_fuel = currentPatch% sum_fuel * (1.0_r8 - SF_val_miner_total) ! net of minerals
356+
357+ currentPatch = > currentPatch% younger
358+
359+ end if
360360
361361 enddo ! end patch loop
362362
@@ -373,8 +373,8 @@ subroutine characteristics_of_crown ( currentSite, canopy_fuel_load, passive_cr
373373
374374 type (ed_site_type), intent (in ), target :: currentSite
375375
376- type (ed_patch_type ) , pointer :: currentPatch
377- type (ed_cohort_type ), pointer :: currentCohort
376+ type (fates_patch_type ) , pointer :: currentPatch
377+ type (fates_cohort_type ), pointer :: currentCohort
378378
379379 ! ARGUMENTS
380380 real (r8 ), intent (out ) :: canopy_fuel_load ! available canopy fuel load in patch (kg biomass)
@@ -436,17 +436,17 @@ subroutine characteristics_of_crown ( currentSite, canopy_fuel_load, passive_cr
436436 ! Calculate crown 1hr fuel biomass (leaf, twig sapwood, twig structural biomass)
437437 if ( int (prt_params% woody(currentCohort% pft)) == itrue) then ! trees
438438
439- call CrownDepth(currentCohort% hite ,currentCohort% pft,crown_depth)
440- height_cbb = currentCohort% hite - crown_depth
439+ call CrownDepth(currentCohort% height ,currentCohort% pft,crown_depth)
440+ height_cbb = currentCohort% height - crown_depth
441441
442442 ! find patch max height for stand canopy fuel
443- if (currentCohort% hite > max_height) then
444- max_height = currentCohort% hite
443+ if (currentCohort% height > max_height) then
444+ max_height = currentCohort% height
445445 endif
446446
447- leaf_c = currentCohort% prt% GetState(leaf_organ, all_carbon_elements )
448- sapw_c = currentCohort% prt% GetState(sapw_organ, all_carbon_elements )
449- struct_c = currentCohort% prt% GetState(struct_organ, all_carbon_elements )
447+ leaf_c = currentCohort% prt% GetState(leaf_organ, carbon12_element )
448+ sapw_c = currentCohort% prt% GetState(sapw_organ, carbon12_element )
449+ struct_c = currentCohort% prt% GetState(struct_organ, carbon12_element )
450450
451451 tree_sapw_struct_c = currentCohort% n * &
452452 (prt_params% allom_agb_frac(currentCohort% pft)* (sapw_c + struct_c))
@@ -461,7 +461,7 @@ subroutine characteristics_of_crown ( currentSite, canopy_fuel_load, passive_cr
461461
462462 ! sort crown fuel into bins from bottom to top of crown
463463 ! accumulate across cohorts to find density within canopy 1m sections
464- do ih = int (height_cbb), int (currentCohort% hite )
464+ do ih = int (height_cbb), int (currentCohort% height )
465465 biom_matrix(ih) = biom_matrix(ih) + crown_fuel_per_m
466466 end do
467467
@@ -771,7 +771,7 @@ subroutine rate_of_spread ( currentSite, ROS_torch, passive_crown_FI, heat_per_a
771771 ! ROS for crown torch initation (m/min), Eq 18 Scott & Reinhardt 2001
772772 ROS_torch = (1.0 / 54.683 * wind_reduce)* &
773773 ((((60.0 * passive_crown_FI* currentPatch% fuel_bulkd* eps* q_ig)/ heat_per_area* ir* xi)- 1.0 ) &
774- / (c* beta_ratio)**- e )** 1 / b
774+ / (c* beta_ratio)** ( - 1 * e) )** 1 / b
775775 endif
776776 ! Eq 10 in Thonicke et al. 2010
777777 ! backward ROS from Can FBP System (1992) in m/min
@@ -1097,8 +1097,8 @@ subroutine active_crown_fire ( currentSite, canopy_fuel_load, ROS_torch, &
10971097
10981098 type (ed_site_type), intent (in ), target :: currentSite
10991099
1100- type (ed_patch_type ) , pointer :: currentPatch
1101- type (ed_cohort_type ), pointer :: currentCohort
1100+ type (fates_patch_type ) , pointer :: currentPatch
1101+ type (fates_cohort_type ), pointer :: currentCohort
11021102
11031103 ! ARGUMENTS
11041104 real (r8 ), intent (in ) :: ROS_torch ! ROS for crown torch initation (m/min)
@@ -1127,6 +1127,10 @@ subroutine active_crown_fire ( currentSite, canopy_fuel_load, ROS_torch, &
11271127 real (r8 ) fuel_moist10hr ! moisture 10 hour fuels
11281128 real (r8 ) fuel_moist100hr ! moisture 100 hour fuels
11291129 real (r8 ) fuel_moistlive ! moisture live fuels
1130+ real (r8 ) fuel_1hr
1131+ real (r8 ) fuel_10hr
1132+ real (r8 ) fuel_100hr
1133+ real (r8 ) fuel_live
11301134 real (r8 ) SAV_1hr ! surface area to volume 1 hour fuels (twigs)
11311135 real (r8 ) SAV_10hr ! surface area to volume 10 hour fuels (small branches)
11321136 real (r8 ) SAV_100hr ! surface area to volume 100 hour fuels (large branches)
@@ -1287,7 +1291,7 @@ subroutine active_crown_fire ( currentSite, canopy_fuel_load, ROS_torch, &
12871291 ! calculate open wind speed critical to sustain active crown fire Eq 20 Scott & Reinhardt
12881292 CI_temp = ((164.8_r8 * eps * q_ig)/ (ir * currentPatch% canopy_bulk_density)) - 1.0_r8
12891293
1290- wind_active_min = 0.0457_r8 (CI_temp/ 0.001612_r8 )** 0.7_r8
1294+ wind_active_min = 0.0457_r8 * (CI_temp/ 0.001612_r8 )** 0.7_r8
12911295
12921296 ! use open wind speed "wind_active_min" for ROS surface fire where ROS_SA=ROS_active_min
12931297 ROS_SA = (ir * xi * (1.0_r8 + wind_active_min)) / (fuel_bd * eps * q_ig)
@@ -1430,8 +1434,8 @@ subroutine crown_damage ( currentSite )
14301434
14311435 type (ed_site_type), intent (in ), target :: currentSite
14321436
1433- type (ed_patch_type ) , pointer :: currentPatch
1434- type (ed_cohort_type ), pointer :: currentCohort
1437+ type (fates_patch_type ) , pointer :: currentPatch
1438+ type (fates_cohort_type ), pointer :: currentCohort
14351439
14361440 real (r8 ) :: crown_depth ! depth of crown (m)
14371441 real (r8 ) :: height_cbb ! clear branch bole height or crown base height (m) for cohort
@@ -1440,7 +1444,7 @@ subroutine crown_damage ( currentSite )
14401444
14411445 do while (associated (currentPatch))
14421446 ! zero Patch level variables
1443-
1447+ if (currentPatch % nocomp_pft_label .ne. nocomp_bareground) then
14441448 if (currentPatch% fire == 1 ) then
14451449
14461450 currentCohort= >currentPatch% tallest
@@ -1451,13 +1455,13 @@ subroutine crown_damage ( currentSite )
14511455
14521456 ! height_cbb = clear branch bole height at base of crown (m)
14531457 ! inst%crown = crown_depth_frac (PFT)
1454- call CrownDepth(currentCohort% hite ,currentCohort% pft,crown_depth)
1455- height_cbb = currentCohort% hite - crown_depth
1458+ call CrownDepth(currentCohort% height ,currentCohort% pft,crown_depth)
1459+ height_cbb = currentCohort% height - crown_depth
14561460
14571461 ! Equation 17 in Thonicke et al. 2010
14581462 ! flames over bottom of canopy, and potentially over top of
14591463 ! canopy
1460- if (currentCohort% hite > 0.0_r8 .and. &
1464+ if (currentCohort% height > 0.0_r8 .and. &
14611465 currentPatch% Scorch_ht(currentCohort% pft) >= height_cbb) then
14621466 if (currentPatch% active_crown_fire_flg == 0 ) then
14631467 currentCohort% fraction_crown_burned = min (1.0_r8 , &
0 commit comments