-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathREADME.txt
96 lines (56 loc) · 3.45 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
Installation:
python setup.py build
sudo python setup.py install
This will install pyFWI to the standard distribution location (/usr/local/lib/python2.6/dist-packages/) and FWI.py to a standard location on your path (/usr/local/bin/FWI.py).
Usage:
pyFWI:
import pyFWI
or
from pyFWI import *
FWI Functions:
FFMC - takes temperature, relative humidity, wind speed, rain, and a previous FFMC value to produce the current FFMC value
- FFMC(17,42,25,0,85) = 87.692980092774448
DMC - takes temperature, relative humidity, rainfall, previous DMC value, latitude, and current month to produce the current DMC value
- DMC(17,42,0,6,45.98,4) = 8.5450511359999997
DC - takes temperature, rain, the previous DC value, latititude, and current month to produce the current DC value
- DC(17,0,15,45.98,4) = 19.013999999999999
ISI - takes the wind speed and current FFMC value to produce the current ISI value
- ISI(25,87.692980092774448) = 10.853661073655068
BUI - takes the current DMC and DC values to produce the current BUI value
- BUI(8.5450511359999997,19.013999999999999) = 8.4904265358371838
FWI - takes the current ISI and BUI values to produce the current FWI value
- FWI(10.853661073655068,8.4904265358371838) = 10.096371392382368
calcFWI - this function returns the current FWI value given all of the input values:
month, temperature, relative humidity, wind speed, rain, previous FFMC, DMC, DC, and latitude
- calcFWI(4,17,42,25,0,85,6,15,45.98) = 10.096371392382368
Lawson equations:
All of these equations take the current DMC and DC values and return moisture content as a % value
LawsonEq1 - DMC National Standard and Coastal B.C. CWH (2.5-4 cm)^2
- LawsonEq1(8.5450511359999997) = 250.7553985454235
LawsonEq2 - Southern Interior B.C.3 (2-4 cm)^2
- LawsonEq2(8.5450511359999997) = 194.93023948344205
LawsonEq3 - Southern Yukon - Pine/White Spruce
Feather moss, Sphagnum and Undifferentiated duff (2-4 cm)^2
- LawsonEq3(8.5450511359999997) = 442.82109267231488
LawsonEq4 - Southern Yukon - Pine/White Spruce
Reindeer lichen (2-4 cm)^2
- LawsonEq4(8.5450511359999997) = 746.02210402093272
LawsonEq5 - Southern Yukon - White Spruce
White spruce/feather moss (2-4 cm)^2
- LawsonEq5(8.5450511359999997) = 853.2397847094652
Command Line:
FWI.py is a command line script that will run the FWI calculations on a CSV file, which must follow a specific format:
date format, latitude, FFMC init value, DMC init value, DC init value
date, temperature, relative humidity, wind speed, and rain
...
The script will add the results of the calculations to the end of each line so the output format will be:
date format, latitude, FFMC init value, DMC init value, DC init value
date, temperature, relative humidity, wind speed, and rain, FFMC, DMC, DC, ISI, BUI, FWI
...
It is perfectly acceptable to modify the starting parameters of a file and rerun it without removing the calculated values, they will simply overwritten.
Date format strings are the same as the python datetime format strings.
EX) %m/%d/%Y is month/day/Year
A sample csv file has been provided, testBatch.csv, to run it:
FWI.py testBatch.csv
If everything installed correctly you will get the following as the last line in the file:
05/31/2000,18,36,5,0,88.459218921423258,16.306350982650134,112.613439577131,4.4216825593812317,23.944744397369018,7.8745783992324254