Date: Fri, 29 Mar 2024 07:41:13 +0100 (CET) Message-ID: <1326650773.3256.1711694473692@v-public003.directory.intra> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_3255_1766042638.1711694473692" ------=_Part_3255_1766042638.1711694473692 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
This document (HFPTforNFFS.pdf ) describes the Histo=
ric Forecast Performance Tool (HFPT) adapter which was first developed unde=
r Environment Agency R&D project SC080030 =E2=80=98risk based probabili=
stic flood forecasting=E2=80=99 [1].=
The original scientific name of the method is =E2=80=98Quantile Regression=
=E2=80=99 which was subsequently renamed to HFPT. This report includes a de=
scription of the Historic Forecast Performance Tool adapter that can be use=
d within NFFS, the file formats for reading and writing of the quantiles, t=
he configuration of the Historic Forecast Performance Tool adapter in NFFS.=
In addition, a limited background on the method is described. In Appendix =
A the off-line calibration module of the Historic Forecast Performance Tool=
is described.
The migration of the prototype R&D to the current version of the NFF=
S adaptor consists of several steps:
[1] http://evidence.environment-agency.gov.uk/= FCERM/en/Default/HomeAndLeisure/Floods/WhatWereDoing/IntoTheFuture/ScienceP= rogramme/ResearchAndDevelopment/FCRM.aspx
The role of the Historic Forecast Performance Tool is to provide a proba=
bility distribution of the water level forecasts (or flow) conditioned on t=
he deterministic water level forecast (or flow forecast). This can one, a f=
ew or many or percentiles or quantiles (including median or any other perce=
ntile/quantile like 0.05, 0.10, 0.25, 0.50, 0.75, 0.95).
The Historic Forecast Performance Tool adapter is linked to NFFS by mean=
s of the general adapter (see Figure 2.1).
Figure 2.1 Schematic Interction between between Delft-FEWS a= nd Historic Forecast Performance Tool adapter (see Werner et al., 2004, Wee= rts et al., 2010)
With increasing leadtime, many sources of uncertainty impact the accurac=
y of forecasts, with different uncertainty components dominating at differe=
nt lead times. In an operational setting, forward propagation of all these =
uncertainties can be infeasible because it requires many data (e.g. meteoro=
logical ensemble forecasts) or many model runs (EA, 2011?).
The Historic Forecast Performance Tool (i.e. Quantile Regression) adapte=
r as developed in R&D project SC080030 (see Weerts et al., 2011) makes =
use of offline-derived quantiles (median, quartiles, percentiles, etc) of t=
he probability density function of the forecast error at different lead tim=
es (i.e. climatology of the forecast error at different lead times). The es=
timates of the quantiles of the forecast error are conditional on the (dete=
rministic) water level forecast (or flow forecast) and leadtime. In real-ti=
me, based on the water level forecast and leadtime, the moment of the forec=
ast error is looked up and added to the water level forecast (or flow forec=
ast).
The Historic Forecast Performance Tool estimates the uncertainty due to = all uncertainty sources affecting the forecast error. In NFFS (i.e. Delft-F= EWS), the Historic Forecast Performance Tool is implemented as a post-proce= ssor on a deterministic forecast (see Figure 3.1).
Figure 3.1 Example Historic Forecast Performance Tool as pos= tprocesser in NFFS
The Historic Forecast Performance Tool is based on Quantile Regression t=
hat is a method for estimating conditional quantiles (Koenker, 2005; Koenke=
r and Basset, 1978; Koenker and Hallock, 2001). This requires conditioning =
of the Quantile Regression relationships on a calibration dataset of foreca=
st values and associated forecast errors at each leadtime of interest (see =
Appendix A). This calibration is carried out off-line and is described in m=
ore detail in Appendix A. The end result of the calibration are a number of=
files describing the QR relationships (see Figure 3.1) per leadtime containing a look up table of =
the percentiles/quantiles of the forecast error conditional on the water level forecast (or flow forecast)=
.
Although, it is possible to estimate the QR relationships for each leadt= ime, this is in practise unfeasible. Therefore, an interpolation approach (= linear) between the QR relationships of different leadtimes (i.e. assuming = that the change in error characteristic between leadtimes is linear) is use= d. Depending on the response time of the catchments the lead-time interval = between the estimated QR relationships may vary (1-2 hours vs 3 hours). For= example, for Todmorden an interval of 2 hours is used while for the Upper-= Severn an interval of 3 hours is used.
The QR relationships are contained in csv files. These csv files contain=
s 2 + n columns, where n is the number of quantiles for which estimates are=
made. The file has a one-line header, which contains the names of the quan=
tiles estimated. Each row contains a water level (or flow) value along with=
the additive error quantiles, the following columns are given per row:
column |
description |
1 |
Record number |
2 |
Hindcasted discharge or water level value at = the given lead time (are ordered in ascending order) |
3 (n+2) |
Quantile error, belonging to the hindcasted v= alue, given in the same row |
An example of the content of such a file is given below:
942 |
4.9666 |
-1.57933 |
-0.42273 |
-0.13417 |
0.146459 |
0.622485 |
943 |
5.03154 |
-1.5847 |
-0.42347 |
-0.1344 |
0.146697 |
0.623916 |
944 |
5.039295 |
-1.59015 |
-0.42417 |
-0.13444 |
0.147244 |
0.625369 |
945 |
5.071049 |
-1.59569 |
-0.42562 |
-0.13537 |
0.147856 |
0.627183 |
946 |
5.087218 |
-1.60132 |
-0.42711 |
-0.13711 |
0.148691 |
0.629604 |
947 |
5.098072 |
-1.60704 |
-0.42863 |
-0.13839 |
0.149717 |
0.632067 |
948 |
5.113213 |
-1.61287 |
-0.42952 |
-0.13907 |
0.15061 |
0.634572 |
949 |
5.129232 |
-1.62231 |
-0.4305 |
-0.13991 |
0.151202 |
0.637121 |
950 |
5.150331 |
-1.63292 |
-0.43171 |
-0.14068 |
0.151703 |
0.639716 |
951 |
5.15863 |
-1.64373 |
-0.43221 |
-0.14179 |
0.151718 |
0.641067 |
952 |
5.175358 |
-1.65474 |
-0.43394 |
-0.1433 |
0.151812 |
0.641883 |
953 |
5.176646 |
-1.66597 |
-0.43826 |
-0.14371 |
0.152727 |
0.642714 |
954 |
5.219848 |
-1.67742 |
-0.44298 |
-0.14486 |
0.153603 |
0.643563 |
955 |
5.232494 |
-1.6891 |
-0.45232 |
-0.14687 |
0.153829 |
0.644428 |
956 |
5.259691 |
-1.70103 |
-0.46806 |
-0.14825 |
0.154138 |
0.645962 |
957 |
5.271904 |
-1.71322 |
-0.47251 |
-0.14872 |
0.154948 |
0.648547 |
958 |
5.28762 |
-1.72569 |
-0.47522 |
-0.14922 |
0.156024 |
0.65119 |
The Historic Forecast Performance Tool adapter is written in R (R Develo=
pment Core Team, 2010) and executed via running an R script in the general =
adapter (Weerts et al., 2010; Weerts et al., 2011). The R package can be do=
wnloaded from http://www.r-project.org/.
Besides the base R package the following R libraries/packages are needed=
Hmisc=
XML= p>
zoo= p>
quant=
reg
The Rscript.exe can be run via the General Adapter using command line ar=
guments.
The R package contained in the ModuleDataSet files is exported and unzip=
ped to the modules directory creating the directory %REGION_HOME%/Modules/R=
-2.13.0. In the global.properties files the location of the Rscript.exe mus=
t be defined as follows
R_EXE=3D%REGION_HOME%/Modules/R-2.13.0/bin/Rscript.exe
The location of the HFPT adapter is assumed to be under %REGION_HOME%/Mo= dules/HFPT and this is also assumed to be the %ROOT_DIR%.
The base package and the additional libraries are contained the director= y named R-2.13.0 (+/-29Mb). This directory is stripped as much as possible = from unnessary items like html and pdf files. However, because of limitatio= ns on the size of the ModuleDataSet files in NFFS, due to the use of weblog= ic (Boot, pers. comm.), the directory is split up into four ModuleDat= aSet files all smaller than 12 Mb. Resulting in four ModuleDataSet Files
R_part1_Module.zip
R_part2_Module.zip
R_part3_Module.zip
R_part4_Module.zip
The Retrieve_Zipped_Configurations.xml workflow exports all ModuleDataSe=
t files by for example adding these lines to the Retrieve_Zipped_Configurat=
ions.xml file
<a= ctivity>
= <runI= ndependent>true</runIndependent>
= <modu= leInstanceId>Midlands_US_HFPT_Modules</moduleInstanceId>
</=
activity>
would export the ModuleDataSets configured in the moduleInstance Midland=
s_US_HFPT_Modules. The same needs to be done the four ModuleDataSet files c=
ontaining R.
The Midlands_US_HFPT_Modules file looks like
<?xml version=3D"1.0" encoding=3D"UTF-8"?>
<generalAdapterRun xmlns=3D"http://www.wldelft.nl/fews" xmlns:xsi=3D"= http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=3D"http://www= .wldelft.nl/fews http://146.213.31.101/schema= s/generalAdapterRun.xsd">
= <general>
= &nb= sp; <description>Export modules d= irectory</description>
= &nb= sp; <rootDir>%REGION_HOME%/Module= s/</rootDir>
= &nb= sp; <workDir>%ROOT_DIR%</workD= ir>
= &nb= sp; <exportDir>%ROOT_DIR%</exp= ortDir>
= &nb= sp; <exportDataSetDir>%ROOT_DIR%&= lt;/exportDataSetDir>
= &nb= sp; <importDir>%ROOT_DIR%</imp= ortDir>
= &nb= sp; <dumpFileDir>$GA_DUMPFILEDIR$= </dumpFileDir>
= &nb= sp; <dumpDir>%ROOT_DIR%</dumpD= ir>
= &nb= sp; <diagnosticFile>%ROOT_DIR%<= ;/diagnosticFile>
= &nb= sp; <convertDatum>false</conve= rtDatum>
= </general>
= <activities>
= &nb= sp; <exportActivities>
= &nb= sp; = <exportData= SetActivity>
= &nb= sp; = &nb= sp; = <moduleInstanceId>Midlands_US_HFPT_Modules</moduleInstanceI= d>
= &nb= sp; = </exportDat= aSetActivity>
= &nb= sp; </exportActivities>
= </activities>
</generalAdapterRun>
Of course all the modules must be added to the ModuleInstanceDescriptors= .XML file:
= <moduleInstanceDescriptor id=3D"R_part1_Module">= p>
= &nb= sp; <description>Retrieves R_part= 1 zipped modules</description>
= &nb= sp; <moduleId>GeneralAdapter</= moduleId>
= </moduleInstanceDescriptor>
= <moduleInstanceDescriptor id=3D"R_part2_Module">= p>
= &nb= sp; <description>Retrieves R_part= 2 zipped modules</description>
= &nb= sp; <moduleId>GeneralAdapter</= moduleId>
= </moduleInstanceDescriptor>
= <moduleInstanceDescriptor id=3D"R_part3_Module">= p>
= &nb= sp; = <descriptio= n>Retrieves R_part3 zipped modules</description>
= &nb= sp; = <moduleId&g= t;GeneralAdapter</moduleId>
= </moduleInstanceDescriptor>
= <moduleInstanceDescriptor id=3D"R_part4_Module">= p>
= &nb= sp; <description>Retrieves R_part= 4 zipped modules</description>
= &nb= sp; <moduleId>GeneralAdapter</= moduleId>
= </moduleInstanceDescriptor>
= <moduleInstanceDescriptor id=3D"Midlands_US_HFPT_Modu= les">
= &nb= sp; <description>Retrieves Midlan= ds_US_HFPT_Modules</description>
= &nb= sp; <moduleId>GeneralAdapter</= moduleId>
=
</moduleInstanceDescriptor>
The following folder structure is necessary and contained in the ModuleD=
ataSet file
config
QR_models
=E2=80=A2 lo= cationId[1]
=E2=80=A2 lo= cationId[2]
=E2=80=A2 lo= cationId[3]
=E2=80=A2 lo= cationId[n]
Work
Each QR relationships relationship is specific in terms of
=E2=80=A2 Fo= recast location
=E2=80=A2 Fo=
recast leadtime
The folder location of each QR relationships for a specific location (26=
38 in this example) in our example would be as follows:
%ROOT_DIR%\HFPT\QR_models\2638
where 2638 specifies the locationId. The QR relationships are contained =
in comma-separated text files. The file naming convention, associated with =
the QR relationships should be
%ROOT_DIR%\Modules\HFPT\QR_models\2638\QR_2638*_LT*.csv
The string _LT means 'Lead Time' and is used to find the associated lead=
time with the error model. characters in between _LT and .csv indicate the=
lead time in hours (for example QR_2638_LT03.csv).
Example of Structure of Modules dir in NFFS
The Historic Forecast Performance Tool adapter is linked to NFFS by mean= s of the general adapter (see Figure 2.1).
The T0 is used by the HFPT module and should be exported as argument. To= be able to do that the time0Format should be define in the general section= of the general adapter run. This enables the use of the %TIME0% later in t= he general adapter run. Below an example of the general section is given. T= his will look the same for each moduleInstance.
<g= eneral>
= <root= Dir>%REGION_HOME%/Modules/HFPT</rootDir>
= <work= Dir>%ROOT_DIR%/Config</workDir>
= <expo= rtDir>%ROOT_DIR%/work</exportDir>
= <impo= rtDir>%ROOT_DIR%/work</importDir>
= <dump= FileDir>$GA_DUMPFILEDIR$</dumpFileDir>
= <dump= Dir>%ROOT_DIR%</dumpDir>
= <diag= nosticFile>%ROOT_DIR%/work/Rdiagnostics.xml</diagnosticFile>
= <time= 0Format>yyyy-MM-dd HH:mm:ss</time0Format>
</=
general>
The input files are exported by the general adapter in PI-timeseries for=
mat and contains the forecast water level (or flow) for the location. The l=
ocationId of the forecasted time series is used to identify the error model=
directory.
The HFPT module is stateless. The relative viewperiod determines t= he length of the exported timeseries. This can be adjusted according to the= specific requirements of the region. If necessary the start can also be co= ntrolled by a dummy exportStateActivity (not shown).
Below an example configuration of the exportTimeSeriesActivity. Note tha=
t this example if for Upper Severn Midlands where they use a hourly timeste=
p.
<exportTimeSeriesActivity>
<e= xportFile>inputs.xml</exportFile>
= <time= SeriesSets>
= <time= SeriesSet>
= &nb= sp; <moduleI= nstanceId>Severn_Usev_FlowToLevel</moduleInstanceId>
= &nb= sp; <valueTy= pe>scalar</valueType>
= &nb= sp; <paramet= erId>H.rated.forecast</parameterId>
= &nb= sp; <locatio= nId>2638</locationId>
= &nb= sp; <timeSer= iesType>simulated forecasting</timeSeriesType>
= &nb= sp; <timeSte= p unit=3D"hour" multiplier=3D"1"/>
= &nb= sp; <relativ= eViewPeriod unit=3D"hour" start=3D"-24" end=3D"48"/>
= &nb= sp; <readWri= teMode>add originals</readWriteMode>
= </tim= eSeriesSet>
= </tim= eSeriesSets>
</exportTimeSeriesActivity>
After exporting the input file as inputs.xml, the general adapter carrie=
s out the execute activities as shown below.
<executeActivities>
<executeActivity>
= <comm= and>
= &nb= sp; <executa= ble>$R_EXE$</executable>
= </com= mand>
= <argu= ments>
= &nb= sp; <argumen= t>--vanilla</argument>
= &nb= sp; <argumen= t>%ROOT_DIR%/config/QR_FEWS.R</argument>
= &nb= sp; <argumen= t>%ROOT_DIR%/work/inputs.xml</argument>
= &nb= sp; <argumen= t>%ROOT_DIR%/work/output.xml</argument>
= &nb= sp; <argumen= t>%TIME0%</argument> &nb= sp; = &nb= sp; =
= </arg= uments>
= <time= Out>60000</timeOut>
</= executeActivity>
</executeActivities> &nbs=
p;
This executeActivity produces the error estimates conditional on the for= ecast water level time series contained in inputs.xml. These results are wr= itten in output.xml. The number of output timeseries depends on the number = of quantiles specified in the csv files containing the error model.
Each timeseries gets a suffix in the parameterId based on the header of = the error model file
<parameterId>H.simulated.forecast.Q5</parameterId>
<parameterId>H.simulated.forecast.Q25</parameterId>
Etc.
Several flags can be added to the timeseries in output.xml:
Flag=3D=E2=80=9D0=E2=80=9D &nb= sp; value is equal to original value (t < t0)
Flag=3D=E2=80=9D1=E2=80=9D &nb= sp; value is corrected and reliable
Flag=3D=E2=80=9D2=E2=80=9D &nb= sp; value is corrected, reliable but interpolated in between lead tim= es
Flag=3D=E2=80=9D5=E2=80=9D &nb= sp; value is unreliable, extrapolated beyond the domain Quantile Regr= ession relationships calibration
The time series in the output.xml are imported during the import activit=
ies.
<importActivities>
= <importTimeSeriesActivity>
= &nb= sp; <importFile>output.xml</im= portFile>
= &nb= sp; = <timeSeries= Sets>
= &nb= sp; = <timeSeries= Set>
= &nb= sp; = &nb= sp; = <moduleInstanceId>QR_2638_H_Forecast</moduleInstanceId><= /p>
= &nb= sp; = &nb= sp; = <valueType>scalar</valueType>
= &nb= sp; = &nb= sp; = <parameterId>H.simulated.forecast</parameterId>
= &nb= sp; = &nb= sp; = <locationId>2638</locationId>
= &nb= sp; = &nb= sp; = <timeSeriesType>simulated forecasting</timeSeriesType>= p>
= &nb= sp; = &nb= sp; = <timeStep unit=3D"hour" multiplier=3D"1"/>
= &nb= sp; = &nb= sp; = <readWriteMode>add originals</readWriteMode>
= &nb= sp; = </timeSerie= sSet>
= &nb= sp; = <timeSeries= Set>
= &nb= sp; = &nb= sp; = <moduleInstanceId>QR_2638_H_Forecast</moduleInstanceId><= /p>
= &nb= sp; = &nb= sp; = <valueType>scalar</valueType>
= &nb= sp; = &nb= sp; = <parameterId>H.simulated.forecast.05</parameterId>
= &nb= sp; = &nb= sp; = <locationId>2638</locationId>
= &nb= sp; = &nb= sp; = <timeSeriesType>simulated forecasting</timeSeriesType>= p>
= &nb= sp; = &nb= sp; = <timeStep unit=3D"hour" multiplier=3D"1"/>
= &nb= sp; = &nb= sp; = <readWriteMode>add originals</readWriteMode>
= &nb= sp; = </timeSerie= sSet>
= &nb= sp; = <timeSeries= Set>
= &nb= sp; = &nb= sp; = <moduleInstanceId>QR_2638_H_Forecast</moduleInstanceId><= /p>
= &nb= sp; = &nb= sp; = <valueType>scalar</valueType>
= &nb= sp; = &nb= sp; = <parameterId>H.simulated.forecast.25</parameterId>
= &nb= sp; = &nb= sp; = <locationId>2638</locationId>
= &nb= sp; = &nb= sp; = <timeSeriesType>simulated forecasting</timeSeriesType>= p>
= &nb= sp; = &nb= sp; = <timeStep unit=3D"hour" multiplier=3D"1"/>
= &n= bsp;  = ; &n= bsp;  = ; <readWriteMode>add originals</readWriteMode>
= &nb= sp; = </timeSerie= sSet>
Etc.
Etc.
= </importTimeSeriesActivity>
</importActivities>
To be able to import the timeseries the parameters outputted by the HFPT= module adapter must be specified in the \Config\RegionConfigFiles\Paramete= r.xml (containing the definitions of all parameters).
During the the HFPT Module run a log file is created in the work directo=
ry. Below an example of the log file and screenshot of display in NFFS.
<?xml version=3D"1.0" encoding=3D"UTF-8"?>
<Diag
xsi:schemaLocation=3D"http://www.wldelft.nl/fews/PI http://fews.wldelft.nl/schemas/version1= .0/pi-schemas/pi_diag.xsd"
version=3D"1.2" xmlns=3D"http://www.wldelft.nl/fews/PI" xml= ns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance">
<line level=3D"4" description=3D"Running R in FEWS"/>=
<line level=3D"3" description=3D"Running Quantile Regres= sion via R in FEWS"/>
<line level=3D"4" description=3D"Starting R-script"/>=
<line level=3D"4" description=3D"input file &= nbsp; : F:\NFFS_UF\Midlands_SA\Modules\QR/work/inputs.xml= "/>
<line level=3D"4" description=3D"output file = : F:\NFFS_UF\Midlands_SA\Modules\QR/work/output.xml"/>
<line level=3D"4" description=3D"Reading data, locationI= d: 2074 startDate: 2008-01-04 00:00:00 endDate: 2008-01-07 00:00:00"/>= p>
<line level=3D"4" description=3D"Simulated Q read from F= :\NFFS_UF\Midlands_SA\Modules\QR\work\inputs.xml"/>
<line level=3D"3" description=3D"-----------------------= -------------------------------------------------"/>
<line level=3D"4" description=3D"working with location: = 2074 System date/time: Thu Apr 14 20:37:16 2011"/>
<line level=3D"3" description=3D"-----------------------= -------------------------------------------------"/>
<line level=3D"4" description=3D"Loading QR models for l= ocation: 2074"/>
<line level=3D"4" description=3D"Loading QR models for l= ocation: 2074"/>
<line level=3D"4" description=3D"QR models found for loc= ation: 2074"/>
<line level=3D"4" description=3D"Generating corrected Q = through QR"/>
<line level=3D"3" description=3D"Forecast quantiles gene= rated"/>
<line level=3D"4" description=3D"Writing forecast quanti= les to PI-timeseries: F:\NFFS_UF\Midlands_SA\Modules\QR\work\output.xml"/&g= t;
<line level=3D"4" description=3D"Forecast quantiles succ= essfully written to PI-timeseries: F:\NFFS_UF\Midlands_SA\Modules\QR\work\o= utput.xml"/>
<line level=3D"3" description=3D"Finished running QR pos= t-processing via R in FEWS"/>
</Diag>
<=
br class=3D"atl-forced-newline">
Once the forecast run is approved, the results can be displayed. This ca=
n be best taken care off in the Config\SystemConfigFiles\DisplayGroups.xml =
file. Of course it is also possible to make the individual timeseries visib=
le via the Config\RegionConfigFiles\Filter.xml file.
Below an example of the configuration in the DisplayGroups. This will di=
splay the area between 5-95 (gray) and 25-75 (blue) in different colours. T=
he colours available are listed
= &nb= sp; = <display na= me=3D"Llanidloes">
= &nb= sp; = &nb= sp; = <description>2= 072</description>
= &nb= sp; = &nb= sp; = <subplot>
= &nb= sp; = &nb= sp; = &nb= sp; = <timeSeriesSet>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <moduleInstanceSetId>DODO_= Historical</moduleInstanceSetId>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <valueType>scalar</valu= eType>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <parameterId>Q.simulated.h= istorical</parameterId>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <locationId>2072</locat= ionId>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <timeSeriesType>simulated = historical</timeSeriesType>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <timeStep multiplier=3D"60" u= nit=3D"minute"/>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <relativeViewPeriod unit=3D"h= our" start=3D"-24" end=3D"0"/>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <readWriteMode>read only&l= t;/readWriteMode>
= &nb= sp; = &nb= sp; = &nb= sp; = </timeSeriesSet>
= &nb= sp; = &nb= sp; = &nb= sp; = <timeSeriesSet>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <moduleInstanceSetId>DODO&= lt;/moduleInstanceSetId>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <valueType>scalar</valu= eType>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <parameterId>Q.simulated.f= orecast</parameterId>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <locationId>2072</locat= ionId>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <timeSeriesType>simulated = forecasting</timeSeriesType>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <timeStep multiplier=3D"60" u= nit=3D"minute"/>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <relativeViewPeriod unit=3D"h= our" start=3D"-12" end=3D"50"/>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <readWriteMode>read only&l= t;/readWriteMode>
= &nb= sp; = &nb= sp; = &nb= sp; = </timeSeriesSet>
= &nb= sp; = &nb= sp; = &nb= sp; = <timeSeriesSet>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <moduleInstanceSetId>DODO&= lt;/moduleInstanceSetId>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <valueType>scalar</valu= eType>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <parameterId>Q.updated.for= ecast</parameterId>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <locationId>2072</locat= ionId>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <timeSeriesType>simulated = forecasting</timeSeriesType>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <timeStep multiplier=3D"60" u= nit=3D"minute"/>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <relativeViewPeriod unit=3D"h= our" start=3D"-12" end=3D"50"/>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <readWriteMode>read only&l= t;/readWriteMode>
= &nb= sp; = &nb= sp; = &nb= sp; = </timeSeriesSet>
= &nb= sp; = &nb= sp; = &nb= sp; = <timeSeriesSet>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <moduleInstanceId>ImportTe= lemetry</moduleInstanceId>
= &nb= sp; = &nb= sp; = &nb= sp; = &n= bsp;  = ; <valueType>scalar</valueType= >
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <parameterId>Q.rated</p= arameterId>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <locationId>2072</locat= ionId>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <timeSeriesType>external h= istorical</timeSeriesType>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <timeStep multiplier=3D"60" u= nit=3D"minute"/>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <relativeViewPeriod unit=3D"h= our" start=3D"-24" end=3D"0"/>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <readWriteMode>read only&l= t;/readWriteMode>
= &nb= sp; = &nb= sp; = &nb= sp; = </timeSeriesSet>
= &nb= sp; = &nb= sp; = </subplot>
= &nb= sp; = &nb= sp; = <subplot>
= &nb= sp; = &nb= sp; = &nb= sp; = <area>
= &n= bsp;  = ; &= nbsp; &nbs= p; &= nbsp; &nbs= p; &= nbsp; &nbs= p; <color>gray50</color>
= &nb= sp; = &n= bsp;  = ; &= nbsp; &nbs= p; &= nbsp; &nbs= p; <opaquenessPercentage>50</opaquen= essPercentage>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <timeSeriesSet>
= &n= bsp;  = ; &n= bsp;  = ; &n= bsp;  = ; &n= bsp;  = ; &n= bsp;  = ; moduleInstanceId>QR_2072_H_Forecast</= moduleInstanceId>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <valueType>scalar</valueType&= gt;
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <parameterId>H.simulated.forecas= t.05</parameterId>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <locationId>2072</locationId&= gt;
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <timeSeriesType>simulated foreca= sting</timeSeriesType>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <timeStep multiplier=3D"60" unit=3D= "minute"/>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <relativeViewPeriod unit=3D"hour" s= tart=3D"0" end=3D"48"/>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <readWriteMode>read only</rea= dWriteMode>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = </timeSeriesSet>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <timeSeriesSet>
= &nb= sp; = &n= bsp;  = ; &= nbsp; &nbs= p; &= nbsp; &nbs= p; &= nbsp; &nbs= p; <moduleInstanceId>QR_2072_H_Forecast</m= oduleInstanceId>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <valueType>scalar</valueType&= gt;
= &nb= sp; = &n= bsp;  = ; &n= bsp;  = ; &n= bsp;  = ; &n= bsp;  = ; <parameterId>H.simulated.forecast.95&= lt;/parameterId>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <locationId>2072</locationId&= gt;
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <timeSeriesType>simulated foreca= sting</timeSeriesType>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <timeStep multiplier=3D"60" unit=3D= "minute"/>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <relativeViewPeriod unit=3D"hour" s= tart=3D"0" end=3D"48"/>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <readWriteMode>read only</rea= dWriteMode>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = </timeSeriesSet>
= &nb= sp; = &nb= sp; = &nb= sp; = </area>
= &nb= sp; = &nb= sp; = &nb= sp; = <area>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <color>blue</color><= /p>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <opaquenessPercentage>50&l= t;/opaquenessPercentage>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <timeSeriesSet>
= &n= bsp;  = ; &= nbsp; &nbs= p; &= nbsp; &nbs= p; &= nbsp; &nbs= p; &= nbsp; &nbs= p; <moduleInstanceId>QR_2072_H_Forecast</m= oduleInstanceId>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <valueType>scalar</valueType&= gt;
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <parameterId>H.simulated.forecas= t.25</parameterId>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <locationId>2072</locationId&= gt;
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <timeSeriesType>simulated foreca= sting</timeSeriesType>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <timeStep multiplier=3D"60" unit=3D= "minute"/>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <readWriteMode>read only</rea= dWriteMode>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = </timeSeriesSet>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <timeSeriesSet>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = &n= bsp;  = ; <moduleInstanceId>QR_2072_H_Forecast&= lt;/moduleInstanceId>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <valueType>scalar</valueType&= gt;
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <parameterId>H.simulated.forecas= t.75</parameterId>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <locationId>2072</locationId&= gt;
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <timeSeriesType>simulated foreca= sting</timeSeriesType>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <timeStep multiplier=3D"60" unit=3D= "minute"/>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <relativeViewPeriod unit=3D"hour" s= tart=3D"0" end=3D"48"/>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <readWriteMode>read only</rea= dWriteMode>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = </timeSeriesSet>
= &nb= sp; = &nb= sp; = &nb= sp; = </area> &= nbsp; &nb= sp; = &nb= sp; =
= &nb= sp; = &nb= sp; = &nb= sp; = <timeSeriesSet>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <moduleInstanceId>QR_2072_= H_Forecast</moduleInstanceId>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <valueType>scalar</valu= eType>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <parameterId>H.simulated.f= orecast</parameterId>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <locationId>2072</locat= ionId>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <timeSeriesType>simulated = forecasting</timeSeriesType>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <timeStep multiplier=3D"60" u= nit=3D"minute"/>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <relativeViewPeriod unit=3D"h= our" start=3D"0" end=3D"48"/>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <readWriteMode>read only&l= t;/readWriteMode>
= &nb= sp; = &nb= sp; = &nb= sp; = </timeSeriesSet>
= &nb= sp; = &nb= sp; = &nb= sp; = <timeSeriesSet>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <moduleInstanceId>QR_2072_= H_Forecast</moduleInstanceId>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <valueType>scalar</valu= eType>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <parameterId>H.simulated.f= orecast.50</parameterId>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <locationId>2072</locat= ionId>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <timeSeriesType>simulated = forecasting</timeSeriesType>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <timeStep multiplier=3D"60" u= nit=3D"minute"/>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <relativeViewPeriod unit=3D"h= our" start=3D"0" end=3D"48"/>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <readWriteMode>read only&l= t;/readWriteMode>
= &nb= sp; = &nb= sp; = &nb= sp; = </timeSeriesSet>
= &nb= sp; = &nb= sp; = &nb= sp; = <timeSeriesSet>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <moduleInstanceSetId>DODO&= lt;/moduleInstanceSetId>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <valueType>scalar</valu= eType>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <parameterId>H.rated.forec= ast</parameterId>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <locationId>2072</locat= ionId>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <timeSeriesType>simulated = forecasting</timeSeriesType>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <timeStep multiplier=3D"60" u= nit=3D"minute"/>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <relativeViewPeriod unit=3D"h= our" start=3D"-12" end=3D"50"/>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <readWriteMode>read only&l= t;/readWriteMode>
= &nb= sp; = &nb= sp; = &nb= sp; = </timeSeriesSet>
= &nb= sp; = &nb= sp; = &nb= sp; = <timeSeriesSet>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <moduleInstanceId>ImportTe= lemetry</moduleInstanceId>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <valueType>scalar</valu= eType>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <parameterId>H.obs</par= ameterId>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <locationId>2072</locat= ionId>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <timeSeriesType>external h= istorical</timeSeriesType>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <timeStep multiplier=3D"15" u= nit=3D"minute"/>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <relativeViewPeriod unit=3D"h= our" start=3D"-24" end=3D"0"/>
= &nb= sp; = &nb= sp; = &nb= sp; = &nb= sp; = <readWriteMode>read only&l= t;/readWriteMode>
= &nb= sp; = &nb= sp; = &nb= sp; = </timeSeriesSet>
= &nb= sp; = &nb= sp; = </subplot>
=
&nb=
sp; =
</display&g=
t;
Koenker, R.: Quantile Regression, Cambridge University Press., 2005.
Koenker, R.: Quantile regression in R: A vignette, [online] Available fr= om: http://cran.r-project.org/we= b/packages/quantreg/vignettes/rq.pdf, 2010.
Koenker, R. and Basset, G.: Regression Quantiles, Econometrica, 46(1), 3= 3-50, 1978.
Koenker, R. and Hallock, K. F.: Quantile Regression, The Journal of Econ= omic Perspectives, 15(4), 143-156, 2001.
Weerts, A.H., J. Schellekens, F. Sperna Weiland, 2010. Real-time geospat= ial data handling and forecasting: Examples from DELFT-FEWS forecasting pla= tform/system, IEEE J. of Selected Topics in Appied Earth Observations and R= emote Sensing, 3, 386-394, doi: 10.1109/JSTARS.2010.2046882.
Weerts, A.H., H.C. Winsemius, J.S. Verkade, 2011. Estimation of predicti= ve hydrological uncertainty using quantile regression: Examples from = the National Flood Forecasting System (England and Wales), Hydrol. Earth Sy= st. Sci., 15, 255--265, doi:10.5194/hess-15-255-2011. Available from: http://www.hydrol-earth-syst-sc= i.net/15/255/2011/hess-15-255-2011.html.
Werner, M.G.F., Van Dijk, M. and Schellekens, J., 2004, DELFT-FEWS: An o= pen shell flood forecasting system, In 6th international conference on = Hydroinformatics, Liong, Phoon and Babovic (Eds.), World Scientific Pu= blishing Company, Singapore, 1205-1212.
In order to derive the error models, a long enough hindcast needs to be =
performed. For each lead time considered, an error model (i.e. relation bet=
ween forecast value, forecast error and leadtime) can be derived from such =
a hindcast. Background information can be found in Weerts et al. (2011) als=
o at http://www.hydrol-ear=
th-syst-sci.net/15/255/2011/hess-15-255-2011.html or directly via http://www.hydrol-earth-syst-sci=
.net/15/255/2011/hess-15-255-2011.pdf.
A procedure has been written in R to support this. To use this procedure=
, first produce a long enough hindcast and make sure that observed values a=
re written to a CSV file as follows:
19 Apr 2004 13:51,131.069 |
11 Aug 2004 23:21,309.644 |
24 Oct 2004 10:21,345.762 |
09 Jan 2005 07:36,347.430 |
17 Apr 2005 02:21,183.950 |
25 Oct 2005 20:06,246.336 |
09 Nov 2005 16:21,192.033 |
12 Jan 2006 01:06,146.348 |
16 Mar 2006 00:06,159.018 |
29 Mar 2006 08:21,277.829 |
. |
. |
. |
12 Jan 2007 06:15,404.215 |
22 Jan 2008 13:45,372.617 |
07 Sep 2008 13:30,398.788 |
30 Nov 2009 19:30,386.434 |
The forecast values should be written in exactly the same manner. The da= tes are not used in the current version. Simply make sure that both files c= ontain the same number of lines and that the observed top value in time cor= responds to the top value of the simulated values. If for instance QR error= relationships are derived for a lead time of 6 hours, and the first entry = in the observations represents the date and time 2010-01-01 12:00:00 then t= he first value in the paired simulation CSV file should contain the forecas= t value of the forecast with t0 =3D 2009-12-31 18:00:00 and lead time 6 hou= rs. This setup is not very user friendly and we may change this in the futu= re to use PI-timeseries with lead time information in the header instead.= p>
Once these files are known, the user can run the batch file 'QR_derive.b= at' with the following 6 inputs as arguments (make sure R is in your path, = if not, the batch file will assume R is located in C:\program files\R\bin):=
CSV - observed values
CSV - forecast values
Location name
Lead time
Quantiles
Missing value
A dataset for location VIKING1 has been delivered with the error derivat= ion procedure. An example command line has been given below:
QR_derive "CSV/VIKING1_obs_01.csv" "CSV/VIKIN= G1_mod_01.csv" "VIKING" "1" "0.05, 0.25, 0.5, 0.75, 0.95" "-990" |