Version: dev

IgnitionTimeWRFFire

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).

Domain
wildland_fire
Subdomain
fire_behavior
Type
model
.esm schema
1.0.0
Source
components/wildland_fire/fire_behavior/ignition_time_wrffire.esm
Tags
#wildland_fire #fire_behavior #model #wrf-fire #level-set #ignition

Description

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).

Reference

  • NCAR Community Fire Behavior Model (fire_behavior), develop @ eb77580; instrumented fork ctessum-claude/fire_behavior branch earthsciml-instrumented (c9dda02).

Parameters

NameUnitsDefaultDescription
tss0.0Time at the start of the step.
dts0.5Time step.
lfn_inm1.0Level-set value at the cell at the start of the step.
lfn_outm1.0Level-set value at the cell at the end of the step.
tign_befores0.0Ignition time carried from the previous step.

Observed

NameUnitsDefaultDescription
time_nowsStep-end time nudged up by |ts + dt| epsilon(real32) 2 (Update_ignition_times: time_now = ts + dt; time_now = time_now + abs(time_now) * epsilon(time_now) * 2.0), so that a cell the front has not reached carries tign > time_now and is not counted as burning, also for a negative time.
crossing11 where the front crosses the cell during the step (lfn_out <= 0 < lfn_in).
tignsIgnition time after the step: ts + dt lfn_in/(lfn_in - lfn_out) (linear interpolation of the zero crossing) where the front crosses the cell, time_now where the cell is still unburnt (lfn_out > 0), otherwise unchanged.

Observed expressions

$$ time_{now} = ts + dt + \left|ts + dt\right| \cdot par.eps_{real32} \cdot 2.0 $$

Step-end time nudged up by |ts + dt| epsilon(real32) 2 (Update_ignition_times: time_now = ts + dt; time_now = time_now + abs(time_now) * epsilon(time_now) * 2.0), so that a cell the front has not reached carries tign > time_now and is not counted as burning, also for a negative time.

$$ crossing = \mathrm{ifelse}\left(\mathrm{and}\left(\mathrm{<=}\left(lfn_{out}, 0.0\right), \mathrm{>}\left(lfn_{in}, 0.0\right)\right), 1.0, 0.0\right) $$

1 where the front crosses the cell during the step (lfn_out <= 0 < lfn_in).

$$ tign = \mathrm{ifelse}\left(\mathrm{>}\left(lfn_{out}, 0.0\right), time_{now}, \mathrm{ifelse}\left(\mathrm{>}\left(crossing, 0.5\right), ts + dt \cdot \frac{lfn_{in}}{lfn_{in} - lfn_{out}}, tign_{before}\right)\right) $$

Ignition time after the step: ts + dt lfn_in/(lfn_in - lfn_out) (linear interpolation of the zero crossing) where the front crosses the cell, time_now where the cell is still unburnt (lfn_out > 0), otherwise unchanged.

Raw .esm

Raw .esm JSON (this component)
{
  "subsystems": {
    "par": {
      "ref": "./fire_behavior_parameters.esm"
    }
  },
  "variables": {
    "ts": {
      "type": "parameter",
      "units": "s",
      "default": 0.0,
      "description": "Time at the start of the step."
    },
    "dt": {
      "type": "parameter",
      "units": "s",
      "default": 0.5,
      "description": "Time step."
    },
    "lfn_in": {
      "type": "parameter",
      "units": "m",
      "default": 1.0,
      "description": "Level-set value at the cell at the start of the step."
    },
    "lfn_out": {
      "type": "parameter",
      "units": "m",
      "default": 1.0,
      "description": "Level-set value at the cell at the end of the step."
    },
    "tign_before": {
      "type": "parameter",
      "units": "s",
      "default": 0.0,
      "description": "Ignition time carried from the previous step."
    },
    "time_now": {
      "type": "unknown",
      "units": "s",
      "description": "Step-end time nudged up by |ts + dt| epsilon(real32) 2 (Update_ignition_times: time_now = ts + dt; time_now = time_now + abs(time_now) * epsilon(time_now) * 2.0), so that a cell the front has not reached carries tign > time_now and is not counted as burning, also for a negative time."
    },
    "crossing": {
      "type": "unknown",
      "units": "1",
      "description": "1 where the front crosses the cell during the step (lfn_out <= 0 < lfn_in)."
    },
    "tign": {
      "type": "unknown",
      "units": "s",
      "description": "Ignition time after the step: ts + dt lfn_in/(lfn_in - lfn_out) (linear interpolation of the zero crossing) where the front crosses the cell, time_now where the cell is still unburnt (lfn_out > 0), otherwise unchanged."
    }
  },
  "equations": [
    {
      "lhs": "time_now",
      "rhs": {
        "op": "+",
        "args": [
          {
            "op": "+",
            "args": [
              "ts",
              "dt"
            ]
          },
          {
            "op": "*",
            "args": [
              {
                "op": "abs",
                "args": [
                  {
                    "op": "+",
                    "args": [
                      "ts",
                      "dt"
                    ]
                  }
                ]
              },
              "par.eps_real32",
              2.0
            ]
          }
        ]
      }
    },
    {
      "lhs": "crossing",
      "rhs": {
        "op": "ifelse",
        "args": [
          {
            "op": "and",
            "args": [
              {
                "op": "<=",
                "args": [
                  "lfn_out",
                  0.0
                ]
              },
              {
                "op": ">",
                "args": [
                  "lfn_in",
                  0.0
                ]
              }
            ]
          },
          1.0,
          0.0
        ]
      }
    },
    {
      "lhs": "tign",
      "rhs": {
        "op": "ifelse",
        "args": [
          {
            "op": ">",
            "args": [
              "lfn_out",
              0.0
            ]
          },
          "time_now",
          {
            "op": "ifelse",
            "args": [
              {
                "op": ">",
                "args": [
                  "crossing",
                  0.5
                ]
              },
              {
                "op": "+",
                "args": [
                  "ts",
                  {
                    "op": "*",
                    "args": [
                      "dt",
                      {
                        "op": "/",
                        "args": [
                          "lfn_in",
                          {
                            "op": "-",
                            "args": [
                              "lfn_in",
                              "lfn_out"
                            ]
                          }
                        ]
                      }
                    ]
                  }
                ]
              },
              "tign_before"
            ]
          }
        ]
      }
    }
  ],
  "tests": [
    {
      "id": "step22_crossing_cell",
      "description": "Reference: NCAR fire_behavior test7 with its end time moved from 10 s to 40 s (the run stops at 11 s, where the atmosphere frames of test7's wrf.nc end; the first 20 steps are those of the 10 s run) (80x80 fire cells of 25 m, dt = 0.5 s, num_tiles = 1), default real32 build, dumped in-model by the ctessum-claude/fire_behavior fork (branch earthsciml-instrumented, commit c9dda02, based on NCAR fire_behavior eb77580, three commits before v1.0.0; -DESM_DUMP=ON; summary output bit-identical to the uninstrumented build). Single precision: rel 1e-5 (the tolerance contract for a single-precision reference). Regime: cell (i,j) = (25, 65), step 22 (ts = 11 s; ls_tign dump call 22), the front crosses the cell during the step (lfn_in = 0.3354 m > 0 >= lfn_out = -0.0924 m): tign is the linear interpolation of the zero crossing, ts + dt lfn_in / (lfn_in - lfn_out). The only crossing in the dumped steps of the default run.",
      "parameter_overrides": {
        "ts": 11.0,
        "dt": 0.5,
        "lfn_in": 0.3354034423828125,
        "lfn_out": -0.09243237972259521,
        "tign_before": 11.00000286102295
      },
      "time_span": {
        "start": 0,
        "end": 1
      },
      "tolerance": {
        "rel": 1e-05
      },
      "assertions": [
        {
          "variable": "time_now",
          "time": 0.0,
          "expected": 11.50000286102295,
          "tolerance": {
            "rel": 1e-07
          }
        },
        {
          "variable": "crossing",
          "time": 0.0,
          "expected": 1.0,
          "tolerance": {
            "abs": 1e-12
          }
        },
        {
          "variable": "tign",
          "time": 0.0,
          "expected": 11.391976356506348,
          "tolerance": {
            "rel": 1e-05
          }
        }
      ]
    },
    {
      "id": "step20_unburnt_cell_near_front",
      "description": "Reference: NCAR fire_behavior test7 (80x80 fire cells of 25 m, dt = 0.5 s, num_tiles = 1), default real32 build, dumped in-model by the ctessum-claude/fire_behavior fork (branch earthsciml-instrumented, commit c9dda02, based on NCAR fire_behavior eb77580, three commits before v1.0.0; -DESM_DUMP=ON; summary output bit-identical to the uninstrumented build). Single precision: rel 1e-5 (the tolerance contract for a single-precision reference). Regime: cell (i,j) = (16, 60), step 20 (ts = 10 s), 13.7 m outside the front at both ends of the step (lfn_in, lfn_out > 0): still unburnt, tign = time_now.",
      "parameter_overrides": {
        "ts": 10.0,
        "dt": 0.5,
        "lfn_in": 13.677032470703125,
        "lfn_out": 13.668548583984375,
        "tign_before": 10.000001907348633
      },
      "expression_template_imports": [
        {
          "ref": "./tests/step20_unburnt_cell_near_front_inputs.esm"
        }
      ],
      "time_span": {
        "start": 0,
        "end": 1
      },
      "tolerance": {
        "rel": 1e-05
      },
      "assertions": [
        {
          "variable": "time_now",
          "time": 0.0,
          "expected": 10.50000286102295,
          "tolerance": {
            "rel": 1e-07
          }
        },
        {
          "variable": "tign",
          "time": 0.0,
          "expected": 10.50000286102295,
          "tolerance": {
            "rel": 1e-05
          }
        }
      ]
    },
    {
      "id": "step20_burning_cell",
      "description": "Reference: NCAR fire_behavior test7 (80x80 fire cells of 25 m, dt = 0.5 s, num_tiles = 1), default real32 build, dumped in-model by the ctessum-claude/fire_behavior fork (branch earthsciml-instrumented, commit c9dda02, based on NCAR fire_behavior eb77580, three commits before v1.0.0; -DESM_DUMP=ON; summary output bit-identical to the uninstrumented build). Single precision: rel 1e-5 (the tolerance contract for a single-precision reference). Regime: cell (i,j) = (17, 60), step 20 (ts = 10 s), already burning (lfn_in <= 0): ignition time unchanged.",
      "parameter_overrides": {
        "ts": 10.0,
        "dt": 0.5,
        "lfn_in": -12.104354858398438,
        "lfn_out": -12.11306381225586,
        "tign_before": 8.99034309387207
      },
      "expression_template_imports": [
        {
          "ref": "./tests/step20_burning_cell_inputs.esm"
        }
      ],
      "time_span": {
        "start": 0,
        "end": 1
      },
      "tolerance": {
        "rel": 1e-05
      },
      "assertions": [
        {
          "variable": "time_now",
          "time": 0.0,
          "expected": 10.50000286102295,
          "tolerance": {
            "rel": 1e-07
          }
        },
        {
          "variable": "tign",
          "time": 0.0,
          "expected": 8.99034309387207,
          "tolerance": {
            "rel": 1e-05
          }
        }
      ]
    },
    {
      "id": "step20_unburnt_cell",
      "description": "Reference: NCAR fire_behavior test7 (80x80 fire cells of 25 m, dt = 0.5 s, num_tiles = 1), default real32 build, dumped in-model by the ctessum-claude/fire_behavior fork (branch earthsciml-instrumented, commit c9dda02, based on NCAR fire_behavior eb77580, three commits before v1.0.0; -DESM_DUMP=ON; summary output bit-identical to the uninstrumented build). Single precision: rel 1e-5 (the tolerance contract for a single-precision reference). Regime: cell (i,j) = (40, 40), step 20 (ts = 10 s), unburnt at the end of the step: tign = time_now.",
      "parameter_overrides": {
        "ts": 10.0,
        "dt": 0.5,
        "lfn_in": 646.3157348632812,
        "lfn_out": 646.3075561523438,
        "tign_before": 10.000001907348633
      },
      "expression_template_imports": [
        {
          "ref": "./tests/step20_unburnt_cell_inputs.esm"
        }
      ],
      "time_span": {
        "start": 0,
        "end": 1
      },
      "tolerance": {
        "rel": 1e-05
      },
      "assertions": [
        {
          "variable": "time_now",
          "time": 0.0,
          "expected": 10.50000286102295,
          "tolerance": {
            "rel": 1e-07
          }
        },
        {
          "variable": "tign",
          "time": 0.0,
          "expected": 10.50000286102295,
          "tolerance": {
            "rel": 1e-05
          }
        }
      ]
    },
    {
      "id": "negative_time_unburnt_cell",
      "description": "Regime: a step ending before t = 0 (ts = -10 s, dt = 0.5 s; a simulation that starts at a negative time), at an unburnt cell. The nudge |time_now| epsilon 2 must move the step-end time UP, to -9.4999981 s, so that tign > ts + dt; scaling ts + dt by (1 + 2 epsilon) would move it down. The expected value is Update_ignition_times' real32 arithmetic evaluated directly (numpy float32), not a dump: no reference run starts at a negative time.",
      "parameter_overrides": {
        "ts": -10.0,
        "dt": 0.5,
        "lfn_in": 646.3157348632812,
        "lfn_out": 646.3075561523438,
        "tign_before": -10.0
      },
      "time_span": {
        "start": 0,
        "end": 1
      },
      "tolerance": {
        "rel": 1e-05
      },
      "assertions": [
        {
          "variable": "time_now",
          "time": 0.0,
          "expected": -9.499998092651367,
          "tolerance": {
            "rel": 1e-07
          }
        },
        {
          "variable": "tign",
          "time": 0.0,
          "expected": -9.499998092651367,
          "tolerance": {
            "rel": 1e-07
          }
        }
      ]
    }
  ]
}