Пример #1
0
    start = datetime.datetime(y, 1, 1)
    end = datetime.datetime(y + 2, 1, 1)

    ds = start, end

    # use the postprocessor to get the time series

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

    # get the flows and other timeseries from the two-year calibration

    stimes, sflow = postprocessor.get_sim_flow(comid)
    otimes, oflow = postprocessor.get_obs_flow()
    ptimes, precip = postprocessor.get_precipitation(comid)
    etimes, evap = postprocessor.get_evaporation(comid)
    times, pet = postprocessor.get_pet(comid=comid)

    # close this postprocessor

    postprocessor.close()

    # get the flows for the thirty-year model

    i = ttimes.index(start)

    if end in ttimes:
        j = ttimes.index(end)
        thirty = tflow[i:j]
    else:
        thirty = tflow[i:]
Пример #2
0
    
    start = datetime.datetime(y,     1, 1)
    end   = datetime.datetime(y + 2, 1, 1)

    ds = start, end

    # use the postprocessor to get the time series
    
    postprocessor = Postprocessor(hspfmodel, ds, comid = comid)

    # get the flows and other timeseries from the two-year calibration
        
    stimes, sflow  = postprocessor.get_sim_flow(comid)
    otimes, oflow  = postprocessor.get_obs_flow()
    ptimes, precip = postprocessor.get_precipitation(comid)
    etimes, evap   = postprocessor.get_evaporation(comid)
    times,  pet    = postprocessor.get_pet(comid = comid)

    # close this postprocessor

    postprocessor.close()

    # get the flows for the thirty-year model

    i = ttimes.index(start)

    if end in ttimes:
        j = ttimes.index(end)
        thirty = tflow[i:j]
    else:
        thirty = tflow[i:]