Jump to content

Search the Community

Showing results for tags 'event'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • About This Forum and Announcements
    • How to Use This Forum
    • Forum Feedback
    • Announcements
  • TUFLOW Modelling
    • 1D/2D Linking
    • 1D Domains
    • 2D/2D Linking
    • 2D/2D Nesting
    • 2D Domains
    • Boundaries
    • Documentation & Tutorial Model
    • Dongles/Licensing/Installation
    • Ideas / Suggestions / New Features
    • Mass Balance/Mass Error
    • MATH Errors & Simulation Failure
    • Restart Files
    • Post-Processing
    • Software/Hardware Requirements
    • Text Files (.tcf, .tgc, .tbc, .ecf)
    • Utilities
    • Miscellaneous
  • Other Software
    • MapInfo/Vertical Mapper
    • miTools
    • Other GIS/CAD
    • SMS
    • XP-SWMM2D
    • UltraEdit/Excel
    • TUFLOW Apps

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL







Found 2 results

  1. Q: I would like to vary the magnitude and duration of events using variables so that I don't have to create separate tcf files. What is the appropriate use of 'BC Event Source ==' and can I specify a unique initial water level for each discharge? A: The “BC Event Source == “ command sets up a wildcard in the bc_dbase and replaces this wildcard with a second argument wherever it is found. In the following case: BC Event Source == _ari_ | 550 This is looking for a wildcard “_ari_” in the boundary database and where this is found this will be replaced by “550”. The wildcard you set is entirely up to you, but do make it something that doesn’t exist anywhere else in the boundary database. For example if you were to use “BC Event Source == a | 550”, it is likely that another “a” occurs somewhere in the boundary database! In the example above _ari_ was used to denote the Average Recurrence Interval. In the example below two wildcards are used: BC Event Source == _durn_ | 010min BC Event Source == _ari_ | 010yr This allows the event magnitude denoted by the average recurrence interval (wildcard = _ari_) and the event duration (wildcard = _durn_), to be varied independently. In this case we can run any combination of durations and return periods. In the bc_dbase, for boundary name “Local” the source is listed and includes both the _ari_ and _durn_ wildcards. For example when we run the 010min event for the 010yr event the source filename will become “rafts\Local_Flows_010yr010min.loc.ts1” Name Source Local rafts\Local_Flows__ari__durn_.loc.ts1 Note the wildcard can occur in either the filename or the header columns. The following are all possible: Name Source Column 1 Column 2 Inflow1 Inflows__ari_.csv Time Flow Inflow2 Inflows.csv Time _ari__durn_ Inflow3 _wildcard_ For inflow 1, the wildcard is part of the filename and could be replaced by for example 550cms and TUFLOW would look for a file called Inflows_550cms.csv and extract the data from columns “Time” and “Flow”. For Inflow2, this wildcard is in the header, for a flow boundary, this is the column to extract the flow data from. TUFLOW will open Inflows.csv and would extract the data from columns “Time” and “550cms” (if the event source was set to 550cms). This would allow all boundaries to be stored in the same file and use the same Time data. For Inflow3, a constant value is being specified. In this case the wildcard replacement would need to be a value “BC Event Source == _wildcard_ | 550”. If this was “550cms” this would cause an error about being unable to convert to a real number. This does not allow for a ramping up of the inflow and may cause stability issues. For the Initial water level, this can be set with the “SET IWL == “ command. For example: Define Event == 550cms BC Event Source == _flow_ | 550cms Set IWL == 149.9 End Define Define Event == 750cms BC Event Source == _flow_ | 750cms Set IWL == 149.9 End Define And finally, in the filenames you can use ~e1~, for the output and log files this will be replaced by the event. If you were to change the filename of your control file to TUFLOW_EXAMPLE_~e1~.tcf, When you run the outputs would become TUFLOW_EXAMPLE_550cms, TUFLOW_EXAMPLE_750cms… etc. As events and scenarios are also automatically classed as variables, wildcards can similarly be used in filepaths within your control files, using the following syntax for example: Output Folder == C:\TUFLOW\Results\<<ari>>\<<durn>>
  2. Q: How do I set up a run for two different independent variables? I have a tributary and a main channel and I would like to instigate the joint probability of a range of events occurring in both channels. A: Using a TUFLOW event file you can set multiple sets of events, in this case we will set M_<event> for the main channel and T_<event> for the tributary. This will set the event magnitude of the main channel and tributary separately. See the example excerpt from a tef file below. The event file (.tef) is read into the .tcf with the command “Event File == <.tef>” # MAIN CHANNEL definition Define Event == M_Q005 BC Event Source == __Main__ | Q001 End Define Define Event == M_Q010 BC Event Source == __Main__ | Q010 End Define Define Event == M_Q100 BC Event Source == __Main__ | Q10 End Define # TRIBUTARY definition Define Event == T_Q005 BC Event Source == __Trib__ | Q005 End Define Define Event == T_Q010 BC Event Source == __Trib__ | Q010 End Define Define Event == T_Q100 BC Event Source == __Trib__ | Q100 End Define In the bc_dbase, we will use these BC event sources (_Main_ and _Trib_) as wildcards. Refer to the below example, assuming that the boundaries in your model are called Main_Flow and Trib_Flow Name Source Column 1 Column 2 Main_Flow Main__Main_.csv Time Flow Trib_Flow Trib__Trib_.csv Time Flow The events in the .tef are set separately so that at the run start you can specify which one to use. If running from a batch file the –e (event) inputs can be used. For example, in your batch file: Start “TUFLOW” "C:\TUFLOW\Releases\2013-12\w64\TUFLOW_iSP_w64.exe" -e1 M_Q010 -e2 T_Q100 example_~e1~_~e2~_001.tcf The above would run a Q10 in the main channel (-e1 M_Q010) and a Q100 in the tributary (-e2 T_Q010), referencing flows from Main_Q010.csv and Trib_Q100.csv This can also be done by setting the “Model Events” command in the .tcf. To run the Q010 Main channel and Q100 Tributary (as above). The following would be needed in the .tcf. Model Events == M_Q010 | T_Q100 Note the use of the vertical bar (|) used to separate the two events. Specifying the events within the .tcf, would require modifying and saving the .tcf for each event you wish to run. This is a bit cumbersome and batch files become very powerful when running multiple events. For example if you wanted to run all combinations of events you could use a looped batch file, see here for more info: http://wiki.tuflow.com/index.php?title=Run_TUFLOW_From_a_Batch-file#Looping_in_a_batch_file ### Start Batch file @echo off :: This sets the variables as local, so you can use another batch file with A and B variables SetLocal :: set up variables set A=M_Q001 M_Q002 M_Q005 M_Q010 M_Q020 M_Q050 M_Q100 M_Q200 set B=T_Q001 T_Q002 T_Q005 T_Q010 T_Q020 T_Q050 T_Q100 T_Q200 :: Loop Through FOR %%a in (%A%) do ( FOR %%b in (%B%) DO ( Start “TUFLOW” "C:\TUFLOW\Releases\2013-12\w64\TUFLOW_iSP_w64.exe" -e1 %%a -e2 %%b example_~e1~_~e2~_001.tcf ) ) pause ### End Batch file If you wanted to also set the event durations as well as the magnitudes you could use 4 events (two for the event magnitudes and two for the event durations). Regards, TUFLOW Support
  • Create New...