Wrf-Fire
- FireBehaviorParameters
model
wildland_fire
fire_behavior
Scheme constants and unit conversions of NCAR's Community Fire Behavior Model (fire_behavior, the WRF-Fire/SFIRE physics line: physics/ros_wrffire_mod.F90, fuel_anderson_mod.F90, fmc_wrffire_mod.F90, level_set_mod.F90, fire_physics_mod.F90, share/constants_mod.F90 and share/fuel_mod.F90), transcribed from the `parameter` declarations and in-line literals of the Fortran, including the fuel-moisture fits and class tables of fmc_wrffire_mod and the single-precision tiny and epsilon. Mounted by the fire_behavior components as subsystem `par` so that no tuning constant is written inline in the physics. The Rothermel (1972) fits are empirical formulae in US customary units (ft, lb, Btu, min); fire_behavior converts the SI fuel inputs to those units, evaluates the fits, and converts the spread rate back, so the conversion factors are scheme constants here (the Fortran literals 0.3048, 2.205, 196.850, 0.00508, 1055 -- note 196.850 ft/min per m/s and 0.00508 m/s per ft/min are each written independently in the source and are not exact reciprocals). The coefficients of the US-unit fits are dimensionless numbers whose implied units are recorded in their descriptions. Values are the nominal decimal values of the source; fire_behavior is a default-real (real32) code, so every test against it uses rel 1e-5 (the tolerance contract for a single-precision reference).
- FlameLengthWRFFire
model
wildland_fire
fire_behavior
Byram (1959) flame length as diagnosed by fire_behavior's Calc_flame_length (physics/fire_physics_mod.F90): L = 0.0775 (iboros ros)^0.46 m on cells containing the fire line (0 < fire_area < 1), with iboros = I_R t_r in kJ/m^2 from RothermelWRFFire so that iboros ros is the fireline intensity in kW/m; zero elsewhere. The EarthSciModels rothermel/fire_spread.esm F_L = c_FL (I_B/IB_ref)^0.46 with I_B in W/m is the same law in SI (0.0775 kW^-0.46 = 0.00323 W^-0.46); it is not reused because its I_B is built from its own (Andrews 2018) reaction intensity. Tests: cells of the instrumented test7 run at step 20 (flame dump) on the front (0 < fire_area < 1), outside it (fire_area = 0) and fully burning behind it (fire_area = 1), rel 1e-5.
- FuelFractionCellWRFFire
model
wildland_fire
fire_behavior
Fuel fraction remaining and burning area fraction of one fire-grid cell as computed by fire_behavior's Calc_fuel_left (physics/level_set_mod.F90): the cell is split into a 2x2 submesh (fuel_left_irl = fuel_left_jrl = 2); at the four corners of every subcell the level-set function and the ignition time are bilinearly interpolated from the 3x3 node neighbourhood of the cell (the node values are the cell-centred lfn and tign_g of the cell and its eight neighbours; subcell (1,1) uses nodes (i-1..i, j-1..j) at fractions 1/2..1, subcell (2,1) nodes (i..i+1, j-1..j) at fractions 0..1/2 and so on); each subcell's burning area is the level-set sign fraction (1 - sum lfn/sum|lfn|)/2 (Mandel et al. 2011 Sect. 3.2) and its remaining fuel is area exp(-(time_now - tign_mean)/fuel_time) + (1 - area) with the mean of the four corner times since ignition (zero for unburnt or not-yet-ignited corners); the cell values are the subcell means. The per-step burnt fraction fuel_frac_before - fuel_frac feeds Calc_fire_fluxes. For a cell that is entirely burning with uniform ignition time this is the exact solution of dF/dt = -F/fuel_time (EarthSciModels level_set/fuel_consumption.esm, Mandel eq. 3), exposed as dfuel_frac_dt_burning; for partly burning cells the subgrid integration has no single-ODE equivalent, which is why this component is transcribed rather than reusing FuelConsumption. Tests: cells of the instrumented test7 run at step 20 (real32), rel 1e-5 (abs 1e-7 where a subcell fraction is exactly 0 or 1).
- FuelMoistureWRFFire
model
wildland_fire
fire_behavior
Dead and live fuel moisture of the five WRF-SFIRE moisture classes (1-h, 10-h, 100-h, 1000-h dead fuel and live fuel) for one fire-grid cell, as advanced by fire_behavior's Advance_moisture_classes and averaged by Average_moisture_classes (physics/fmc_wrffire_mod.F90; Mandel et al. 2014). From the step-mean 2 m temperature, humidity and surface pressure the relative humidity follows Murphy & Koop (2005) eq. 10; without rain the Van Wagner & Pickett (1972) drying and wetting equilibrium moisture contents bracket the class moisture, which relaxes with its class time lag towards the nearer bracket (a class already between them does not move); with rain above 0.05 mm/h both brackets become the saturation moisture 2.5 and the rate is the wetting lag scaled by 1 - exp(-r/8 mm/h). Every coefficient and class table is a FireBehaviorParameters (par) entry. The physics is the time-lag ODE d m_k/dt = (equi_k - m_k)/tau_k (dfmc_dt); fire_behavior integrates it exactly over its moisture step (exponential form, or the 2nd-order Taylor form when the step covers less than 1 % of the lag), reproduced as fmc_new so the Fortran step can be tested. The cell's ground fuel moisture fmc_g is the load-weighted mean of the classes (Anderson13FuelTable w_1h .. w_live). The assimilation adjustments deltae/deltas (fmep) and their decay are transcribed; the fmc_gc initialisation branches (from the equilibrium or from the namelist) are the consumer's initial condition and are not transcribed. The EarthSciModels wildland_fire/nfdrs moisture components (NFDRS 1-h/10-h/100-h/1000-h models) are a different formulation and are not reused. Tests: cells of the instrumented test7 run with the moisture model on (fmoist_run, fmoist_freq = 1, dt_moisture = 0.5 s, so every class is in the Taylor branch; the 10 s case has no rain, so the wetting branch is transcribed but untested), real32, rel 1e-5.
- IgnitionTimeWRFFire
model
wildland_fire
fire_behavior
Ignition time of a fire-grid cell as updated by fire_behavior's Update_ignition_times (physics/level_set_mod.F90) after each level-set step: cells the front crosses during the step get the linearly interpolated crossing time ts + dt lfn_in/(lfn_in - lfn_out); cells still unburnt at the end of the step carry time_now (the step end nudged up by two real32 epsilons, so that Calc_fuel_left treats them as not ignited); burning cells keep their ignition time. Tests: cells of the instrumented test7 run at step 20 (ls_tign dump), rel 1e-5 (the interpolated time is a ratio of O(1-100 m) level-set values, real32).
- LevelSetTendencyWRFFire
model
wildland_fire
fire_behavior
The level-set propagation equation of fire_behavior (physics/level_set_mod.F90 Calc_tend_ls; Munoz-Esparza et al. 2018) as a PDE on a uniform 2-D grid: d psi/dt = -R |grad psi| + nu |R| (dx d2psi/dx2 + dy d2psi/dy2), the Hamilton-Jacobi front propagation with the rate of spread R normal to the front plus a grid-scaled artificial viscosity. |grad psi| is written as the compound sqrt(D(psi,x)^2 + D(psi,y)^2) and lowered by EarthSciDiscretizations' grids/cartesian_uniform_2d/rules/weno5_eno1_norm_D2_extrapolate_bc, which is fire_behavior's default scheme (fire_upwinding = 9): fifth-order WENO within fire_lsm_band_ngp = 4 cells of the front with the upwind side chosen by the mid-flame wind, first-order ENO (minmod of the one-sided differences) elsewhere and within BDY_ENO1 = 10 cells of the domain boundary. The second derivatives of the viscosity term are lowered by central_D2x_extrapolate_bc and central_D2y_extrapolate_bc. All three rules close the walls as fire_behavior does (Extrapol_var_at_bdys): each wall cell sees a ghost extrapolated linearly from the two innermost cells, max(2a - b, a, b), so the domain edge carries no prescribed level-set value and does not act as a fire front. R is supplied as an input field (it depends on the upwind normal, tested in ROSWRFFire); the propagation term and viscosity are what this component asserts. The viscosity coefficient is the single value fire_viscosity: fire_behavior blends it toward fire_viscosity_bg near the front, and test7 sets the two equal. Tests: the ls_tend dump of Runge-Kutta stage 1 of step 20 (t = 10 s) of test7 with the default scheme, checked at wall, corner, ENO1-band, WENO-band and far-field cells, real32.
- ROSWRFFire
model
wildland_fire
fire_behavior
Rate of spread normal to the fire front as evaluated by fire_behavior's Calc_ros_wrffire (physics/ros_wrffire_mod.F90) at one cell and time step, from the level-set normal (nvx, nvy), the mid-flame wind (uf, vf), the terrain slope and the cell's Rothermel constants (RothermelWRFFire). With FIRE_ADVECTION = 1 (the compiled setting) the wind and slope factors are evaluated from the TOTAL wind speed and TOTAL slope and then multiplied by the clipped cosines of their angles to the spread direction: ros = min(r_0 (1 + phi_w(|U|) cos_w + phi_s(|grad z|) cos_s), 6 m/s) with cos_w = max(0, U.n/|U|), cos_s = max(0, grad z . n/|grad z|). DIFFERENCE from EarthSciModels level_set_fire_spread.esm (Mandel 2011 form phi_W(max(0, U.n)), phi_S(max(0, grad z . n)^2)): there the PROJECTED speed enters the power laws, |U|^B cos_w vs (|U| cos_w)^B and |grad z|^2 cos_s vs (grad z . n)^2, and that file has neither the 30 m/s wind cap, the 6 m/s ROS cap nor the chaparral branch, so it is not reused. Chaparral (ischap > 0) uses the Clark et al. (2004) law ros_wind = max(1.2974 |U|^1.41, 0.033) m/s with no base or slope term. Tests: per-cell values of the instrumented test7 run (ls_tend dump, RK stage 1 of step 20, t = 10 s; real32; FORTRAN's speed and slope carry tiny(real32) additions reproduced here), rel 1e-5.
- RothermelWRFFire
model
wildland_fire
fire_behavior
Rothermel (1972) fuel-bed spread parameters as evaluated by fire_behavior's Set_ros_parameters_wrffire (physics/ros_wrffire_mod.F90) for one cell: from the category's fuel properties and the ground fuel moisture, the packing ratio, optimum packing ratio, reaction velocity, moisture and mineral damping, reaction intensity, propagating flux ratio, heat of preignition and effective heating number, and hence the no-wind no-slope spread rate r_0 (ft/min, and ros_base in m/s), the wind-factor coefficients bbb (exponent B) and phiwc, and I_R t_r (iboros) for Byram's flame length. The fits are evaluated in US customary units exactly as the Fortran does (SI load and depth converted with 0.3048 and 2.205), so the intermediates are dimensionless carriers of lb/ft^2, ft, 1/ft, Btu/lb quantities. DIFFERENCES from the EarthSciModels rothermel/fire_spread.esm (Andrews 2018 SI form), which is therefore NOT reused: (1) the reaction-velocity exponent is Rothermel's original A = 1/(4.774 savr^0.1 - 7.27), not Albini's 133 savr^-0.7913; (2) the net load is w_0/(1 + S_T), not w_0 (1 - S_T); (3) the moisture ratio and the mineral damping are not capped at 1; (4) the load entering the fits is the DRY part (1 - M/(1+M)) of fgi, fire_behavior treating fgi as the moist load; (5) the wind factor is split into the cell constants B and phiwc = C (beta/beta_op)^-E applied per time step in ROSWRFFire. The no-fuel category (has_fuel = 0) returns betafl = bbb = 1, phiwc = r_0 = iboros = 0 as the Fortran does. Tests are the dumped per-cell intermediates of the instrumented fire_behavior test7 run (real32; a real64 re-evaluation of the same formulae agrees to <= 8e-7 relative), rel 1e-5.