drawing from a stochastic, statistical distribution, the output may change
after the component is reloaded. 

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.generate_fire 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)
示例#2
0
from landlab.components.fire_generator.generate_fire import FireGenerator
import numpy as np
from math import ceil

## INPUT TXT FILE WITH NECESSARY PARAMETERS ##
filename = os.path.join(os.path.dirname(__file__), 'fireraininput.txt')

## INITIALIZING THE CLASSES IN LANDLAB ##

Rain = PrecipitationDistribution()
Rain.initialize(filename)
Rain.get_storm_time_series() ## UNITS IN DAYS
storm= Rain.storm_time_series

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

## FUNCTIONS TO GET POTENTIAL EROSION EVENTS

## set_threshold() ##
## 
## GETS THRESHOLD BASED ON
## CANNON ET AL., 2008 RELATIONSHIP
## FOR THE COAL SEAM FIRE, EAST OF
## DENVER, COLORADO

def set_threshold(arr): 
    for event in arr:
示例#3
0
#import os
from landlab.components.fire_generator.generate_fire import FireGenerator
from matplotlib import pyplot as plt
#filename = '/Users/Jordan/landlab/landlab/components/uniform_precip/examples/fireraininput.txt'



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

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

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

print 'Sorting the fire series to test the distribution...'
FG.fires.sort()

print 'Plotting the histogram to show the distribution.'
ymax = int(FG.total_run_time)+1
yaxis = range(0, ymax)
plt.plot(FG.fires, yaxis)
plt.hist(FG.fires)
plt.show()
from landlab.components.fire_generator.generate_fire import FireGenerator
import numpy as np
from math import ceil

## INPUT TXT FILE WITH NECESSARY PARAMETERS ##
filename = os.path.join(os.path.dirname(__file__), 'fireraininput.txt')

## INITIALIZING THE CLASSES IN LANDLAB ##

Rain = PrecipitationDistribution()
Rain.initialize(filename)
Rain.get_storm_time_series()  ## UNITS IN DAYS
storm = Rain.storm_time_series

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

## FUNCTIONS TO GET POTENTIAL EROSION EVENTS

## set_threshold() ##
##
## GETS THRESHOLD BASED ON
## CANNON ET AL., 2008 RELATIONSHIP
## FOR THE COAL SEAM FIRE, EAST OF
## DENVER, COLORADO


def set_threshold(arr):