# Presentation: 265847

## Calibration of HL-RDHM

- Lecture 4b

## Calibration of SAC Parameters with Scalar Multipliers

- Use of scalar multipliers (assumed to be uniform over a basin) greatly reduces the number of parameters to be calibrated.  This assumes the spatial distribution of a-priori parameters is realistic.
- Parameters from 1-hour, lumped model calibrations can be a good starting point.  Lumped model parameters, if derived at the 1 hour time scale, can be used to derive initial scalar multipliers, i.e.
- multiplier = [lumped model parameter]/[basin average of gridded a-priori parameter values]
- Scalar multipliers are adjusted using similar strategies and objectives to those for lumped calibration
- Both manual and a combination of automatic and manual calibration on scalar multipliers have proven effective

**Notes:**
Basin averages of gridded apriori parameters can be found in the basin.info files and the headers of HL-RDHM time series output files.

## Comparison Between Calibration Steps for Distributed and Lumped Modeling

- Distributed

- Lumped

- Distributed

- Lumped

## Manual Headwater Calibration

- Follow similar strategies to those used for lumped calibration except make changes to multipliers, e.g. from Anderson (2002):
- “Remove large errors
- Obtain reasonable simulation of baseflow
- Adjust major snow model parameters, if snow is included\
- Adjust tension water capacities
- Adjust parameters that primarily affect storm runoff
- Make final parameter adjustments”

- Can still use PLOT-TS and STAT-QME

-  Stat-Q _event statistics_ summarize how well you do on bias, peaks, timing, and RMSE, etc over any # of selected events.
-  R scripts assist with routing parameter adjustment.

- See HL-RDHM User Manual for a detailed example.

**Notes:**
To me, the event statistics help to meet the goal of calibration and tally which events are over and under predicted.  

## HL-RDHM   

- HL-RDHM

- SAC-SMA, SAC-HT

- Channel routing

- SNOW -17

- P, T &  ET

- surface runoff

- rain + melt

- Flows and state variables

- base flow

- Hillslope routing

- Auto
- Calibration

- Execute these components
- in a loop to find the set of scalar multipliers that
- minimize the objective function

## Automatic Calibration

- Stepwise Line Search (SLS) technique available
- Simple local search
- Benefits of SLS:
- Physically realistic posterior model parameter estimates (start from apriori)
- Algorithmic simplicity
- Computational efficiency
- Multi-scale objective function

## SLS Benefits Relative to SCE

- (a)  Fewer function evaluations than SCE with similar final objective function value

- (b) Final parameter set is closer to apriori with SLS

**Notes:**
Distance is measured as the Euclidean norm of the vector connecting the apriori and optimized parameters.   

## Minimize errors over hourly, daily, weekly, monthly intervals (k=1,2,3,4...n)
q = flow averaged over time interval k
n = number of flow intervals for averaging
mk = number of ordinates for each interval
X = parameter set

- Minimize errors over hourly, daily, weekly, monthly intervals (k=1,2,3,4...n)
- q = flow averaged over time interval k
- n = number of flow intervals for averaging
- m**k** = number of ordinates for each interval
- X = parameter set

- -Assumes uncertainty in simulated streamflow is proportional
- to the variability of the observed flow
- -Inversely proportional to the errors at the respective scales.
- Assume errors approximated by std.

**Emulates multi-scale nature of manual calibration **

- Weight =

## Multi-scale Objective Component Behavior

-   For SCE, High frequency objectives do not start dramatically improving until lower frequency components reach some reasonable level.
-   For SLS in this example, low frequency objectives begin relatively close to optimal values based on apriori parameters
-   The weight assigned to each scale is basin-specific

- 30 days

- 10 days

- 1 day

- 1 hour

## Auto Calibration: Case 1

- Before
- autocalibration
- of a priori
- parameters

- After autocalibration

- Observed

- Example of HL-RDHM Auto Calibration: ELDO2  for DMIP 2
- Arithmetic Scale

## Auto Calibration: Case 1

- Example of HL-RDHM Auto Calibration: ELDO2  for DMIP 2
- Semi-Log Scale

- Before
- autocalibration
- of a priori
- parameters

- After autocalibration

- Observed

## Auto Calibration: Case 2

- Before
- autocalibration
- of a priori
- parameters

- After autocalibration

- Observed

- Example of HL-RDHM Auto Calibration: ELDO2  for DMIP 2
- Arithmetic Scale

## Possible Strategy

-   Start with best a-priori or scaled lumped parameters
-   Run automatic calibration
-   Make manual adjustments (particularly for routing parameters) to get the preferred storm event shapes

## Automatic Calibration: Example Input Deck

- time-period                          = 20040401T00 20040430T23
- ignore-1d-xmrg = false
- time-step                   =  1
- connectivity = /fs/hsmb5/hydro/rms/sequence/abrfc_var_adj2.con
- output-path        = /fs/hsmb5/hydro/dmip2/talo2/ws3
- input-path         =  /fs/hsmb5/hydro/rms/parameterslx
- input-path         =  /fs/hsmb5/hydro/Hydro_Data/ABRFC/PRECIPITATION/RADAR/STAGE3/dmip2
- input-path         =  /fs/hsmb5/hydro/dmip2/talo2/ws3
- # calibration algorithm
- calibration = sls
- calib-time-period  = 20040401T00 20040430T23
- observed  = /fs/hsmb5/hydro/dmip2/talo2/ws3/TALO2c_discharge.outlet_ts
- timescale-interval = 24
- #timescale-interval = 24 240 720
- #List any number of parameters to be calibrated
- #calib-parameters = sac_UZTWM=0.50,1.5
- calib-parameters = sac_UZFWM=0.5,1.5
- #calib-parameters = sac_UZK=0.75,1.75
- #calib-parameters = sac_ZPERC=4.0,6.0
- #calib-parameters = sac_REXP=0.25,2.0
- #calib-parameters = sac_LZTWM=0.25,0.8
- #calib-parameters = sac_LZFSM=0.5,1.0
- #calib-parameters = sac_LZFPM=0.75,1.4
- #calib-parameters = sac_LZSK=0.5,1.0
- #calib-parameters = sac_LZPK=0.25,1.0
- #calib-parameters = sac_PFREE=0.5,1.0
- #calib-parameters = rutpix_Q0CHN=0.25,2.0
- #
- #select operations
- #available snow17, sac, frz, api, rutpix7, rutpix9, funcOpt
- operations = calsac calrutpix9 funcOpt

## Example Automatic Calibration Output(single parameter)

-  END PARAM#1 LOOP, ITER#7
-  Optimum Parameter at this step:
-   0.825000
-  Iterration#=8 1.000000
-  Parameter #=1 step = 0.025000
- entering calsacInCalLoop
- leaving CalsacInCalLoop
- func_opt: scale 1 = 4.7284e-05  scale 2 = 3.96251e-05
- time of this step = 1 seconds
-             search direction/parameter/criteria/best criteria
- function call# 10 -1 0.8 6.24174e-05 3.01386
-  END PARAM#1 LOOP, ITER#8
-  Optimum Parameter at this step:
-   0.800000
-  Iterration#=9 1.000000
-  Parameter #=1 step = 0.025000
- entering calsacInCalLoop
- leaving CalsacInCalLoop
-  func_opt: scale 1 = 2.16184  scale 2 = 2.08796
- time of this step = 1 seconds
-             search direction/parameter/criteria/best criteria
- function call# 11 -1 0.775 3.04681 6.24174e-05
- entering calsacInCalLoop
- leaving CalsacInCalLoop
-  func_opt: scale 1 = 2.13726  scale 2 = 2.06656
- time of this step = 1 seconds
-             search direction/parameter/criteria/best criteria
- function call# 12 -1 0.825 3.01386 6.24174e-05
-  END PARAM#1 LOOP, ITER#9
-  Optimum Parameter at this step:
-   0.800000
-  Optimum found: icall=12 0.000062 0.000062
-   param: 0.800000

- Example Automatic Calibration Output(single parameter)

- Current and previous multi-scale objective values

- RMS for 1 hour scale

- RMS for 24 hour scale

- If calibration does not complete in first run for some reason (e.g. hardware/network glitches), you can go back and pick up the last set of optimum parameters so you don’t have to restart from the beginning for the next calibration run.

## Impacts of Scalar Multipliers to Routing Parameters (q0 and qm) on Discharge Hydrographs

- Wave velocity:

- Flow velocity

## R Scripts Provided to Assist with Routing Parameter Scaling

-   **TIP:**  It is best to consider the combined impacts rather than the individual impacts of parameter adjustments.
-  In this example, the goal is to slow down high flows and at the same time, speed up low flows as allowed by the model equations.  To do this, the *q0 *grids are scaled by 1.8 and *qm* grids are scaled by 0.92.

- User specifies scalars,
- and the R script plots velocities.

## Routing scalar impacts on actual hydrographs

- TALO2

- TALO2

- KNSO2

- KNSO2

- TALO2

- Delayed high peak

- Speed up low peak

- Less effect at upstream point.

- Pink: without scalars
- Yellow: with scalars (1.8q0, 0.92qm)