CFFDRS FWI Implementation. More...
#include <CWFGM_FWI.h>
Public Member Functions | |
CCWFGM_FWI () | |
STDMETHOD() | HourlyFFMC_VanWagner (double in_ffmc, double rain, double temperature, double rh, double ws, ULONG seconds_since_ffmc, double *ffmc) |
STDMETHOD() | HourlyFFMC_Equilibrium (double in_ffmc, double rain, double temperature, double rh, double ws, ULONG seconds_since_ffmc, double *ffmc) |
STDMETHOD() | HourlyFFMC_Lawson (double in_ffmc_prevday, double in_ffmc_currday, double rain, double temperature, double rh, double ws, unsigned long seconds_into_day, double *ffmc) |
STDMETHOD() | HourlyFFMC_VanWagner_Previous (double current_ffmc, double rain, double temperature, double rh, double ws, double *prev_ffmc) |
STDMETHOD() | HourlyFFMC_Equilibrium_Previous (double current_ffmc, double rain, double temperature, double rh, double ws, double *prev_ffmc) |
STDMETHOD() | HourlyFFMC_Lawson_Contiguous (double in_ffmc_prevday, double in_ffmc_currday, double rain, double temperature, double rh_0, double rh, double rh_1, double ws, unsigned long seconds_into_day, double *ffmc) |
STDMETHOD() | HourlyFFMC_Hybrid (double in_prev_std_ffmc, double in_curr_std_ffmc, double in_ffmc, SAFEARRAY *rain48, double temperature, double rh, double ws, unsigned long seconds_into_day, double *ffmc) |
STDMETHOD() | DailyFFMC_VanWagner (double in_ffmc, double rain, double temperature, double rh, double ws, double *ffmc) |
STDMETHOD() | DMC (double in_dmc, double rain, double temperature, double latitude, double longitude, unsigned short month, double rh, double *dmc) |
STDMETHOD() | DC (double in_dc, double rain, double temperature, double latitude, double longitude, unsigned short month, double *dc) |
STDMETHOD() | FF (double ffmc, ULONG seconds_since_ffmc, double *ff) |
STDMETHOD() | ISI_FWI (double ffmc, double ws, ULONG seconds_since_ffmc, double *isi) |
STDMETHOD() | ISI_FBP (double ffmc, double ws, ULONG seconds_since_ffmc, double *isi) |
STDMETHOD() | BUI (double dc, double dmc, double *bui) |
STDMETHOD() | FWI (double isi, double bui, double *fwi) |
STDMETHOD() | DSR (double fwi, double *dsr) |
Public Member Functions inherited from ICWFGM_FWI | |
HRESULT | HourlyFFMC_VanWagner ([in]double in_ffmc, [in]double rain, [in]double temperature, [in]double rh, [in]double ws, [in]unsigned long seconds_since_ffmc, [out, retval]double *ffmc) |
HRESULT | HourlyFFMC_Equilibrium ([in]double in_ffmc, [in]double rain, [in]double temperature, [in]double rh, [in]double ws, [in]unsigned long seconds_since_ffmc, [out, retval]double *ffmc) |
HRESULT | HourlyFFMC_Lawson ([in]double prev_std_ffmc, [in]double curr_std_ffmc, [in]double rain, [in]double temperature, [in]double rh, [in]double ws, [in]unsigned long seconds_into_day, [out, retval]double *ffmc) |
HRESULT | HourlyFFMC_VanWagner_Previous ([in]double current_ffmc, [in]double rain, [in]double temperature, [in]double rh, [in]double ws, [out, retval]double *prev_ffmc) |
HRESULT | HourlyFFMC_Equilibrium_Previous ([in]double current_ffmc, [in]double rain, [in]double temperature, [in]double rh, [in]double ws, [out, retval]double *prev_ffmc) |
HRESULT | HourlyFFMC_Lawson_Contiguous ([in]double in_prev_std_ffmc, [in]double in_curr_std_ffmc, [in]double rain, [in]double temperature, [in]double rh_0, [in]double rh_t, [in]double rh_1, [in]double ws, [in]unsigned long seconds_into_day, [out, retval]double *ffmc) |
HRESULT | HourlyFFMC_Hybrid ([in]double in_prev_std_ffmc, [in]double in_curr_std_ffmc, [in]double in_ffmc, [in]SAFEARRAY(double) rain48, [in]double temperature, [in]double rh, [in]double ws, [in]unsigned long seconds_into_day, [out, retval]double *ffmc) |
HRESULT | DailyFFMC_VanWagner ([in]double in_ffmc, [in]double rain, [in]double temperature, [in]double rh, [in]double ws, [out, retval]double *ffmc) |
HRESULT | DMC ([in]double in_dmc, [in]double rain, [in]double temperature, [in]double latitude, [in]double longitude, [in]unsigned short month, [in]double rh, [out, retval]double *dmc) |
HRESULT | DC ([in]double in_dc, [in]double rain, [in]double temperature, [in]double latitude, [in]double longitude, [in]unsigned short month, [out, retval]double *dc) |
HRESULT | FF ([in]double ffmc, [in]unsigned long seconds_since_ffmc, [out, retval]double *ff) |
HRESULT | ISI_FWI ([in]double ffmc, [in]double ws, [in]unsigned long seconds_since_ffmc, [out, retval]double *isi) |
HRESULT | ISI_FBP ([in]double ffmc, [in]double ws, [in]unsigned long seconds_since_ffmc, [out, retval]double *isi) |
HRESULT | BUI ([in]double dc, [in]double dmc, [out, retval]double *bui) |
HRESULT | FWI ([in]double isi, [in]double bui, [out, retval]double *fwi) |
HRESULT | DSR ([in]double fwi, [out, retval]double *dsr) |
CFFDRS FWI Implementation.
The FWI standard is the first major subsystem of the CFFDRS to be completed. It provides relative measures of fuel moisture and fire behavior potential. It is encapsulated in its own COM object. A COM interface was chosen over a regular DLL interface only so that applications programmed in other languages could use this functionality. This object does not support the standard COM IPersistStream, IPersistStreamInit, and IPersistStorage interfaces, since this object does not maintain any state information, it is only a collection of methods.
|
inline |
Default Constructor
CCWFGM_FWI::BUI | ( | double | dc, |
double | dmc, | ||
double * | bui | ||
) |
Calculate BUI (buildup index) from DC, DMC. BUI provides a numerical, relative indication of the amount of fuel available for combustion.
dc | DC value |
dmc | DMC value |
bui | Calculated BUI value |
E_POINTER | The BUI address provided is invalid |
S_OK | Successful |
E_INVALIDARG | Failure during calculation |
CCWFGM_FWI::DailyFFMC_VanWagner | ( | double | in_ffmc, |
double | rain, | ||
double | temperature, | ||
double | rh, | ||
double | ws, | ||
double * | ffmc | ||
) |
Calculates daily FFMC (fine fuel moisture code), based on the previous day's FFMC and provided conditions. FFMC is a numerical rating of the moisture content of litter and other cured fine fuels.
in_ffmc | The previous day's Van Wagner FFMC value |
rain | Precipitation in the prior 24 hours (noon to noon, LST), mm |
temperature | Noon (LST) temperature, Celsius |
rh | Relative humidity expressed as a fraction ([0..1]) |
ws | Wind speed (kph) at noon LST |
ffmc | Calculated FFMC value |
E_POINTER | The FFMC address provided is invalid |
S_OK | Successful |
E_INVALIDARG | Failure during calculation |
CCWFGM_FWI::DC | ( | double | in_dc, |
double | rain, | ||
double | temperature, | ||
double | latitude, | ||
double | longitude, | ||
unsigned short | month, | ||
double * | dc | ||
) |
Calculates DC (drought code) given the previous day's DC and provided conditions. DC provides a numerical rating of the average moisture content of the deep (10-24 cm), compact organic layers.
in_dc | The previous day's DC value |
rain | Precipitation in the prior 24 hours (noon to noon, LST), mm |
temperature | Noon (LST) temperature, Celsius |
latitude | Radians, used to determine the appropriate table as defined in "Latitude Considerations in Adapting the Canadian Forest Fire Weather Index System To Other Countries", M.E. Alexander, in prep as Index X in Weather Guide for the Canadian Forest Fire Danger Rating System by B.D. Lawson, O.B. Armitage. |
longitude | Radians, reserved for future use, currently unused (may be if/as/when more regional constants are defined) |
month | Origin 0 (January = 0, December = 11) |
dc | Calculated DC value |
E_POINTER | The DC address provided is invalid |
S_OK | Successful |
E_INVALIDARG | Failure during calculation or month is greater than 11, assuming January is 0. |
CCWFGM_FWI::DMC | ( | double | in_dmc, |
double | rain, | ||
double | temperature, | ||
double | latitude, | ||
double | longitude, | ||
unsigned short | month, | ||
double | rh, | ||
double * | dmc | ||
) |
Calculates daily DMC (duff moisture code) given the previous day's DMC and provided conditions. DMC provides a numerical rating of the average moisture content of the loosely compact organic layers of a moderate depth (5-10cm).
in_dmc | The previous day's DMC value |
rain | Precipitation in the prior 24 hours (noon to noon, LST), mm |
temperature | Noon (LST) temperature, Celsius |
latitude | Radians, used to determine the appropriate table as defined in "Latitude Considerations in Adapting the Canadian Forest Fire Weather Index System To Other Countries", M.E. Alexander, in prep as Index X in Weather Guide for the Canadian Forest Fire Danger Rating System by B.D. Lawson, O.B. Armitage. |
longitude | Radians, reserved for future use, currently unused (may be if/as/when more regional constants are defined) |
month | Origin 0 (January = 0, December = 11) |
rh | Relative humidity expressed as a fraction ([0..1]) at noon LST |
dmc | Calculated DMC value |
E_POINTER | The DMC address provided is invalid |
S_OK | Successful |
E_INVALIDARG | Failure during calculation or month is greater than 11, assuming January is 0. |
CCWFGM_FWI::DSR | ( | double | fwi, |
double * | dsr | ||
) |
Calculates DSR from FWI.
fwi | FWI value |
dsr | Calculated DSR value |
E_POINTER | The DSR address provided is invalid |
S_OK | Successful |
E_INVALIDARG | Failure during calculation |
CCWFGM_FWI::FF | ( | double | ffmc, |
ULONG | seconds_since_ffmc, | ||
double * | ff | ||
) |
Calculates f(F), which is used to calculate ISI from FFMC.
ffmc | FFMC value |
seconds_since_ffmc | Seconds since observed ffmc |
ff | Calculated f(F) value |
E_POINTER | The FF address provided is invalid |
S_OK | Successful |
E_INVALIDARG | Failure during calculation |
CCWFGM_FWI::FWI | ( | double | isi, |
double | bui, | ||
double * | fwi | ||
) |
Calculates FWI (fire weather index) from ISI and BUI. FWI provides a numerical, relative rating of fire intensity.
isi | ISI value |
bui | BUI value |
fwi | Calculated FWI value |
E_POINTER | The FWI address provided is invalid |
S_OK | Successful |
E_INVALIDARG | Failure during calculation |
CCWFGM_FWI::HourlyFFMC_Equilibrium | ( | double | in_ffmc, |
double | rain, | ||
double | temperature, | ||
double | rh, | ||
double | ws, | ||
ULONG | seconds_since_ffmc, | ||
double * | ffmc | ||
) |
Calculates hourly FFMC (fine fuel moisture code), using the experimental Equilibrium mathematical model developed by K. Anderson, based on the previous hour's FFMC and provided conditions. FFMC is a numerical rating of the moisture content of litter and other cured fine fuels.
in_ffmc | The previous time's Van Wagner FFMC value |
rain | Precipitation in the prior hour, mm |
temperature | Celsius |
rh | Relative humidity expressed as a fraction ([0..1]) |
ws | Wind speed (kph) |
seconds_since_ffmc | Seconds since observed FFMC |
ffmc | Calculated FFMC value |
E_POINTER | The FFMC address provided is invalid |
S_OK | Successful |
E_INVALIDARG | Failure during calculation, or the parameter seconds_since_ffmc is greater than 7200 seconds |
CCWFGM_FWI::HourlyFFMC_Equilibrium_Previous | ( | double | in_ffmc, |
double | rain, | ||
double | temperature, | ||
double | rh, | ||
double | ws, | ||
double * | ffmc | ||
) |
Calculates the previous hourly FFMC (fine fuel moisture code), using equilibrium mathematical model, based on the current hour's FFMC and previous hour's provided conditions. FFMC is a numerical rating of the moisture content of litter and other cured fine fuels.
in_ffmc | The previous time's equilibrium FFMC value |
rain | Precipitation in the prior hour, mm |
temperature | Celsius |
rh | Relative humidity expressed as a fraction ([0..1]) |
ws | Wind speed (kph) |
ffmc | Calculated FFMC value |
E_POINTER | The FFMC address provided is invalid |
S_OK | Successful |
E_INVALIDARG | Failure during calculation. |
CCWFGM_FWI::HourlyFFMC_Hybrid | ( | double | in_prev_std_ffmc, |
double | in_curr_std_ffmc, | ||
double | in_ffmc, | ||
SAFEARRAY * | rain48, | ||
double | temperature, | ||
double | rh, | ||
double | ws, | ||
unsigned long | seconds_into_day, | ||
double * | ffmc | ||
) |
The Van Wagner calculation provides low variability in hourly FFMC values per day but considers rainfall. The Lawson approach to FFMC values provide more variability to FFMC values through the day, but do not consider rainfall. This experimental approach returns FFMC values from one technique or another based on reported rainfall amounts over the prior 48 hours. Contact Brad Armitage for algorithmic details and summaries of results of this approach. This implementation is experimental and should be used with caution.
in_prev_std_ffmc | The previous day's standard daily Van Wagner FFMC value |
in_curr_std_ffmc | The current day's standard daily Van Wagner FFMC value |
in_ffmc | The previous time's Van Wagner FFMC value |
rain48 | Precipitation, mm in the past 48 hours |
temperature | Celsius |
rh | Relative humidity expressed as a fraction ([0..1]) |
ws | Wind speed (kph) |
seconds_into_day | Local standard time |
ffmc | Calculated FFMC value |
E_POINTER | The FFMC address provided is invalid |
S_OK | Successful |
E_INVALIDARG | Failure during calculation |
CCWFGM_FWI::HourlyFFMC_Lawson | ( | double | prev_std_ffmc, |
double | curr_std_ffmc, | ||
double | rain, | ||
double | temperature, | ||
double | rh, | ||
double | ws, | ||
unsigned long | seconds_into_day, | ||
double * | ffmc | ||
) |
Calculates hourly FFMC (fine fuel moisture code), using Lawson's mathematical model, based on the previous and current daily FFMC values (using Van Wagner) and provided conditions. FFMC is a numerical rating of the moisture content of litter and other cured fine fuels.
prev_std_ffmc | The previous day's standard daily Van Wagner FFMC value |
curr_std_ffmc | The current day's standard daily Van Wagner FFMC value |
rain | Precipitation, mm (ignored) |
temperature | Celsius |
rh | Relative humidity expressed as a fraction ([0..1]) |
ws | Wind speed (kph) |
seconds_into_day | Local standard time |
ffmc | Calculated FFMC value |
E_POINTER | The FFMC address provided is invalid |
S_OK | Successful |
E_INVALIDARG | Failure during calculation or if seconds_into_day is greater than 86400. |
CCWFGM_FWI::HourlyFFMC_Lawson_Contiguous | ( | double | in_ffmc_prevday, |
double | in_ffmc_currday, | ||
double | rain, | ||
double | temperature, | ||
double | rh_0, | ||
double | rh, | ||
double | rh_1, | ||
double | ws, | ||
unsigned long | seconds_into_day, | ||
double * | ffmc | ||
) |
Calculates a contiguous hourly FFMC (fine fuel moisture code), using Lawson's mathematical model, based on the daily Van Wagner FFMC values for the previous and current days, as well as current provided conditions. FFMC is a numerical rating of the moisture content of litter and other cured fine fuels. This technique uses linear interpolation between 11am and noon LST. It also applies similar smoothing in morning hours.
in_ffmc_prevday | The previous day's standard daily Van Wagner FFMC value |
in_ffmc_currday | The current day's standard daily Van Wagner FFMC value |
rain | Precipitation, mm (ignored) |
temperature | Celsius |
rh_0 | Relative humidity at the start of the hour, expressed as a fraction ([0..1]) |
rh | Instantaneous relative humidity expressed as a fraction ([0..1]) |
rh_1 | Relative humidity at the end of the hour (start of next hour) expressed as a fraction ([0..1]) |
ws | Wind speed (kph) |
seconds_into_day | Local standard time |
ffmc | Calculated FFMC value |
E_POINTER | The FFMC address provided is invalid |
S_OK | Successful |
E_INVALIDARG | Failure during calculation or if seconds_into_day is greater than 86400. |
CCWFGM_FWI::HourlyFFMC_VanWagner | ( | double | in_ffmc, |
double | rain, | ||
double | temperature, | ||
double | rh, | ||
double | ws, | ||
ULONG | seconds_since_ffmc, | ||
double * | ffmc | ||
) |
Calculates hourly FFMC (fine fuel moisture code), using Van Wagner's mathematical model, based on the previous hour's FFMC and provided conditions. FFMC is a numerical rating of the moisture content of litter and other cured fine fuels.
in_ffmc | The previous time's Van Wagner FFMC value |
rain | Precipitation since observed FFMC, mm |
temperature | Celsius |
rh | Relative humidity expressed as a fraction ([0..1]) |
ws | Wind speed (kph) |
seconds_since_ffmc | Seconds since observed FFMC |
ffmc | Calculated FFMC value |
E_POINTER | The FFMC address provided is invalid |
S_OK | Successful |
E_INVALIDARG | Failure during calculation, or the parameter seconds_since_ffmc is greater than 7200 seconds |
CCWFGM_FWI::HourlyFFMC_VanWagner_Previous | ( | double | current_ffmc, |
double | rain, | ||
double | temperature, | ||
double | rh, | ||
double | ws, | ||
double * | prev_ffmc | ||
) |
Calculates the previous hourly FFMC (fine fuel moisture code), using Van Wagner's mathematical model, based on the current hour's FFMC and previous hour's provided conditions. FFMC is a numerical rating of the moisture content of litter and other cured fine fuels.
current_ffmc | The current time's Van Wagner FFMC value |
rain | Precipitation in the prior hour, mm |
temperature | Celsius |
rh | Relative humidity expressed as a fraction ([0..1]) |
ws | Wind speed (kph) |
prev_ffmc | Calculated previous FFMC value |
E_POINTER | The FFMC address provided is invalid |
S_OK | Successful |
E_INVALIDARG | Failure during calculation |
CCWFGM_FWI::ISI_FBP | ( | double | ffmc, |
double | ws, | ||
ULONG | seconds_since_ffmc, | ||
double * | isi | ||
) |
Calculates ISI from FFMC and wind speed. ISI provides a numerical rating of the relative expected rate of fire spread. The FBP system uses a local site-specific ISI influenced by topography.
ffmc | FFMC value |
ws | Wind speed (kph) |
seconds_since_ffmc | Seconds since observed ffmc |
isi | Calculated ISI value |
E_POINTER | The ISI address provided is invalid |
S_OK | Successful |
E_INVALIDARG | Failure during calculation |
CCWFGM_FWI::ISI_FWI | ( | double | ffmc, |
double | ws, | ||
ULONG | seconds_since_ffmc, | ||
double * | isi | ||
) |
Calculates ISI from FFMC and wind speed. ISI provides a numerical rating of the relative expected rate of fire spread.
ffmc | FFMC value |
ws | Wind speed (kph) |
seconds_since_ffmc | Seconds since observed ffmc |
isi | Calculated ISI value |
E_POINTER | The ISI address provided is invalid |
S_OK | Successful |
E_INVALIDARG | Failure during calculation |