RES to RES: Difference between revisions
Content deleted Content added
No edit summary |
|||
(8 intermediate revisions by one other user not shown) | |||
Line 1:
<ol>▼
=Introduction=
This utility performs a variety of operations on the TUFLOW 2D outputs. Valid formats are .xmdf (as of utility version 2012-10-AC) and .dat files. This page is split into two section, utility operations (e.g. maximum, difference etc.) and general options. The general options can be used regardless of operation being performed. The table of contents can be used to jump to a desired operation.
Line 11 ⟶ 10:
This can be used to extract the maximum from a number of input datasets. Any number of input files can be specified. If a maximum folder exists in an .xmdf file for the type specified, this dataset will be used, for dat files use -t99999 to use the maximum data in the .dat file.<br>
<u>Examples</u><br>
▲<ol>
<li><tt>res_to_res.exe -max -typeH results_1.xmdf results_2.xmdf results_3.xmdf</tt></li>▼
<li>Extracts the maximum water level from the three .xmdf files.<br>
<li>When maximums are tracked over all timesteps, extracts the maximum water level from the maximums output.<br>
<li>When no maximums has been written directly, extracts the maximum water level of all available output times. Note this does not provide the true, tracked maximum over all timesteps.<br>
</ol>▼
==Min==
Line 23 ⟶ 24:
This can be used to extract the minimums from a number of input datasets. Any number of input files can be specified. If a minimum folder exists in an .xmdf file for the type specified, this dataset will be used.<br>
<u>Examples</u><br>
<ol>
<li><tt>res_to_res.exe -min -typeH results_1.xmdf results_2.xmdf results_3.xmdf</tt></li>▼
<li>Extracts the minimum water level from the three xmdf files.<br>
<li>Extracts the minimum water level from the three xmdf files with output name "Minimums.xmdf".<br>
▲
</ol>
==Difference==
Line 36 ⟶ 39:
The -t option can be used to carry out the difference at a particular time (rather than all times). The most common time is to take the difference at the flood peak, ie. specify -t99999.<br>
<u>Examples</u><br>
<ol>
<li><tt>res_to_res.exe -dif -typeH results_developed.xmdf results_existing.xmdf</tt></li>▼
<li>Extracts the difference in water level, the output is results_developed minus results_existing for all timesteps.<br>
<li>Extracts the difference in water level for the maximum water level and suppresses the wet/dry check described above.<br>
▲
</ol>
==Duration==
Line 46 ⟶ 51:
Determines the duration in hours that the the results exceed the cut off value.<br>
'''Note: ''' A preferable approach is to use the .tcf file command: <tt>Time Output Cutoff Depths == <cut off value or values></tt>. With this command specified TUFLOW tracks this on a timestep by timestep basis rather than post processing this at the map output interval.<br>
<u>
<ol>
<li><tt>res_to_res.exe -dur0.1 -typeD results.xmdf</tt></li>▼
<li>Extracts the duration in flooding above 0.1m deep.<br>
</ol>
==Keep==
Line 55 ⟶ 62:
Can be used to extract a single timestep from a results file. This is useful to extract the maximums to a separate file making it easier to transfer electronically. To keep a range of output times see the -range option below.<br>
<u>Examples</u><br>
<ol>
<li>Creates a new results file containing just the maximum from the water level results.<br>
<li>Creates a new results file containing just velocity results for the 2.5 hour output.<br>
</ol>
==Range==
Line 64 ⟶ 73:
<u>Description</u><br>
Extracts all timestep between start time and end time (inclusive) into a separate results file.<br>
<u>
<ol>
<li><tt>res_to_res.exe -rangeA1 -rangeB2.5 -typeD results.xmdf</tt></li>▼
<li>Creates a new results file containing the depth outputs between 1.0 and 2.5 hours. Both 1 and 2.5 hour outputs are included.<br>
</ol>
==Remove==
Line 72 ⟶ 83:
<u>Description</u><br>
Creates a new output file and removes the output time from this.<br>
<u>
<ol>
<li><tt>res_to_res.exe -r3 -typeD results.xmdf</tt></li>▼
<li>Creates a new output file which does not include the output at 3.<br>
</ol>
==Trim Values==
Line 80 ⟶ 93:
<u>Description</u><br>
Creates a new output file which has any values above <value> set to <value>. If the input is a vector data, the vector magnitude is used to trim the value (direction is unchanged).<br>
<u>
<ol>
<li><tt>res_to_res.exe -trim5 -typeV results.xmdf</tt></li>▼
<li>Creates a new output of velocity with any outputs greater than 5.0 set to 5.0.<br>
</ol>
==Times==
Line 88 ⟶ 103:
<u>Description</u><br>
Creates a text file which contains the output times in the .dat or xmdf file. If no output filename is specified with the -out option the output file will be called "times.txt". For xmdf files see also the -xnfo option below.<br>
<u>
<ol>
▲<li><tt>res_to_res.exe -times -typeH results.xmdf</tt></li>
<li>Creates an an output file "times.txt" which contains all timesteps that are contained in the results file.<br>
</ol>
==XMDF Information==
Line 96 ⟶ 113:
<u>Description</u><br>
Creates a text file which contains a list of the datasets contained within the .xmdf file. The number of output times and the output times are also exported to the text file.<br>
<u>
<ol>
<li><tt>res_to_res.exe -xnfo -out xmdf_info.txt results.xmdf</tt></li>▼
<li>Creates an an output file with the specified filename "xmdf_info.txt", which contains information about the contents of the xmdf file.<br>
</ol>
==Vector Angle==
Line 104 ⟶ 123:
<u>Description</u><br>
Outputs the vector direction in degrees relative to north (North = 0°, East = 90°, South = 180°/-180°, West = -90°).<br>
<u>
<ol>
▲<li><tt>res_to_res.exe -va -typeV results.xmdf</tt></li>
<li>Outputs the velocity direction for all timesteps in the results file.<br>
</ol>
==Concatenate==
Line 112 ⟶ 133:
<u>Description</u><br>
Concatenates (joins) two or more results files into one. Each results file must be from the same 1D/2D mesh.<br>
<u>
<ol>
<li>Joins the water level results contained in the three files into a single file.<br>
</ol>
==Convert==
Line 121 ⟶ 144:
Converts between .dat and .xmdf format results. Not to be confused with -con (concatenate option described above)!<br>
<u>Examples</u><br>
<ol>
<li>Converts the maximum water level results in the xmdf file into .dat file format.<br>
<li>Converts all datasets and times in the .xmdf file into .dat file format. This will output a number of .dat files.<br>
<li>Converts all times in the .dat file into xmdf file format.<br>
</ol>
==Time of Increase==
'''Input Switch: -toi<cutoff>'''<br>
Calculates the time taken for the results to increase by the cutoff. For example if a value of 0.2 is used for a depth grid, the output result contains the time required for the depth to increase by 0.2m. If there are depth values greater than 0.2 initially (due to initial water level conditions), the output is the time for the depth to increase by 0.2m. For dry areas it is the time for the depth to reach 0.2m.<br>
<u>
<ol>
<li><tt>res_to_res.exe -toi0.2 -typeD results.xmdf</tt></li>▼
<li>Extracts the time taken for the depth to increase by 0.2m.<br>
</ol>
==Ensight (beta)==
Line 146 ⟶ 173:
* Ensight results as either per node or per element depending on the input file.
'''This conversion is in its beta stage of development. This utility can currently only process 2D results. 1D channel result are currently not supported.<br>
Any feedback regarding this utility function is welcome and can be sent to [mailto:support@tuflow.com support@tuflow.com].<br>
<u>
<ol>
▲<li><tt>res_to_res.exe -ensight results.xmdf</tt></li>
<li>Converts all datasets in the xmdf file into Ensight format.<br>
<tt>res_to_res.exe -ensight results.xmdf</tt>
</ol>
=General Options=
Line 175 ⟶ 204:
|"-type<output type>"|| Converts the specified output type in an xmdf file. Output types should be specified as per the output type in the .tcf e.g. h (water level), v (velocity), q (unit flow) or d (depth). Output types other than h, v, q and d are not predefined with the -type switch and should be called with -v and/or -s switch.
|-
|"-s<output id(integer)>"|| Converts the specified scalar dataset in an xmdf file. For example, <tt>-s1</tt> will convert the first scalar dataset. A list of the available datasets is listed within the
|-
|"-v<output id(integer)>"|| Converts the specified vector dataset in an xmdf file. For example, <tt>-v1</tt> will convert the first vector dataset. A list of the available datasets is listed within the
|-
|"-Folder<Folder Name>"|| Converts all datasets within a particular xmdf file. For example, <tt>-Folder"Maximums"</tt> will convert all datasets in the \Maximums\ folder.
Line 187 ⟶ 216:
==XMDF Dataset Example==
Display the datasets available within an XMDF file in a
To keep the
The list of available datasets will be displayed towards the start of the
<u>Examples</u><br>
<tt>res_to_res.exe -xnfo results.xmdf<br>
pause</tt><br><br>
Displays the following
[[File: xmdf_dataset_example.png]]<br>
<br>
Line 201 ⟶ 230:
|uplink=[[TUFLOW_Utilities | Back to TUFLOW Utilities]]
}}
▲</ol>
|