scrollbar |
---|
This briefly explains the method of using the State files of for a model in FEWS environment.
Generally all model requires only the state at the start of the run and writes the state at end of each run.
In FEWS, in an update run (sometimes refers to as Historical Run), the initial state of the model is copied from database to appropraite directory/file where the model expects it to be.
And at end of each run a state is copied back to FEWS database to be used again for the next (update/forecast) model run.
To facilitiate this, the following steps are followed in FEWS
FEWS copies the model state file from database to a model directory say ".\Model\state". The model state can be a zipped file which can then be unzipped by Preprocessor will and copy it to the appropraite model state directory. This zipped file may contain one or more state files depending on a model (for example HBV, model has number of state file which is equivalent to number of of districts). The information of state locations and date and time of state is written to a PI State XML file. An example is shown below.
No Format |
---|
<?xml version="1.0" encoding="UTF-8"?>
<State
xsi:schemaLocation="http://www.wldelft.nl/fews/PI http://fews.wldelft.nl/schemas/version1.0/pi-schemas/pi_state.xsd"
version="1.2" xmlns="http://www.wldelft.nl/fews/PI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<stateId>warm</stateId>
<timeZone>0.0</timeZone>
<dateTime date="2008-02-10" time="00:00:00"/>
<stateLoc type="file">
<readLocation>D:\Fews\App\po_sa\Modules\Topkapi\Trebbia\Fews_in\State\Topkapi_in.stt</readLocation>
<writeLocation>D:\Fews\App\po_sa\Modules\Topkapi\Trebbia\Fews_in\State\Topkapi_in.stt</writeLocation>
</stateLoc>
</State>
|
Model is then runnned, using this state file, for a given period. The states files are written back to the state directory say ".\Model\state" directory at the end of simulation.
After the model run is completed, the Postprocessor then copies the state file or files back to the zip model state zipped file (say:Model.zip)
The Postprocessor not onlyu copy back the state file but also updates the pi state file with the last state file and changes the <dataTime> field to appropraite date time
For example , if the model is runned till 2006-06-30 00:00,
- then the date and time in the <dateTime> field should be changed to <dateTime date="2006-06-30" time="00:00:00"/> and
- the file name under <writeLocation> should be changed to
<writeLocation>D:\FewsPO\Modules\Topkapi\Reno\States\200606300000.stt</writeLocation>
The General Adapter will then accordingly act on the new pi state file and stores the correct state to FEWS database.