Command line usage

Flow-R can be used in command line mode. Open a shell / command prompt and change the directory to the executable folder (named FlowR). You need to give 2 parameters:

  • paramsfile: a file specific for command line mode (see below)
  • outputdir: the directory where the results will be written

For Windows, the command line is for example:

app.exe --paramsfile "C:\path\to\FlowR\parameters\scripts\commandline_script.xml" --outputdir "C:\Users\me\Desktop\sometests"

For Linux, the command line is for example:

FlowR --paramsfile "/home/me/path/to/FlowR/parameters/scripts/commandline_script.xml" --outputdir "/home/me/FlowR/results"

Here is an example of the xml file required for the paramsfile option (it is not possible here to define multiple runs):

<?xml version="1.0"?>

<main version="0.7.0">
<!--Fill in the options and give a name to the run. Only one run possible-->

<!--Only one run possible-->
<run description="Solalex_test01" name="Solalex_test01">

    <!--Name of the study area-->
    <option code="demfile">D:\path\to\data\dem_010m.txt</option>
    <!--Flow accumulation file. if set, it is not processed-->
    <option code="flowaccfile">D:\path\to\data\flowaccD8_010m.asc</option>
    <!--Flow accumulation method (D8 or Dinf)-->
    <option code="src.flowacc.method">D8</option>
    <!--Flow accumulation threshold (m^2)-->
    <option code="src.flowacc.threshold">10000</option>

    <!--Selection of the buffer layer-->
    <option code="src.buffer.slct">0</option>
    <option code="src.buffer.size">10</option>
    <!--Custom datasets types. Must be similar to the list of the main interface-->
    <option code="src.cust1.type">Predefined sources (for sources)</option>
    <option code="src.cust2.type"></option>
    <option code="src.cust3.type"></option>
    <option code="src.cust4.type"></option>
    <option code="src.cust5.type"></option>
    <option code="src.cust6.type"></option>
    <!--Custom datasets files-->
    <option code="src.cust1.file">D:\path\to\data\src_010m.txt</option>
    <option code="src.cust2.file"></option>
    <option code="src.cust3.file"></option>
    <option code="src.cust4.file"></option>
    <option code="src.cust5.file"></option>
    <option code="src.cust6.file"></option>
    <!--Custom datasets criteria-->
    <option code="src.cust1.crit">boolean</option>
    <option code="src.cust2.crit"></option>
    <option code="src.cust3.crit"></option>
    <option code="src.cust4.crit"></option>
    <option code="src.cust5.crit"></option>
    <option code="src.cust6.crit"></option>
    <!--Choice of the dataset for the source value-->
    <option code="src.value.longname">Predefined sources</option>
    <!--Choice to process or not the spreading-->
    <option code="spg.calc">1</option>
    <!--Add the probabilities of the different debriflows 
        instead of considering the maximum-->
    <option code="spg.addprob">0</option>
    <!--Trigger connected source areas together-->
    <option code="spg.triggermulti">0</option> 
    <!--Calculation mode
        1: Overview: Only superior sources
        2: Quick: energy based discrimination
        3: Complete: simulation of all debris flows-->
    <option code="spg.modecalc">2</option>
    <!--Name of the function processing the directions-->
    <option code="spg.fct_Pspread">Holmgren_modified</option>
    <!--Corresponding parameters file-->
    <option code="">exp=04_dh=1m</option>
    <!--Name of the function processing the inertia probabilities-->
    <option code="spg.fct_Pinert">weights</option>
    <!--Corresponding parameters file-->
    <option code="">default</option>
    <!--Name of the function processing the energy loss-->
    <option code="spg.fct_Eloss">travel_angle</option>
    <!--Corresponding parameters file-->
    <option code="">11_deg</option>
    <!--Option to limit the kinetic energy-->
    <option code="spg.Elimit">1</option>
    <!--Name of the function processing the energy limitation-->
    <option code="spg.fct_Elimit">velocity_inf_to</option>
    <!--Corresponding parameters file-->
    <option code="">15_mps</option>