Keech Byram Drought Index and McArthur’s Forest Fire Danger Index¶
kbdi-ffdi is a Python package for calculating the Keech-Byram Drought Index (KBDI) and McArthur’s Forest Fire Danger Index (FFDI) from daily surface-level meteorological data. KBDI and FFDI are commonly used metrics for assessing drought and fire danger in South Africa and Australia. With the kbdi-ffdi Python package, you can compute KBDI and FFDI from csv data or netCDF data and save the results.
Installation¶
Installation will vary depending on whether you are using Anaconda or a regular installation of Python. Here are my recommendations…
(Windows) For Anaconda Users¶
- Download the wheel file (.whl) from the latest release on github (https://github.com/jwarndt/kbdi-ffdi/releases)
2. Start anaconda and activate the Python virtual environment that you would like to install kbdi-ffdi into
C:/Users/Jacob> activate py36
(py36) C:/Users/Jacob>
3. Navigate to the location of the wheel file that you donwloaded
(py36) C:/Users/Jacob> cd Downloads
4. pip install the wheel file
(py36) C:/Users/Jacob/Downloads> pip install kbdi_ffdi-0.1.0-py3-none-any.whl
5. Test to see that the package was installed correctly by activating python, and then importing kbdiffdi
(py36) C:/Users/Jacob/Downloads> python
>>> from kbdiffdi import *
>>>
If the package was installed correctly, you shouldn’t see any errors.
(Windows) For those that do not have Anaconda Installed¶
1. Download the latest version of Anaconda for Windows from: https://www.anaconda.com/download/ Be sure to choose the Python 3.7 version
- Download the wheel file from the latest release of kbdi-ffdi on github (https://github.com/jwarndt/kbdi-ffdi/releases)
- After Anaconda is installed, open the Anaconda Prompt.
4. Navigate to the location of the wheel file that you donwloaded
(C:/Users/Jacob>) cd Downloads
5. pip install the wheel file
(C:/Users/Jacob/Downloads>) pip install kbdi_ffdi-0.1.0-py3-none-any.whl
6. Test to see that the package was installed correctly by activating python, and then importing kbdiffdi
(C:/Users/Jacob/Downloads>) python
>>> from kbdiffdi import *
>>>
If the package was installed correctly, you shouldn’t see any errors.
(Windows) For Regular Python installation Users¶
Quickstart¶
Using the command line tools¶
The primary mechanism for using this application is the command line script named kbdi-ffdi-run
. To run the script, open the Anaconda command line prompt and type the script name followed by its parameters.
The kbdi-ffdi-run
script has an input parameter (the name of the input file that you will compute kbdi and ffdi from) and an output parameter (the name of the output file that data will be saved to). These parameters are specified by including the flags -i
followed by the input filename and -o
followed by the output filename.
- Open the Anaconda Prompt and activate the virtual environment where you installed kdbi-ffdi
- run the following command with the input filename you’d like to process and specify the output filename
C:\Users\Jacob> activate py36
(py36) C:\Users\Jacob> kbdi-ffdi-run -i C:/Users/Jacob/my_weather_data.csv -o C:/Users/Jacob/my_output_data.csv
Jupyter Notebook Example¶
API Reference¶
kbdiffdi.features.feature¶
Spatio-temporal data models
Classes
Class | Description |
---|---|
feature.STFeatureStack() | spatio-temporal data model for data at multiple timesteps |
feature.RasterStack() | spatio-temporal raster data model for rasters at multiple timesteps |
feature.VectorStack() | spatio-temporal vector data model for vector data at multiple timesteps |
feature.STFeature(…) | spatio-temporal data model for a data at a single point in time |
feature.Raster(…) | spatio-temporal raster data model for a single raster at a single point in time |
feature.Vector(…) | spatio-temporal vector data model for a single vector data at a single point in time |
kbdiffdi.indices¶
Indices for drought and forest fire danger
Classes
Class | Description |
---|---|
indices.kbdi() | Keetch-Byram Drought Index |
indices.ffdi() | McArthur’s Forest Fire Danger Index |
References¶
- Kraaij, J. Baard, J. Arndt, L. Vhengani, and B. van Wilgen, An assessment of climate, weather, and fuel factors in influencing a large, destructive wildfire in the Knysna region, South Africa, Fire Ecology, vol. 14, no. 2, 2018.
- McArthur, Fire behaviour in eucalypt forests, Canberra: Forestry and Timber Bureau, 1967.
- Noble, A. M. Gill, and G. A. V. Bary, McArthur’s fire-danger meters expressed as equations, Australian Journal of Ecology, vol. 5, no. 2, pp. 201-203, 1980.
- Lucas, On developing a historical fire weather data-set for Australia, Australian Meteorological and Oceanographic Journal, vol. 60, no. 1, pp. 1-14, 2010.
- Keech and G. M. Byram, A drought index for forest fire control, USDA Forest Service Research Paper SE-38, 1968.
- Holgate, A. van Dijk, G. J. Cary, and M. Yebra, Using alternative soil moisture estimates in the McArthur Forest Fire Danger Index, International Journal of Wildland Fire, vol 26, pp. 806-819, 2017.
- Griffiths, Improved formula for the drought factor in McArthur’s Forest Fire Danger Meter, Australian Forestry, vol. 62, no. 2, pp. 202-206, 1999.
- Finkele, G. A. Mills, G. Beard, and D. A. Jones, National gridded drought factors and comparison of two soil moisture deficit formulations used in prediction of Forest Fire Danger Index in Australia, Australian Meteorological Magazine, vol. 55, pp. 183-197, 2006.