All Classes Functions
List of all members | Public Member Functions
CCWFGM_FWI Class Reference

CFFDRS FWI Implementation. More...

#include <CWFGM_FWI.h>

Collaboration diagram for CCWFGM_FWI:
Collaboration graph

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)
 

Detailed Description

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.

Constructor & Destructor Documentation

CCWFGM_FWI::CCWFGM_FWI ( )
inline

Default Constructor

See Also
CCWFGM_FWI::CCWFGM_FWI

Member Function Documentation

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.

Parameters
dcDC value
dmcDMC value
buiCalculated BUI value
See Also
ICWFGM_FWI::BUI
Return values
E_POINTERThe BUI address provided is invalid
S_OKSuccessful
E_INVALIDARGFailure 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.

Parameters
in_ffmcThe previous day's Van Wagner FFMC value
rainPrecipitation in the prior 24 hours (noon to noon, LST), mm
temperatureNoon (LST) temperature, Celsius
rhRelative humidity expressed as a fraction ([0..1])
wsWind speed (kph) at noon LST
ffmcCalculated FFMC value
See Also
ICWFGM_FWI::DailyFFMC_VanWagner
Return values
E_POINTERThe FFMC address provided is invalid
S_OKSuccessful
E_INVALIDARGFailure 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.

Parameters
in_dcThe previous day's DC value
rainPrecipitation in the prior 24 hours (noon to noon, LST), mm
temperatureNoon (LST) temperature, Celsius
latitudeRadians, 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.
longitudeRadians, reserved for future use, currently unused (may be if/as/when more regional constants are defined)
monthOrigin 0 (January = 0, December = 11)
dcCalculated DC value
See Also
ICWFGM_FWI::DC
Return values
E_POINTERThe DC address provided is invalid
S_OKSuccessful
E_INVALIDARGFailure 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).

Parameters
in_dmcThe previous day's DMC value
rainPrecipitation in the prior 24 hours (noon to noon, LST), mm
temperatureNoon (LST) temperature, Celsius
latitudeRadians, 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.
longitudeRadians, reserved for future use, currently unused (may be if/as/when more regional constants are defined)
monthOrigin 0 (January = 0, December = 11)
rhRelative humidity expressed as a fraction ([0..1]) at noon LST
dmcCalculated DMC value
See Also
ICWFGM_FWI::DMC
Return values
E_POINTERThe DMC address provided is invalid
S_OKSuccessful
E_INVALIDARGFailure during calculation or month is greater than 11, assuming January is 0.
CCWFGM_FWI::DSR ( double  fwi,
double *  dsr 
)

Calculates DSR from FWI.

Parameters
fwiFWI value
dsrCalculated DSR value
See Also
ICWFGM_FWI::DSR
Return values
E_POINTERThe DSR address provided is invalid
S_OKSuccessful
E_INVALIDARGFailure during calculation
CCWFGM_FWI::FF ( double  ffmc,
ULONG  seconds_since_ffmc,
double *  ff 
)

Calculates f(F), which is used to calculate ISI from FFMC.

Parameters
ffmcFFMC value
seconds_since_ffmcSeconds since observed ffmc
ffCalculated f(F) value
See Also
ICWFGM_FWI::FF
Return values
E_POINTERThe FF address provided is invalid
S_OKSuccessful
E_INVALIDARGFailure 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.

Parameters
isiISI value
buiBUI value
fwiCalculated FWI value
See Also
ICWFGM_FWI::FWI
Return values
E_POINTERThe FWI address provided is invalid
S_OKSuccessful
E_INVALIDARGFailure 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.

Parameters
in_ffmcThe previous time's Van Wagner FFMC value
rainPrecipitation in the prior hour, mm
temperatureCelsius
rhRelative humidity expressed as a fraction ([0..1])
wsWind speed (kph)
seconds_since_ffmcSeconds since observed FFMC
ffmcCalculated FFMC value
See Also
ICWFGM_FWI::HourlyFFMC_Equilibrium
Return values
E_POINTERThe FFMC address provided is invalid
S_OKSuccessful
E_INVALIDARGFailure 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.

Parameters
in_ffmcThe previous time's equilibrium FFMC value
rainPrecipitation in the prior hour, mm
temperatureCelsius
rhRelative humidity expressed as a fraction ([0..1])
wsWind speed (kph)
ffmcCalculated FFMC value
See Also
ICWFGM_FWI::HourlyFFMC_Equilibrium_Previous
Return values
E_POINTERThe FFMC address provided is invalid
S_OKSuccessful
E_INVALIDARGFailure 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.

Parameters
in_prev_std_ffmcThe previous day's standard daily Van Wagner FFMC value
in_curr_std_ffmcThe current day's standard daily Van Wagner FFMC value
in_ffmcThe previous time's Van Wagner FFMC value
rain48Precipitation, mm in the past 48 hours
temperatureCelsius
rhRelative humidity expressed as a fraction ([0..1])
wsWind speed (kph)
seconds_into_dayLocal standard time
ffmcCalculated FFMC value
See Also
ICWFGM_FWI::HourlyFFMC_Hybrid
Return values
E_POINTERThe FFMC address provided is invalid
S_OKSuccessful
E_INVALIDARGFailure 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.

Parameters
prev_std_ffmcThe previous day's standard daily Van Wagner FFMC value
curr_std_ffmcThe current day's standard daily Van Wagner FFMC value
rainPrecipitation, mm (ignored)
temperatureCelsius
rhRelative humidity expressed as a fraction ([0..1])
wsWind speed (kph)
seconds_into_dayLocal standard time
ffmcCalculated FFMC value
See Also
ICWFGM_FWI::HourlyFFMC_Lawson
Return values
E_POINTERThe FFMC address provided is invalid
S_OKSuccessful
E_INVALIDARGFailure 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.

Parameters
in_ffmc_prevdayThe previous day's standard daily Van Wagner FFMC value
in_ffmc_currdayThe current day's standard daily Van Wagner FFMC value
rainPrecipitation, mm (ignored)
temperatureCelsius
rh_0Relative humidity at the start of the hour, expressed as a fraction ([0..1])
rhInstantaneous relative humidity expressed as a fraction ([0..1])
rh_1Relative humidity at the end of the hour (start of next hour) expressed as a fraction ([0..1])
wsWind speed (kph)
seconds_into_dayLocal standard time
ffmcCalculated FFMC value
See Also
ICWFGM_FWI::HourlyFFMC_Lawson_Contiguous
Return values
E_POINTERThe FFMC address provided is invalid
S_OKSuccessful
E_INVALIDARGFailure 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.

Parameters
in_ffmcThe previous time's Van Wagner FFMC value
rainPrecipitation since observed FFMC, mm
temperatureCelsius
rhRelative humidity expressed as a fraction ([0..1])
wsWind speed (kph)
seconds_since_ffmcSeconds since observed FFMC
ffmcCalculated FFMC value
See Also
ICWFGM_FWI::HourlyFFMC_VanWagner
Return values
E_POINTERThe FFMC address provided is invalid
S_OKSuccessful
E_INVALIDARGFailure 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.

Parameters
current_ffmcThe current time's Van Wagner FFMC value
rainPrecipitation in the prior hour, mm
temperatureCelsius
rhRelative humidity expressed as a fraction ([0..1])
wsWind speed (kph)
prev_ffmcCalculated previous FFMC value
See Also
ICWFGM_FWI::HourlyFFMC_VanWagner_Previous
Return values
E_POINTERThe FFMC address provided is invalid
S_OKSuccessful
E_INVALIDARGFailure 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.

Parameters
ffmcFFMC value
wsWind speed (kph)
seconds_since_ffmcSeconds since observed ffmc
isiCalculated ISI value
See Also
ICWFGM_FWI::ISI_FBP
CCWFGM_FWI::ISI_FWI
Return values
E_POINTERThe ISI address provided is invalid
S_OKSuccessful
E_INVALIDARGFailure 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.

Parameters
ffmcFFMC value
wsWind speed (kph)
seconds_since_ffmcSeconds since observed ffmc
isiCalculated ISI value
See Also
ICWFGM_FWI::ISI_FWI
CCWFGM_FWI::ISI_FBP
Return values
E_POINTERThe ISI address provided is invalid
S_OKSuccessful
E_INVALIDARGFailure during calculation