link_to_sample = 200
sample_das = [201, 24048, 14834, 14268, 12097, 8035, 5022] # sample drainage areas

## GENERATE AND SET PRECIPITATION TIME SERIES
total_t = 1000.* 365.25 * 24               # 1,000 years of rainfall generated.
thresh = 0.5                               # Intensity threshold (lower limit, mm/hr)


PD = PrecipitationDistribution(mean_storm_duration = 10.75,
                               mean_interstorm_duration=433.58,
                               mean_storm_depth = 9.62,
                               total_t=total_t)


storm_arr = np.array(PD.get_storm_time_series())
intensity_threshold, = np.where(storm_arr[:, 2] > thresh)
interstorm_durs = (storm_arr[intensity_threshold][:,0][np.arange(1,
                        len(storm_arr[intensity_threshold]) - 1)] -
                        storm_arr[intensity_threshold][:, 1][np.arange(0,
                        len(storm_arr[intensity_threshold]) - 2)])

durations = (storm_arr[intensity_threshold][:,1] -
             storm_arr[intensity_threshold][:,0])

durations_s = [x * 3600. for x in durations]

intensities = storm_arr[intensity_threshold][:,2]


## SET INITIAL FIELDS, ARRAYS AND ITERATORS
Ejemplo n.º 2
0
lowRvar_PrecipDist = PrecipitationDistribution(mean_storm_duration = 11.75,
                               mean_interstorm_duration = 146.25,
                               mean_storm_depth = 4.775,
                               total_t=total_t)

highRvar_PrecipDist = PrecipitationDistribution(mean_storm_duration = 10.75,
                               mean_interstorm_duration = 433.58,
                               mean_storm_depth = 9.62,
                               total_t=total_t)


thresh = 0.5

# Get actual time series for the high Rvar case
highRvar_storm_arr = np.array(highRvar_PrecipDist.get_storm_time_series())
highRvar_intensity_threshold, = np.where(highRvar_storm_arr[:, 2] > thresh)
highRvar_durations = highRvar_storm_arr[highRvar_intensity_threshold][:,1]-highRvar_storm_arr[highRvar_intensity_threshold][:,0]
highRvar_durations_s = [x *3600. for x in highRvar_durations]
highRvar_intensities = highRvar_storm_arr[highRvar_intensity_threshold][:,2]
highRvar_depth = highRvar_durations * highRvar_intensities
highRvar_durations_raw  = highRvar_storm_arr[:,1]-highRvar_storm_arr[:,0]
highRvar_intensities_raw = highRvar_storm_arr[:,2]
highRvar_depth_raw = highRvar_durations_raw * highRvar_intensities_raw

# Get actual time series for the low Rvar case
lowRvar_storm_arr = np.array(lowRvar_PrecipDist.get_storm_time_series())
lowRvar_intensity_threshold, = np.where(lowRvar_storm_arr[:, 2] > thresh)
lowRvar_durations = lowRvar_storm_arr[lowRvar_intensity_threshold][:,1]-lowRvar_storm_arr[lowRvar_intensity_threshold][:,0]
lowRvar_durations_s = [x *3600. for x in lowRvar_durations]
lowRvar_intensities = lowRvar_storm_arr[lowRvar_intensity_threshold][:,2]