Exemple #1
0
# Initializing the PrecipitationDistribution class using the default file
# and getting the time series needed for comparison against the fire time series.

Rain = PrecipitationDistribution(filename)
Rain.get_storm_time_series()
storm = Rain.storm_time_series

# Initializing the FireGenerator class using the default file and getting the
# time series needed for comparison against the precipitation time series.

# As an additional step, we should find the scale parameter and set it.
# The default value is set to 0.

Fire = FireGenerator(filename)
Fire.get_scale_parameter()
Fire.generate_fire_time_series()
fires = Fire.fire_events

## Methods used to find these potentially erosion-inducing events.


def set_threshold(arr):

    # Gets threshold using the intensity-duration threshold
    # relationship described in Cannon et al., 2008, for the
    # Coal Seam Fire, East of Denver, Colorado.

    # Threshold value changes for each storm event.

    for event in arr:
        indx = arr.index(event)
Exemple #2
0
# Initializing the PrecipitationDistribution class using the default file
# and getting the time series needed for comparison against the fire time series.

Rain = PrecipitationDistribution(filename)
Rain.get_storm_time_series()
storm= Rain.storm_time_series

# Initializing the FireGenerator class using the default file and getting the
# time series needed for comparison against the precipitation time series.

# As an additional step, we should find the scale parameter and set it.
# The default value is set to 0.

Fire = FireGenerator(filename)
Fire.get_scale_parameter()
Fire.generate_fire_time_series()
fires = Fire.fire_events

## Methods used to find these potentially erosion-inducing events.

def set_threshold(arr):

    # Gets threshold using the intensity-duration threshold
    # relationship described in Cannon et al., 2008, for the
    # Coal Seam Fire, East of Denver, Colorado.

    # Threshold value changes for each storm event.

    for event in arr:
        indx = arr.index(event)
        D = arr[indx][1] - arr[indx][0]
Exemple #3
0
The default file is currently set using parameters from central Colorado,
given by Cannon et al., (2008) and Moody and Martin (2001). This sample driver
should not be applied at other sites without careful consideration.

"""

from landlab.components.fire_generator import FireGenerator
from matplotlib import pyplot as plt
from scipy.optimize import curve_fit


# Initializing the FireGenerator() class from fire_generator.py
FG = FireGenerator()
FG.initialize()

# Finding unknown scale parameter given the mean fire recurrence value
FG.get_scale_parameter()

# Finding a time series based on the Weibull distribution
FG.generate_fire_time_series()

# Sorting the fire series to test the distribution...
FG.firelist.sort()

# Plotting the histogram to show the distribution.
plt.hist(FG.firelist)
plt.title('Weibull Distribution of Fire Recurrence Values')
plt.xlabel('Histogram of Fire Recurrence (years)', fontsize=14)
plt.ylabel('Frequency of Fire Recurrece Values', fontsize=14)
plt.show()