Exemple #1
0
def main():
    # First we will create an instance of PrecipitationDistribution
    PD = PrecipitationDistribution(mean_storm_duration=2.0,
                                   mean_interstorm_duration=50.0,
                                   mean_storm_depth=0.05,
                                   total_t=37000.)

    # Because the values for storm duration, interstorm duration, storm
    # depth and intensity are set stochastically in the initialization
    # phase, we should see that they seem reasonable.

    print("Mean storm duration is: ", PD.mean_storm_duration, " hours, while",
          "the value from the Poisson distribution is: ", PD.storm_duration)
    print("Mean interstorm Duration is: ", PD.mean_interstorm_duration,
          'hours, while the value from the Poisson distribution is: ',
          PD.interstorm_duration)
    print("Mean storm depth is: ", PD.mean_storm_depth, "mm, while the value",
          "from the Poisson distribution is: ", PD.storm_depth)
    print("Mean intensity is: ", PD.mean_intensity, "mm/hr, while the value",
          "from the Poisson distribution is: ", PD.intensity)
    print('\n')

    # If we generate a time series we can plot a precipitation distribution
    PD.get_storm_time_series()

    # And get the storm array from the component..
    storm_arr = PD.storm_time_series

    # And now to call the plotting method.
    create_precip_plot(storm_arr)
def main():
    # First we will create an instance of PrecipitationDistribution
    PD = PrecipitationDistribution(mean_storm_duration = 2.0,
                                   mean_interstorm_duration = 50.0,
                                   mean_storm_depth = 0.05, total_t = 37000.)

    # Because the values for storm duration, interstorm duration, storm
    # depth and intensity are set stochastically in the initialization
    # phase, we should see that they seem reasonable.

    print("Mean storm duration is: ", PD.mean_storm_duration, " hours, while",
             "the value from the Poisson distribution is: ", PD.storm_duration)
    print("Mean interstorm Duration is: ", PD.mean_interstorm_duration,
          'hours, while the value from the Poisson distribution is: ',
          PD.interstorm_duration)
    print("Mean storm depth is: ", PD.mean_storm_depth, "mm, while the value",
          "from the Poisson distribution is: ", PD.storm_depth)
    print("Mean intensity is: ", PD.mean_intensity, "mm/hr, while the value",
          "from the Poisson distribution is: ", PD.intensity)
    print('\n')


    # If we generate a time series we can plot a precipitation distribution
    PD.get_storm_time_series()

    # And get the storm array from the component..
    storm_arr = PD.storm_time_series

    # And now to call the plotting method.
    create_precip_plot(storm_arr)
Exemple #3
0
import os
from matplotlib import pyplot as plt
from landlab.components.uniform_precip import PrecipitationDistribution
from landlab.components.fire_generator import FireGenerator
import numpy as np
from math import ceil

# Input text file name and location
filename = os.path.join(os.path.dirname(__file__), 'fireraininput.txt')

# 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.
Exemple #4
0
import os
from matplotlib import pyplot as plt
from landlab.components.uniform_precip import PrecipitationDistribution
from landlab.components.fire_generator import FireGenerator
import numpy as np
from math import ceil

# Input text file name and location
filename = os.path.join(os.path.dirname(__file__), 'fireraininput.txt')

# 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.