예제 #1
0
    # build the UCI and output WDM files

    hspfmodel.build_uci(targets, start, end, atemp = True, snow = True,
                        hydrology = True)

    # run it

    hspfmodel.run(verbose = True)

    # use the Postprocessor to analyze and save the results

    dates = start + datetime.timedelta(days = warmup), end

    postprocessor = Postprocessor(hspfmodel, dates, comid = comid)

    postprocessor.get_hspexp_parameters(verbose = False)
    postprocessor.plot_hydrograph(tstep = 'monthly', show = False,
                                  output = '{}/hydrography'.format(calibration))
    postprocessor.plot_calibration(output = '{}/statistics'.format(calibration),
                                   show = False)
    postprocessor.plot_runoff(tstep = 'daily', show = False,
                              output = '{}/runoff'.format(calibration))
    output = '{}/calibration_report.csv'.format(calibration)
    postprocessor.calibration_report(output = output)
    postprocessor.plot_snow(output = '{}/snow'.format(calibration), 
                            show = False)
    postprocessor.plot_dayofyear(output = '{}/dayofyear'.format(calibration),
                                 show = False)
    postprocessor.plot_storms(season = 'all', show = False, 
                              output = '{}/storms'.format(calibration))
예제 #2
0
파일: intro04.py 프로젝트: djibi2/PyHSPF
process_dates = run_dates   # postprocessing dates
gagecomid     = '30'        # the subbasin identifier for the gage

p = Postprocessor(hspfmodel, process_dates, comid = gagecomid)

# here are some examples of things that can be done with the postprocessor.
# many of these require certain external targets to be specified when building
# the model (e.g. runoff, groundwater, snow)

# make a plot of daily or monthly flows, precipitation, and evapotranspiration

p.plot_hydrograph(tstep = 'daily')

# plot the runoff components, flows, and precipitation on linear and log scales

p.plot_runoff(tstep = 'daily')

# make a similar plot looking at the largest storm events for each year both  
# in summer and outside summer

p.plot_storms(tstep = 'hourly')

# make plots of calibration statistics including flow-duration curves and 
# parity plots for both daily and monthly flows

p.plot_calibration(verbose = True)

# get a mass balance of the components

p.get_mass_balance()
예제 #3
0
process_dates = run_dates  # postprocessing dates
gagecomid = '30'  # the subbasin identifier for the gage

p = Postprocessor(hspfmodel, process_dates, comid=gagecomid)

# here are some examples of things that can be done with the postprocessor.
# many of these require certain external targets to be specified when building
# the model (e.g. runoff, groundwater, snow)

# make a plot of daily or monthly flows, precipitation, and evapotranspiration

p.plot_hydrograph(tstep='daily')

# plot the runoff components, flows, and precipitation on linear and log scales

p.plot_runoff(tstep='daily')

# make a similar plot looking at the largest storm events for each year both
# in summer and outside summer

p.plot_storms(tstep='hourly')

# make plots of calibration statistics including flow-duration curves and
# parity plots for both daily and monthly flows

p.plot_calibration(verbose=True)

# get a mass balance of the components

p.get_mass_balance()
예제 #4
0
        "runoff",
        "groundwater",
        "snow_state",
        "snowpack",
        "snowfall",
    ]

    # build the UCI and output WDM files

    hspfmodel.build_uci(targets, start, end, atemp=True, snow=True, hydrology=True)

    # run it

    hspfmodel.run(verbose=True)

    # use the Postprocessor to analyze and save the results

    dates = start + datetime.timedelta(days=warmup), end

    postprocessor = Postprocessor(hspfmodel, dates, comid=comid)

    postprocessor.get_hspexp_parameters(verbose=False)
    postprocessor.plot_hydrograph(tstep="monthly", show=False, output="{}/hydrography".format(calibration))
    postprocessor.plot_calibration(output="{}/statistics".format(calibration), show=False)
    postprocessor.plot_runoff(tstep="daily", show=False, output="{}/runoff".format(calibration))
    output = "{}/calibration_report.csv".format(calibration)
    postprocessor.calibration_report(output=output)
    postprocessor.plot_snow(output="{}/snow".format(calibration), show=False)
    postprocessor.plot_dayofyear(output="{}/dayofyear".format(calibration), show=False)
    postprocessor.plot_storms(season="all", show=False, output="{}/storms".format(calibration))