User Tools

Site Tools


start:hype_tutorials:updating

Description of updating methods

Direct updating of discharge (quseobs)

To use direct updating of discharge set update quseobs in info.txt. Subbasins chosen for updating are given in the file update.txt. Recorded values are given in Qobs.txt. It is possible to force updating on all stations in Qobs.txt by setting update quseobs allstation in info.txt. It is also possible to force no updating by setting update quseobs nostation in info.txt. In case of these latter two options, the settings in update.txt are ignored.

The updating method replaces modeled discharge with observed discharge when available. If Qm = modelled discharge and Qr = recorded discharge, then for timesteps with observations (Qr<>-9999):

Qm  = Qr

AR – updating of discharge (qar)

AR-updating of discharge complements the direct updating of discharge by updating flow on time steps without observations. To use AR-updating of discharge set update qar in info.txt. Subbasins chosen for updating and their AR-factor are given in the file update.txt. Recorded values are given in Qobs.txt. It is possible to force no updating by setting update qar nostation in info.txt. In this case, the settings in update.txt are ignored.

The updating method is based on an autoregressive model for the error of discharge. It applies updating on discharge. Timesteps with observations are not updated but the modelled error saved. The AR-updating is then applied on following timesteps without any observation. Let t0 be a timestep with an observation followed by timesteps (t+n) without any observations. Let AR be the AR-factor (usually 0-1) set by user, Qm = modelled discharge and Qr = recorded discharge. Err is the calculated error on the last timestep with observation, then the updated discharge (Qar) is:

Err(t0) = Qm(t0) - Qr(t0)

Qar(t+n) = Qm(t+n) - Err(t0) * AR^n    ,  Qar>=0

The change made in the last timestep is saved for the next timestep and then multiplied with AR again. The change for the last timestep is saved to the statefiles when an output state is asked for. This change is used for continued AR-updating after the model is restarted from the saved state.

Updating of lake water stage (wendupd)

To use lake water updating set update wendupd wstr in info.txt. Subbasins chosen for updating are given in the file update.txt. Recorded values (wstr) are given in Xobs.txt or for later versions alternatively in Wobs.txt.

The updating method replaces modeled water stage of outlet lake with water stage when available. The recorded waterstage of a regulated dam is adjusted according to the regulation amplitude (wamp in LakeData.txt and DamData.txt) before being used on the simulated waterstage. If Wm = modelled waterstage and Wr = recorded waterstage, then for timesteps with observations (Wr<>-9999):

Wm  = Wr

Both state variables and output variables of lake water stage are changed by the method. For lake basins, only the last lake basin may be updated. The output variable will be updated to the water stage of the whole lake. The state variable(s) of the last lakebasin will be updated to recorded waterstage recalculated to represent the area of the last lakebasin.

AR - updating of lake water stage for discharge (warupd)

To update discharge with AR used on lake water stage set update warupd wstr in info.txt. Subbasins chosen for updating are given in the file update.txt. Recorded values (wstr) are given in Xobs.txt or for later versions alternatively in Wobs.txt. This method cannot be used in combination with updating methods qar or wendupd. This method cannot be used for regulated lakes.

The updating method applies AR-updating on error of water stage in outlet lake. The output variable for water stage is updated with the current error or with the updated AR-change. Let t0 be a timestep with an observation followed by timesteps(t+n) without any observations. Let AR be the AR-factor (usually 0-1) set by user, Wm = modelled water stage and Wr = recorded water stage. Err is the calculated error on the last timestep with observation, then the updated water stage (War) is:

Err(t0) = Wm(t0) - Wr(t0)

War(t+n) = Wm(t+n) - Err(t0)*AR^n , War>=0

The change made in the last timestep is saved for the next timestep and then multiplied with AR again. The change for the last timestep is saved to the statefiles when an output state is asked for. This change is used for continued AR-updating after the model is restarted from the saved state.

The AR-updated water stage is then used to calculate the current discharge. The current discharge is calculated as the mean of two discharges calculated with a rating curve. The first discharge is calculated from the updated water stage (at the end of) last time step and the second discharge is calculated from the updated water stage (at the end of) current time step.

The updating method does not replace the state of modeled water stage of outlet lake with observed water stage. Only the modeled water stage that are printed to file are changed.

For lake basins, only the last lake basin may be updated. The output variable will be updated to the water stage of the whole lake.

Direct updating of substances/concentrations (cuseobs)

To use direct updating of substances set update cuseobs in info.txt. Similar to direct updating of discharge, concentrations of discharge will be replaced with observations. Subbasins chosen for updating are given in the file update.txt. Recorded values are given in Xobs.txt. It is possible to force updating on all stations with observations by setting update cuseobs allstation in info.txt. It is also possible to force no updating by setting update cuseobs nostation in info.txt. In case of these latter two options, the settings in update.txt are ignored.

The updating method replaces calculated concentration in discharge with observed values when available. If Cm = modelled concentration and Cr = recorded concentration, then for timesteps with observations (Cr<>-9999):

Cm = Cr

Updating of total phosphorus (TP) and total nitrogen (TN) concentration

To use updating on TP concentration set update tpcorr in info.txt. Similarly for nitrogen set update tncorr. Subbasins chosen for updating and how much are given in the file update.txt. Column headings subid, tpcorr and tncorr. Use fraction 0 for excluding a updating for a subbasin.

The updating method changes modeled TP or TN concentration out from the subbasin by a fraction (e.g. tpcorr). If TPm = modelled TP concentration and TPc = changed TP concentration, then for all timesteps:

TPc  = TPm * (1+tpcorr)

Updating of local phosphorus and nitrogen concentration

To use updating on local TP or TN concentration set update tploccorr or tnloccorr in info.txt. Subbasins chosen for updating and how much are given in the file update.txt. Column headings subid, tploccorr and tnloccorr. Use fraction 0 for excluding a updating for a subbasin.

The updating method changes modeled TP concentration out from the local river in the subbasin to the main river by a fraction (e.g. tploccorr). If TPm = modelled local TP concentration and TPc = changed local TP concentration, then for all timesteps:

TPc  = TPm * (1+tploccorr)

start/hype_tutorials/updating.txt · Last modified: 2024/01/25 11:37 (external edit)