Package: fews-3di
Program to start3Disimulations from
FEWS.Installation and usageWe can be installed using python 3.6+ with:$ pip install fews-3diThe script is calledrun-fews-3di, you can pass--helpto get usage
instructions and--verboseto get more verbose output in case of problems.run-fews-3dilooks for arun_info.xmlin the current directory by
default, but you can pass a different file in a different location with--settings:$ run-fews-3di
$ run-fews-3di --help
$ run-fews-3di --settings /some/directory/run_info.xmlConfiguration and input/output filesThe expected information in run_info.xml is:<?xml version="1.0" encoding="UTF-8"?>
<Run xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xmlns="http://www.wldelft.nl/fews/PI"
     xsi:schemaLocation="http://www.wldelft.nl/fews/PI
                         http://fews.wldelft.nl/schemas/version1.0/pi-schemas/pi_run.xsd"
                         version="1.5">
    <startDateTime date="2020-01-26" time="10:00:00"/>
    <endDateTime date="2020-01-30" time="12:00:00"/>
    <properties>
        <string key="api_token" value="aBCd1234.5678tOkeNabcde"/>
        <string key="organisation" value="12345678abcd"/>
        <string key="modelrevision" value="abcd123456787"/>
        <string key="simulationname" value="Simulation name"/>
        <string key="save_state" value="True"/>
        <string key="save_state_time" value="1400" />
        <string key="use_last_available_state" value="False" />
        <string key="saved_state_expiry_days" value="5"/>
        <string key="rain_type" value="radar"/>
        <string key="rain_input" value="730d6675-35dd-4a35-aa9b-bfb8155f9ca7"/>
        <string key="rain_radar_multiplier" value="0.8"/>
        <string key="fews_pre_processing" value="True"/>
        <string key="lizard_results_scenario_name" value="Testsimulatie"/>
        <string key="lizard_results_scenario_uuid" value=""/>
        <string key="initial_waterlevel" value=""/>
        <string key="api_host" value=""/>
        <string key="use_lizard_timeseries_as_boundary" value=""/>
        <string key="boundary_file" value="boundary_file.json"/>
    </properties>
</Run>Note:saved_state_expiry_daysused to be spelled assave_state_expiry_days, without a “d”. The example radar uuid is the Dutch
rainfall radar (NRR).save_state:To use a warm state provide a text file with id in the
states folder using the namestates/3di-saved-state-id.txt.  A cold state
is supplied in a similar way with the name:states/3di-cold-state-id.txt.use_last_available_state:To overpass the state management system and
directly take the last available state in the 3Di database the option:use_last_available_statecan be set to True.save_state_time:When saving a state asave_state_timecan be specified.
This parameter defines the time in the simulation (in seconds) when the state
should be saved. If left empty the end of the simulation is used.rain_type:multipe rain-types can be used in the configuration:constantradarcustomrain_input:according to the chosen rain-type, a rain input must be givenin the configuration:constant–>integer [m/s]radar–>lizard uuidcustom–> two options:rain_csvorrain_netcdf. These files
must be stored in the input directory asinput/rain.csvandinput/precipitation.ncrain_radar_multiplier:can be used to multiply the rain_inputradarwith a constant value. This can be used to correct the radar input. The
default value is 1.0.fews_pre_processing:can beTrueorFalse. Must be True if theresults are needed in fews: additional pre_processing of the results is
needed.initial_waterlevel:can bemin,max, ormean. When specifiedthe initial waterlevel raster is taken into account. If left empty no initial
waterlevel is used in the simulation.initial_waterlevel:if you want to use the initial waterlevel raster asdefined in the settings (leave empty if no initial waterlevel is predefined):minmeanmaxapi_host:(optional) api_host address can be added here. If not provided
the default api_host address (”https://api.3di.live/v3.0”) will be used.use_lizard_timeseries_as_boundary:(optional) can beTrueorFalse.
Must be True if the boundary conditions of the simulation has to be updated by
the boundary_file.jsonboundary_file:(optional) the name of the boundary json file that will be
updated to the simulation ifuse_lizard_timeseries_as_boundaryisTrue.
No checks are done for the content of the file.Several input files are needed, they should be in theinputdirectoryrelativeto therun_info.xml:run_info.xmlinput/lateral.csvinput/precipitation.ncinput/evaporation.ncinput/boundary_file.jsoninput/ow.ncmodel/gridadmin.h5Output is stored in theoutputdirectory relative to therun_info.xml:output/simulation.log(unavailable, but included in the zip)output/flow_summary.log(idem)output/log_files_sim_ID.zipoutput/results_3di.ncoutput/dischages.csvoutput/ow.ncDevelopmentDevelopment happens on github. SeeDEVELOPMENT.rstfor more information.