User Tools

Site Tools


start:hype_tutorials:updating

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
start:hype_tutorials:updating [2015/08/25 09:28]
cpers [AR – updating of discharge (qar)]
start:hype_tutorials:updating [2024/01/25 11:37] (current)
Line 1: Line 1:
-===== Description of updating methods =====+====== Description of updating methods ​======
  
  
-====Direct updating of discharge (quseobs)====+=====Direct updating of discharge (quseobs)=====
 To use direct updating of discharge set ''​update quseobs''​ in [[start:​HYPE_file_reference:​info.txt|info.txt]]. Subbasins chosen for updating are given in the file [[start:​HYPE_file_reference:​update.txt|update.txt]]. Recorded values are given in [[start:​HYPE_file_reference:​Qobs.txt|Qobs.txt]]. It is possible to force updating on all stations in [[start:​HYPE_file_reference:​Qobs.txt|Qobs.txt]] by setting ''​update quseobs allstation''​ in [[start:​HYPE_file_reference:​info.txt|info.txt]]. It is also possible to force no updating by setting ''​update quseobs nostation''​ in [[start:​HYPE_file_reference:​info.txt|info.txt]]. In case of these latter two options, the settings in [[start:​HYPE_file_reference:​update.txt|update.txt]] are ignored. To use direct updating of discharge set ''​update quseobs''​ in [[start:​HYPE_file_reference:​info.txt|info.txt]]. Subbasins chosen for updating are given in the file [[start:​HYPE_file_reference:​update.txt|update.txt]]. Recorded values are given in [[start:​HYPE_file_reference:​Qobs.txt|Qobs.txt]]. It is possible to force updating on all stations in [[start:​HYPE_file_reference:​Qobs.txt|Qobs.txt]] by setting ''​update quseobs allstation''​ in [[start:​HYPE_file_reference:​info.txt|info.txt]]. It is also possible to force no updating by setting ''​update quseobs nostation''​ in [[start:​HYPE_file_reference:​info.txt|info.txt]]. In case of these latter two options, the settings in [[start:​HYPE_file_reference:​update.txt|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):​+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+<​m> ​Qm  = Qr </m>
  
-====AR – updating of discharge (qar)==== +=====AR – updating of discharge (qar)===== 
-To use AR-updating of discharge set ''​update qar''​ in [[start:​HYPE_file_reference:​info.txt|info.txt]]. Subbasins chosen for updating and their AR-factor are given in the file [[start:​HYPE_file_reference:​update.txt|update.txt]]. Recorded values are given in[[start:​HYPE_file_reference:​Qobs.txt|Qobs.txt]]. It is possible to force no updating by setting ''​update qar nostation''​ in [[start:​HYPE_file_reference:​info.txt|info.txt]]. In this case, the settings in [[start:​HYPE_file_reference:​update.txt|update.txt]] are ignored.+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 [[start:​HYPE_file_reference:​info.txt|info.txt]]. Subbasins chosen for updating and their AR-factor are given in the file [[start:​HYPE_file_reference:​update.txt|update.txt]]. Recorded values are given in [[start:​HYPE_file_reference:​Qobs.txt|Qobs.txt]]. It is possible to force no updating by setting ''​update qar nostation''​ in [[start:​HYPE_file_reference:​info.txt|info.txt]]. In this case, the settings in [[start:​HYPE_file_reference:​update.txt|update.txt]] are ignored.
  
-The updating method applies ​AR-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:+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:
  
-<m> Err(t_{0}) = Qm(t_{0}– Qr(t_{0}) </m>+<m> Err(t0) = Qm(t0Qr(t0) </m>
  
-<m> Qar(t+n) = Qm(t+n) - Err(t_{0}) * AR^n </​m> ​       <m> (Qar>=0</m>+<m> Qar(t+n) = Qm(t+n) - Err(t0) * AR^n    ,  ​Qar>=0 </m>
  
  
-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 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)==== +=====Updating of lake water stage (wendupd)===== 
-To use lake water updating set ''​update wendupd wstr''​ in [[start:​HYPE_file_reference:​info.txt|info.txt]]. Subbasins chosen for updating are given in the file [[start:​HYPE_file_reference:​update.txt|update.txt]]. Recorded values (wstr) are given in [[start:​HYPE_file_reference:​Xobs.txt|Xobs.txt]].+To use lake water updating set ''​update wendupd wstr''​ in [[start:​HYPE_file_reference:​info.txt|info.txt]]. Subbasins chosen for updating are given in the file [[start:​HYPE_file_reference:​update.txt|update.txt]]. Recorded values (''​wstr''​) are given in [[start:​HYPE_file_reference:​Xobs.txt|Xobs.txt]] or for later versions alternatively in [[start:​HYPE_file_reference:​Wobs.txt|Wobs.txt]].
  
-The updating method replaces modeled water stage of outlet lake with water stage when available. If Wm = modelled waterstage and Wr = recorded waterstage, then for timesteps with observations (Wr<>​-9999):​+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 [[start:​HYPE_file_reference:​lakedata.txt|LakeData.txt]] and [[start:​HYPE_file_reference:​damdata.txt|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+<​m> ​Wm  = Wr </m>
  
-Both state variables and output variables are updated ​by the subroutine. 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.+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)====+=====AR - updating of lake water stage for discharge (warupd)=====
  
-To update discharge with AR used on lake water stage set ''​update warupd wstr''​ in [[start:​HYPE_file_reference:​info.txt|info.txt]]. Subbasins chosen for updating are given in the file [[start:​HYPE_file_reference:​update.txt|update.txt]]. Recorded values (''​wstr''​) are given in [[start:​HYPE_file_reference:​Xobs.txt|Xobs.txt]].+To update discharge with AR used on lake water stage set ''​update warupd wstr''​ in [[start:​HYPE_file_reference:​info.txt|info.txt]]. Subbasins chosen for updating are given in the file [[start:​HYPE_file_reference:​update.txt|update.txt]]. Recorded values (''​wstr''​) are given in [[start:​HYPE_file_reference:​Xobs.txt|Xobs.txt]] or for later versions alternatively in [[start:​HYPE_file_reference:​Wobs.txt|Wobs.txt]].
 This method cannot be used in combination with updating methods ''​qar''​ or ''​wendupd''​. This method cannot be used for regulated lakes. 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 ​AR-changed ​error or a saved 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 ​discharge ​(War) is:+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)+<​m> ​Err(t0) = Wm(t0) ​Wr(t0) ​</m>
  
-War(t+n) = Wm(t+n) - Err(t0)*ARn        (War>=0)+<​m> ​War(t+n) = Wm(t+n) - Err(t0)*AR^n , War>​=0 ​</m>
  
 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 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 the discharge (at the end of) last time step and the discharge (at the end of) current time step with a rating curve.+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. ​ 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. The state variable(s) of the last lakebasin will be updated to recorded waterstage recalculated to represent the area of the last lakebasin.+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. 
  
-====Updating of total phosphorus (TP) and total nitrogen (TN) concentration==== 
  
-To use updating ​on TP concentration set ''​update tpcorr''​ in [[start:​HYPE_file_reference:​info.txt|info.txt]]. Similarly for nitrogen set ''​update tncorr''​. Subbasins chosen for updating and how much are given in the file [[start:​HYPE_file_reference:​update.txt|update.txt]]. Column headings subid, tpcorr and tncorr. Use fraction 0 for excluding a updating for a subbasin.+=====Direct ​updating ​of substances/​concentrations (cuseobs)=====
  
-The updating ​method changes modeled TP or TN concentration out from the subbasin by a fraction (e.gtpcorr)If TPm = modelled TP concentration and TPc = changed TP concentrationthen for all timesteps:+To use direct ​updating ​of substances set ''​update cuseobs''​ in [[start:​hype_file_reference:​info.txt|info.txt]]Similar to direct updating of dischargeconcentrations of discharge will be replaced with observations. Subbasins chosen ​for updating are given in the file [[start:​hype_file_reference:​update.txt|update.txt]]. Recorded values are given in [[start:​hype_file_reference:​xobs.txt|Xobs.txt]]. It is possible to force updating on all stations with observations by setting ''​update cuseobs allstation''​ in [[start:hype_file_reference:​info.txt|info.txt]]. It is also possible to force no updating by setting ''​update cuseobs nostation''​ in [[start:​hype_file_reference:​info.txt|info.txt]]. In case of these latter two options, the settings in [[start:​hype_file_reference:​update.txt|update.txt]] are ignored.
  
-TPc  ​TPm* (1+tpcorr)+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):
  
-====Updating of local phosphorus and nitrogen concentration==== +<m> Cm Cr </m>
-To use updating on local TP or TN concentration set ''​update tploccorr''​ or ''​tnloccorr''​ in [[start:​HYPE_file_reference:​info.txt|info.txt]]. Subbasins chosen for updating and how much are given in the file [[start:​HYPE_file_reference:​update.txt|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)+=====Updating of total phosphorus ​(TPand total nitrogen (TN) concentration=====
  
 +To use updating on TP concentration set ''​update tpcorr''​ in [[start:​HYPE_file_reference:​info.txt|info.txt]]. Similarly for nitrogen set ''​update tncorr''​. Subbasins chosen for updating and how much are given in the file [[start:​HYPE_file_reference:​update.txt|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:
 +
 +<m> TPc  = TPm * (1+tpcorr) </m>
 +
 +=====Updating of local phosphorus and nitrogen concentration=====
 +To use updating on local TP or TN concentration set ''​update tploccorr''​ or ''​tnloccorr''​ in [[start:​HYPE_file_reference:​info.txt|info.txt]]. Subbasins chosen for updating and how much are given in the file [[start:​HYPE_file_reference:​update.txt|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:
  
 +<m> TPc  = TPm * (1+tploccorr) </m>
  
  
  
start/hype_tutorials/updating.1440487694.txt.gz · Last modified: 2023/11/16 14:28 (external edit)