fof_ci.h
Go to the documentation of this file.
1 //
2 // $Id$
3 //
4 /*{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}
5 * Name: fof_ci.h Consume Data Inputs
6 * Date: 11/05/03
7 {*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{**/
8 
9 
10 /* These are the Fuel load limits that CI checks in the CI struct before */
11 /* sending into Burnup, Burnup has its' own limits it checks but they are */
12 /* much larger */
13 /* NOTE: these are NOT user for Duff load */
14 #define e_CI_LoadLimLow (float) 0.0
15 #define e_CI_LoadLimUp (float) 999.0
16 
17 
18 /*.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.*/
19 /* Note-1 */
20 /* f_PerDufCon = this is an input for Burnup, */
21 /* percent of duff that is consumed, whole number 0 -> 100 */
22 /* send in a -1 will cause burnup to use it's orginal default */
23 /* settings */
24 /* f_HSFCon = this is an input for Burnup, in Tons Per Are */
25 /* This is the amount of Shrub, Herb, Foliage and Branch that */
26 /* the caller of Burnup says gets consumed in the fire */
27 /* Burnup doesn't model these inputs so they need to be sent */
28 /* in. */
29 /* This value gets used by Burnup to calculate intial fire */
30 /* intensity and for emissions calculations. */
31 /* */
32 /* Moistures = send in as whole numbers */
33 /* Loads = tons per acre */
34 /* file names = enter a file name or for none use NULL ("") */
35 /* */
36 
37 typedef struct {
38 
39 #define e_DufMin 0.446 /* limits tons per acre, NOTE: these must jive */
40 #define e_DufMax 356.79 /* with the kg/2 e_wdf1,e_wdf1 in bur_brn.h */
41 float f_Duff; /* Duff Load - Limits in tpa .446 ->356.79 */
42 
43 #define e_DufDepMin 0.0 /* limits inches */
44 #define e_DufDepMax 999.0
45 float f_DufDep; /* Duff Depth - inches limit 0 --> 999 */
46 
47 float f_MoistDuff; /* Duff moisture, Limits 10 -> 197.2 */
48  /* See defines in bur_brn.h */
49 
50 #define e_MoiDW10Min 3.0
51 #define e_MoiDW10Max 298.0
52 float f_MoistDW10; /* Down Wood 10 hr Moisture, limit 3 -> 298 */
53 
54 
55 float f_MoistDW1000; /* Down Wood 1k hr Moiture, limits 1 -> 300 */
56  /* See defines in bur_brn.h */
57 
58 float f_Lit; /* Litter */
59 float f_DW1; /* 1 Hr, 0->1/4 inch */
60 float f_DW10; /* 10 Hr, 1/4 -> 1 inch */
61 float f_DW100; /* 100 Hr, 1 -> 3 inch */
62 
63 /*...........................................................................*/
64 /* NOTE: */
65 /* FOFEM5 uses f_DW1000 and f_pcRot, gets from user interface */
66 /* splits into 3,6,9,20, and used in graph, etc */
67 /* They aren't need for the actual calcs. */
68 /* For other users, DLL, Batch, etc just need to fill in the 3,6,9,20 */
69 /* sound and rotten */
70 /* cr_WD..gets used when reading in a batch file to hold the weigh dist */
71 /* code, it will get used to distrubute the loads to size clases */
72 float f_DW1000; /* Total 1000 hr wood, 3+ inch */
73 float f_pcRot; /* percent rotten */
74 #define eC_WD 30 /* Weight Dist id code, Even,Left,etc*/
75 char cr_WD[eC_WD];
76 
77 
78 float f_Snd_DW3; /* Large Wood Sound 1000 Hr */
79 float f_Snd_DW6; /* 3,6,9 & 20+ size classes */
80 float f_Snd_DW9;
81 float f_Snd_DW20;
82 
83 float f_Rot_DW3; /* Large Wood Rotten 1000 Hr */
84 float f_Rot_DW6;
85 float f_Rot_DW9;
86 float f_Rot_DW20;
87 
88 
89 /*-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.*/
90 /* CI fields need for non-burnup calcs */
91 float f_CroFol; /* Crown Foliage Load */
92 float f_CroBra; /* Crown Branch Load */
93 float f_Pc_CroBrn; /* Percent of Crown that burns 0 -> 100 whole num */
94 float f_Herb; /* Herb Load */
95 float f_Shrub; /* Shrub Load */
96 
97 /*...........................................................................*/
98 /* NOTE: these fields get filled in the CM_Mngr() function after it calcs */
99 /* the consumed load for herb+Shr+Fol+Bra, duff */
100 /* So you don't need to fill these in unless you call BCM_Mngr() direct */
101 /* See Note-2 above */
102 float f_HSFCon; /* Herb,Shrub,Foliage,Branch consumed */
103 float f_PerDufCon; /* % of Duff consumed, See Notes above*/
104 
105 /*...........................................................................*/
106 /* If a path/filename is put in here then burnup will create the files */
107 /* and leave them there */
108 char cr_LoadFN[400]; /* Burnup output Amount File Name */
109 char cr_EmiFN[400]; /* Burnup output Emission File Name */
110 
111 /*.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.*/
112 /* These variables get initialized in the CI_Init() function with */
113 /* default values. */
114 /* These values are then sent into burnup with this structure whereas they */
115 /* use to go directly to burnup, they are in here now so that they can be */
116 /* set by a user if they want, if not they will get set with defaults in */
117 /* the CI_Init() function */
118 /* I put these paramters here in case a user would want to set them. */
119 /* In fofem5 they could only set them if they used the burnup input file */
120 /* option */
121 
122 /* Sigma values sent into burnup .........defaults */
123 float f_SURat_Lit; /* 8200.0 */
124 float f_SURat_DW1; /* 1480.0 */
125 float f_SURat_DW10; /* 394.0 */
126 float f_SURat_DW100; /* 105.0 */
127 float f_SURat_DWk_3_6; /* 39.4 */
128 float f_SURat_DWk_6_9; /* 21.9 */
129 float f_SURat_DWk_9_20; /* 12.7 */
130 float f_SURat_DWk_20; /* 5.91 */
131 
132 long int l_MAX_TIMES; /* maximum number iterations burnup does, default 3000 */
133 
134 float f_INTENSITY; /* intensity of the igniting surface fire, kW/m2 sq m, 40.0 -> 1.0e5, burnup var - fi */
135 
136 float f_IG_TIME; /* residence time of the ignition surface fire, seconds */
137  /* default = 60.0, fofem's burnup input file uses 30.0 */
138  /* burnup var = ti, limits 10.0 -> 200.0 */
139 
140 float f_WINDSPEED; /* windspeed at top of fuelbed meters/second */
141  /* burnup var = u, default 0, limits 0.0 -> 5.0, */
142 
143 float f_DEPTH; /* fuel depth, meters, */
144  /* burnup var = d, defualt 0.3, limits 0.1 -> 5.0 */
145 
146 float f_AMBIENT_TEMP; /* ambient air temperature, degrees Celcus */
147  /* burnup var = tamb, default 27, */
148  /* if ( tamb-273 < tam1 || tamb-273 > tam2) */
149  /* const double tam1 = -40.0, tam2 = 40.0; */
150 
151 float f_R0; /* fire environment minumum dimension paramter */
152  /* default 1.83 */
153 
154 float f_DR; /* fire environment increment temp parater */
155  /* default 0.40 */
156 
157 float f_TIMESTEP; /* time step for integration of burning rates. */
158  /* TIMESTEP * MAX_TIMES gives max simulation period */
159 
160 
161 
162 /*-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.*/
163 /* Cover Group */
164 #define e_GrassGroup "GrassGroup"
165 #define e_SageBrush "Sagebrush"
166 #define e_ShrubGroup "ShrubGroup"
167 #define e_Pocosin "Pocosin"
168 #define e_Ponderosa "Ponderosa"
169 #define e_WhiPinHem "WhiPinHem" /* White Pine Hemlock */
170 #define e_RedJacPin "RedJacPin" /* Red Jack Pine */
171 #define e_BalBRWSpr "BalBRWSpr" /* Balsam, Blk Red Whit Spruce */
172 
173 
174 #define GRASSGROUP e_GrassGroup
175 #define SAGEBRUSH e_SageBrush
176 #define SHRUBGROUP e_ShrubGroup
177 #define POCOSIN e_Pocosin
178 #define PONDEROSA e_Ponderosa
179 #define WHIPINHEM e_WhiPinHem
180 #define REDJACPIN e_RedJacPin
181 #define BALBRWSPR e_BalBRWSpr
182 #define eC_CoverGroup 50
183 char cr_CoverGroup [eC_CoverGroup];
184 
185 
186 /* Cover Type Classification */
187 #define e_CI_SAF "SAF"
188 #define e_CI_NVCS "NVCS"
189 #define e_CI_FCC "FCC"
190 #define e_CI_DefaultCoverClass e_CI_SAF
191 
192 char cr_CoverClass[20];
193 
194 
195 /*-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.*/
196 /* Season */
197 #define e_Winter "Winter"
198 #define e_Spring "Spring"
199 #define e_Summer "Summer"
200 #define e_Fall "Fall"
201 
202 #define WINTER e_Winter
203 #define SPRING e_Spring
204 #define SUMMER e_Summer
205 #define FALL e_Fall
206 
207 #define e_SeasonDefault e_Summer /* Season is a required field though */
208 
209 
210 #define eC_Season 20
211 char cr_Season[eC_Season];
212 
213 
214 /*-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.*/
215 /* Region */
216 #define e_CI_SouthEast "SouthEast"
217 #define e_CI_InteriorWest "InteriorWest"
218 #define e_CI_PacificWest "PacificWest"
219 #define e_CI_NorthEast "NorthEast"
220 
221 #define SOUTHEAST e_CI_SouthEast
222 #define INTERIORWEST e_CI_InteriorWest
223 #define PACIFICWEST e_CI_PacificWest
224 #define NORTHEAST e_CI_NorthEast
225 #define eC_Region 20
226 char cr_Region[eC_Region];
227 
228 
229 /*-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.*/
230 /* Fuel Category */
231 #define e_Natural "Natural"
232 #define e_Piles "Piles"
233 #define e_Slash "Slash"
234 
235 #define NATURAL e_Natural
236 #define PILES e_Piles
237 #define SLASH e_Slash
238 
239 #define e_FuelCategoryDefault e_Natural /* Default */
240 
241 #define eC_FuelCategory 20
242 
243 char cr_FuelCategory[eC_FuelCategory];
244 
245 /*-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.*/
246 /* Moisture Method */
247 #define e_Entire "Entire" /* Duff Moisture Methods */
248 #define e_Lower "Lower" /* tells what method was used */
249 #define e_NFDR "NFDR" /* to measure the duff moist. */
250 #define e_Adj_NFDR "AdjNFDR"
251 
252 #define ENTIRE e_Entire
253 #define LOWER e_Lower
254 #define NFDR e_NFDR
255 #define ADJ_NFDR e_Adj_NFDR
256 
257 #define e_DufMoiMetDefault "" /* Default */
258 
259 #define eC_DufMoiMet 20
260 char cr_DufMoiMet [eC_DufMoiMet];
261 
262 } d_CI;
263 
264 
265 /*-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.*/
266 void WINAPI CI_Init (d_CI *a_CI);
267 
268 int CI_isSpring (d_CI *a_CI);
269 int CI_isFall (d_CI *a_CI);
270 int CI_isWinter (d_CI *a_CI);
271 int CI_isSummer (d_CI *a_CI);
272 int CI_isSeason (d_CI *a_CI);
273 
274 int CI_isShrubGroup (d_CI *a_CI);
275 int CI_isGrassGroup (d_CI *a_CI);
276 int CI_isSageBrush (d_CI *a_CI);
277 int CI_isPocosin (d_CI *a_CI);
278 int CI_isPonderosa (d_CI *a_CI);
279 int CI_isWhiPinHem (d_CI *a_CI);
280 int CI_isRedJacPin (d_CI *a_CI);
281 int CI_isBalBRWSpr (d_CI *a_CI);
282 int CI_isCoverGroup (d_CI *a_CI);
283 
284 int CI_isSouthEast (d_CI *a_CI);
285 int CI_isInteriorWest(d_CI *a_CI);
286 int CI_isPacificWest (d_CI *a_CI);
287 int CI_isNorthEast (d_CI *a_CI);
288 
289 
290 int CI_isNatural(d_CI *a_CI);
291 int CI_isPiles (d_CI *a_CI);
292 int CI_isSlash (d_CI *a_CI);
293 
294 int CI_isDufEntire (d_CI *a_CI);
295 int CI_isDufLower (d_CI *a_CI);
296 int CI_isDufNFDR (d_CI *a_CI);
297 int CI_isDufAdjNFDR (d_CI *a_CI);
298 int CI_isDufMethod (d_CI *a_CI);
299 
300 
301 int CI_isDuffWet (d_CI *a_CI);
302 
303 void CI_Display (d_CI *a_CI);
304 float CI_MaxLoad (d_CI *a_CI);
305 int CI_OnlyDuff (d_CI *a_CI);
int CI_isWinter(d_CI *a_CI)
Definition: fof_ci.c:109
int CI_isSeason(d_CI *a_CI)
Definition: fof_ci.c:110
float f_SURat_Lit
Definition: fof_ci.h:123
float f_Herb
Definition: fof_ci.h:94
float f_MoistDW1000
Definition: fof_ci.h:55
float f_SURat_DW1
Definition: fof_ci.h:124
#define eC_WD
Definition: fof_ci.h:74
float f_SURat_DWk_6_9
Definition: fof_ci.h:128
int CI_isShrubGroup(d_CI *a_CI)
Definition: fof_ci.c:118
float f_DW10
Definition: fof_ci.h:60
Definition: fof_ci.h:37
int CI_isGrassGroup(d_CI *a_CI)
Definition: fof_ci.c:117
float f_IG_TIME
Definition: fof_ci.h:136
int CI_isDufAdjNFDR(d_CI *a_CI)
Definition: fof_ci.c:171
float f_SURat_DWk_9_20
Definition: fof_ci.h:129
float f_Duff
Definition: fof_ci.h:41
int CI_isSpring(d_CI *a_CI)
Definition: fof_ci.c:106
float f_DW1
Definition: fof_ci.h:59
#define eC_CoverGroup
Definition: fof_ci.h:182
int CI_isNatural(d_CI *a_CI)
Definition: fof_ci.c:143
float f_Snd_DW9
Definition: fof_ci.h:80
int CI_isCoverGroup(d_CI *a_CI)
Definition: fof_ci.c:125
int CI_isRedJacPin(d_CI *a_CI)
Definition: fof_ci.c:123
float f_SURat_DWk_3_6
Definition: fof_ci.h:127
float f_R0
Definition: fof_ci.h:151
int CI_isSouthEast(d_CI *a_CI)
Definition: fof_ci.c:133
int CI_isSlash(d_CI *a_CI)
Definition: fof_ci.c:145
#define eC_FuelCategory
Definition: fof_ci.h:241
float f_PerDufCon
Definition: fof_ci.h:103
float f_DW100
Definition: fof_ci.h:61
float f_Rot_DW20
Definition: fof_ci.h:86
float f_MoistDW10
Definition: fof_ci.h:52
int CI_isPiles(d_CI *a_CI)
Definition: fof_ci.c:144
float f_CroBra
Definition: fof_ci.h:92
float f_TIMESTEP
Definition: fof_ci.h:157
float f_Lit
Definition: fof_ci.h:58
float f_Shrub
Definition: fof_ci.h:95
int CI_isPonderosa(d_CI *a_CI)
Definition: fof_ci.c:121
float f_Snd_DW3
Definition: fof_ci.h:78
int CI_isNorthEast(d_CI *a_CI)
Definition: fof_ci.c:136
#define eC_DufMoiMet
Definition: fof_ci.h:259
void WINAPI CI_Init(d_CI *a_CI)
Definition: fof_ci.c:36
float f_DufDep
Definition: fof_ci.h:45
float f_Snd_DW6
Definition: fof_ci.h:79
int CI_OnlyDuff(d_CI *a_CI)
Definition: fof_ci.c:242
int CI_isSageBrush(d_CI *a_CI)
Definition: fof_ci.c:119
int CI_isFall(d_CI *a_CI)
Definition: fof_ci.c:107
long int l_MAX_TIMES
Definition: fof_ci.h:132
int CI_isPocosin(d_CI *a_CI)
Definition: fof_ci.c:120
int CI_isDuffWet(d_CI *a_CI)
Definition: fof_ci.c:203
#define eC_Season
Definition: fof_ci.h:210
int CI_isInteriorWest(d_CI *a_CI)
Definition: fof_ci.c:134
float f_Rot_DW9
Definition: fof_ci.h:85
float f_INTENSITY
Definition: fof_ci.h:134
float f_DEPTH
Definition: fof_ci.h:143
int CI_isWhiPinHem(d_CI *a_CI)
Definition: fof_ci.c:122
float f_CroFol
Definition: fof_ci.h:91
float f_Pc_CroBrn
Definition: fof_ci.h:93
float f_DW1000
Definition: fof_ci.h:72
float f_SURat_DW10
Definition: fof_ci.h:125
float f_Rot_DW6
Definition: fof_ci.h:84
#define eC_Region
Definition: fof_ci.h:225
float f_pcRot
Definition: fof_ci.h:73
float f_SURat_DW100
Definition: fof_ci.h:126
int CI_isPacificWest(d_CI *a_CI)
Definition: fof_ci.c:135
int CI_isSummer(d_CI *a_CI)
Definition: fof_ci.c:108
float f_DR
Definition: fof_ci.h:154
int CI_isBalBRWSpr(d_CI *a_CI)
Definition: fof_ci.c:124
int CI_isDufEntire(d_CI *a_CI)
Definition: fof_ci.c:152
float f_MoistDuff
Definition: fof_ci.h:47
float f_AMBIENT_TEMP
Definition: fof_ci.h:146
void CI_Display(d_CI *a_CI)
float f_WINDSPEED
Definition: fof_ci.h:140
int CI_isDufMethod(d_CI *a_CI)
Definition: fof_ci.c:178
float f_SURat_DWk_20
Definition: fof_ci.h:130
float f_HSFCon
Definition: fof_ci.h:102
float f_Snd_DW20
Definition: fof_ci.h:81
float CI_MaxLoad(d_CI *a_CI)
Definition: fof_ci.c:218
float f_Rot_DW3
Definition: fof_ci.h:83
int CI_isDufNFDR(d_CI *a_CI)
Definition: fof_ci.c:164
int CI_isDufLower(d_CI *a_CI)
Definition: fof_ci.c:157