.. _wflow_adapt: wflow_adapt Module ================== Introduction ------------ wflow_adapt is an adapter that links wflow to Delft-FEWS (http://publicwiki.deltares.nl/display/FEWSDOC/Home). it is typically run from the Delft-FEWS general adapter. Linking wflow models to Delft-FEWS ---------------------------------- To run the model from Delft-FEWS the following actions need to be performed: - wflow_[sbm|hbv].py needs to be run with the -F option where the argument refers to a Delft-FEWS runinfo.xml file - you need to specify fewsrun=1 in the model section of the .ini file - The postadapter (wflow\_adapt.py) needs to be run after the wflow run Because DELFT-FEWS exports the mapstacks beginning at 0 and pcraster expects them to start at 1 you will need to add a delay of one timesstep to mapstack timeseries exported to wflow. This will mean the first timestep (.000) is empty but that one will be ignored by wflow anyway. The adapter also tries to convert the log messages of the model into Delft-FEWS diagnostics XML format. - Casename\runid\wflow.log is converted to wflow_diag.xml - Also the adapter log files is converted to wflow_adapt_diag.xml Command line arguments: An example of executing wflow from the Delft-FEWS general adapter is shown below: :: Run wflow bin-wflow\wflow_sbm.exe -C rhine -F rhine/inmaps/runinfo.xml -f 7200000 Run wflow post bin-wflow\wflow_adapt.exe -M Post -s rhine/instate/state.xml -o rhine/instate/outstate.xml -r rhine/inmaps/runinfo.xml -w ./ -C rhine -I wflow_sbm.ini -T 86400 1200000 wflow_diag.xml The wflow_adapt module can also be used by other programs to convert .tss files to pi-xml vv. Below the API documentation of the module is given. Module function documentation ----------------------------- .. automodule:: wflow_adapt :members: