sdmc: Sheltered Duff Moisture Code

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/sdmc.r

Description

sdmc is used to calculate sheltered DMC (sDMC, Wotton et al., 2005) based on daily noon weather observations of temperature, relative humidity, wind speed, 24-hour rainfall, and a previous day's calculated or estimated value of sDMC. This function calculates sDMC for either one weather station or for multiple weather stations over the duration of the daily weather data set, typically over a fire season.

Usage

1
sdmc(input,sdmc_old=NULL,batch=TRUE)

Arguments

input

A data.frame containing input variables of daily noon weather observations. Variable names have to be the same as in the following list, but they are case insensitive. The order in which the input variables are entered is not important either.

temp (required) Temperature (centigrade)
rh (required) Relative humidity (%)
ws (required) 10-m height wind speed (km/h)
prec (required) 1-hour rainfall (mm)
mon (recommended) Month of the observations (integer 1-12)
day (optional) Day of the observations (integer)
sdmc_old

Previous day's value of SDMC. At the start of calculations, when there is no calculated previous day's SDMC value to use, the user must specify an estimate of this value. Where sdmc_old=NULL, the function will calculate the initial SDMC values based on the initial DMC. The sdmc_old argument can accept a single initial value for multiple weather stations, and also accept a vector of initial values for multiple weather stations.

batch

Whether the computation is iterative or single step, default is TRUE. When batch=TRUE, the function will calculate daily SDMC for one weather station over a period of time iteratively. If multiple weather stations are processed, an additional "id" column is required in the input to label different stations, and the data needs to be sorted by date/time and "id". If batch=FALSE, the function calculates only one time step base on either the previous day's SDMC or the initial start value.

Details

The Duff Moisture Code (DMC) component of the Canadian Forest Fire Weather Index (FWI) System tracks moisture content of the forest floor away from the sheltering influences of overstory trees. This sheltered Duff Moisture Code (sDMC) was developed to track moisture in the upper 5 cm of the organic layer in the rain sheltered areas near (<0.5 m) the boles of overstory trees (Wotton et al. 2005), an area where lightning strikes usually ignite the forest floor when they run to ground. The sDMC is very similar in structure (and identical in data requirements) to the DMC. The sDMC, like all the FWI System moisture codes, is a bookkeeping system that tracks gain and loss of moisture from day-to-day; thus an estimate of the previous day's sDMC value is needed to provide a starting point for each day's moisture calculation. Like the other moisture codes in the FWI System the sDMC is converted from a moisture content value to an outputted CODE value which increases in value with decreasing moisture content.

Value

sdmc returns either a single value or a vector of SDMC values.

Author(s)

Xianli Wang, Mike Wotton, Alan Cantin, and Mike Flannigan

References

Wotton, B.M., B.J. Stocks, and D.L. Martell. 2005. An index for tracking sheltered forest floor moisture within the Canadian Forest Fire Weather Index System. International Journal of Wildland Fire, 14, 169-182.

See Also

fwi

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
library(cffdrs)
data("test_sdmc")
#order the data:
test_sdmc<-test_sdmc[with(test_sdmc,order(yr,mon,day)),]
# (1)Default of sdmc, calculate sdmc for a chronical period 
# of time. 
# Because sdmc_old is better to be calculated, we normally
# ignore this option:
test_sdmc$SDMC<-sdmc(test_sdmc)
# (2) multiple weather stations: 
# Batch process with multiple stations (2 stations) assuming
# they are from the same month:
test_sdmc$mon<-7
test_sdmc$day<-rep(1:24,2)
test_sdmc$id<-rep(1:2,each=24)
# Sort the data by date and weather station id:
test_sdmc<-test_sdmc[with(test_sdmc,order(yr,mon,day,id)),]
# Apply the function
test_sdmc$SDMC_mult_stn<-sdmc(test_sdmc,batch=TRUE)
# Assuming each record is from a different weather station, and 
# calculate only one time step: 
  foo<-sdmc(test_sdmc,batch=FALSE)

cffdrs documentation built on May 26, 2020, 3 p.m.