improver.fire_weather.duff_moisture_code module#
- class DuffMoistureCode[source]#
Bases:
IterativeFireWeatherBasePlugin to calculate the Duff Moisture Code (DMC).
The DMC is a numerical rating of the average moisture content of loosely compacted organic layers of moderate depth. It indicates fuel consumption in moderate duff layers and medium-size woody material. Higher values indicate drier conditions.
- This process is adapted directly from:
Equations and FORTRAN Program for the Canadian Forest Fire Weather Index System (C.E. Van Wagner and T.L. Pickett, 1985). Page 6, Equations 11-16.
- Expected input units:
Temperature: degrees Celsius
Precipitation: mm (24-hour accumulation)
Relative humidity: percentage (0-100)
Previous DMC: dimensionless
Month: integer (1-12) for day length factor lookup
- DMC_DAY_LENGTH_FACTORS = [0.0, 6.5, 7.5, 9.0, 12.8, 13.9, 13.9, 12.4, 10.9, 9.4, 8.0, 7.0, 6.0]#
-
INPUT_CUBE_NAMES:
list[str] = ['air_temperature', 'lwe_thickness_of_precipitation_amount', 'relative_humidity', 'duff_moisture_code']#
- _abc_impl = <_abc._abc_data object>#
- _calculate()[source]#
Calculate the Duff Moisture Code (DMC).
- Returns:
The calculated DMC values for the current day.
- Return type:
np.ndarray
- _calculate_dmc(drying_rate)[source]#
Calculates the Duff Moisture Code from previous DMC and drying rate. Note that the drying rate is expected to be pre-multiplied by 100 for computational efficiency. This mathematically matches the original algorithm, but is more efficient to implement this way.
From Van Wagner and Pickett (1985), Page 6: Equation 16.
- _calculate_drying_rate()[source]#
Calculates the drying rate for DMC. This is multiplied by 100 for computational efficiency in the final DMC calculation. The original algorithm calculates K and then multiplies it by 100 in the DMC equation.
Temperature is bounded to a minimum of -1.1°C. Uses the day length factor for the current month from DMC_DAY_LENGTH_FACTORS.
From Van Wagner and Pickett (1985), Page 6: Equation 16, Steps 3 & 4.
- Return type:
- Returns:
The drying rate (dimensionless). Shape matches input cube data shape. This value is added to previous DMC to get today’s DMC.
- _perform_rainfall_adjustment()[source]#
Updates the previous DMC value based on available precipitation accumulation data for the previous 24 hours. This is done element-wise for each grid point.
From Van Wagner and Pickett (1985), Page 6: Equations 11-15, and Steps 2a-2e corresponding to rainfall adjustment.