Пример #1
0
with open(model, 'rb') as f: hspfmodel = pickle.load(f)

hspfmodel.filename = 'example05'

# and now adjust all the parameters (including the new INTFW_multiplier)

hspfmodel.evap_multiplier = evap_multiplier

for p in hspfmodel.perlnds:

    p.LZETP  = p.LZETP  * LZETP_multiplier
    p.LZSN   = p.LZSN   * LZSN_multiplier
    p.UZSN   = p.UZSN   * UZSN_multiplier
    p.INTFW  = p.INTFW  * INTFW_multiplier
    p.INFILT = p.INFILT * INFILT_multiplier
    p.IRC    = p.IRC    * IRC_multiplier
    p.AGWRC  = AGWRC
    p.set_pwat_state(AGWS = 0.25)

# run the simulation and get the results

hspfmodel.build_wdminfile()
hspfmodel.build_uci(targets, start, end, hydrology = True)
hspfmodel.run(verbose = True)

p = Postprocessor(hspfmodel, (start, end), comid = gagecomid) 

p.calculate_errors()

# lather, rinse, repeat by changing the multipliers until the calibration is 
Пример #2
0
with open(model, 'rb') as f: hspfmodel = pickle.load(f)

hspfmodel.filename = 'example05'

# and now adjust all the parameters (including the new INTFW_multiplier)

hspfmodel.evap_multiplier = evap_multiplier

for p in hspfmodel.perlnds:

    p.LZETP  = p.LZETP  * LZETP_multiplier
    p.LZSN   = p.LZSN   * LZSN_multiplier
    p.UZSN   = p.UZSN   * UZSN_multiplier
    p.INTFW  = p.INTFW  * INTFW_multiplier
    p.INFILT = p.INFILT * INFILT_multiplier
    p.IRC    = p.IRC    * IRC_multiplier
    p.AGWRC  = AGWRC
    p.set_pwat_state(AGWS = 0.25)

# run the simulation and get the results

hspfmodel.build_wdminfile()
hspfmodel.build_uci(targets, start, end, hydrology = True)
hspfmodel.run(verbose = True)

p = Postprocessor(hspfmodel, (start, end), comid = gagecomid) 

p.calculate_errors()

# lather, rinse, repeat by changing the multipliers until the calibration is