Пример #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
# for example, if a gage is located at a subbasin other than the last outlet.
# these are optional, the last outlet is assumed to be the gage otherwise and
# the run dates are used as the processing dates by default.

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)
Пример #3
0
# for example, if a gage is located at a subbasin other than the last outlet.
# these are optional, the last outlet is assumed to be the gage otherwise and 
# the run dates are used as the processing dates by default.

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)
Пример #4
0
    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(preliminary))
    postprocessor.plot_calibration(output='{}/statistics'.format(preliminary),
                                   show=False)
    #postprocessor.plot_runoff(tstep = 'daily', show = False,
    #                          output = '{}/runoff'.format(preliminary))
    output = '{}/calibration_report.csv'.format(preliminary)
    postprocessor.calibration_report(output=output)
    postprocessor.plot_snow(output='{}/snow'.format(preliminary), show=False)
    postprocessor.plot_dayofyear(output='{}/dayofyear'.format(preliminary),
                                 show=False)
Пример #5
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))
Пример #6
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(preliminary))
    postprocessor.plot_calibration(output = '{}/statistics'.format(preliminary),
                                   show = False)
    #postprocessor.plot_runoff(tstep = 'daily', show = False,
    #                          output = '{}/runoff'.format(preliminary))
    output = '{}/calibration_report.csv'.format(preliminary)
    postprocessor.calibration_report(output = output)
    postprocessor.plot_snow(output = '{}/snow'.format(preliminary), 
                            show = False)
    postprocessor.plot_dayofyear(output = '{}/dayofyear'.format(preliminary),
                                 show = False)