Difference between revisions of "DAT to DAT"

From Tuflow
Jump to navigation Jump to search
Line 10: Line 10:
 
==Max==
 
==Max==
 
'''Input Switch: -max'''<br>
 
'''Input Switch: -max'''<br>
===Description===
+
<u>Description</u><br>
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.
+
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>
===Examples===
+
<u>Examples</u><br>
 
<li><tt>dat_to_dat.exe -max results_1_h.dat results_2_h.dat results_3_h.dat</tt></li>
 
<li><tt>dat_to_dat.exe -max results_1_h.dat results_2_h.dat results_3_h.dat</tt></li>
 
Extracts the maximum water level from the three .dat files.
 
Extracts the maximum water level from the three .dat files.
Line 20: Line 20:
 
==Difference==
 
==Difference==
 
'''Input Switch: -dif'''<br>
 
'''Input Switch: -dif'''<br>
===Description===
+
<u>Description</u><br>
 
This can be used to compare two datasets.  If a third files is specified, the third file is used as the output file.  The output filename can also be specified with the -out option.  The output is the first results minus the second result file.<br>
 
This can be used to compare two datasets.  If a third files is specified, the third file is used as the output file.  The output filename can also be specified with the -out option.  The output is the first results minus the second result file.<br>
 
A special wet/dry algorithm is used.  If water level results are not specified (_h.dat or -typeH), the algorithm opens these files, as well as opens the .2dm file associated with the results files, and uses the water levels and ZH Zpt values (for 2D cells) and elevations at the WLL triangle corners to determine whether a node (corner of an mesh element) is wet or dry.  This allows two special values to be output in the event that a node is dry in one results file and wet in the other or vica versa.  A value of  99 is used to indicate that a node is dry in the first results file, but is flooded in the second resuilts file, while +99 indicates that the node was wet in the first results file but is dry in the second results file.  Specifying '''-nowetdry''' does not carry out a wet/dry check using  the water level results.  
 
A special wet/dry algorithm is used.  If water level results are not specified (_h.dat or -typeH), the algorithm opens these files, as well as opens the .2dm file associated with the results files, and uses the water levels and ZH Zpt values (for 2D cells) and elevations at the WLL triangle corners to determine whether a node (corner of an mesh element) is wet or dry.  This allows two special values to be output in the event that a node is dry in one results file and wet in the other or vica versa.  A value of  99 is used to indicate that a node is dry in the first results file, but is flooded in the second resuilts file, while +99 indicates that the node was wet in the first results file but is dry in the second results file.  Specifying '''-nowetdry''' does not carry out a wet/dry check using  the water level results.  
 
+
<br>
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.
+
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>
===Examples===
 
 
<li><tt>dat_to_dat.exe -dif results_developed_h.dat results_existing_h.dat</tt></li>
 
<li><tt>dat_to_dat.exe -dif results_developed_h.dat results_existing_h.dat</tt></li>
 
Extracts the difference in water level, the output is results_developed_h - results_existing_h for all timesteps.
 
Extracts the difference in water level, the output is results_developed_h - results_existing_h for all timesteps.
Line 34: Line 33:
 
==Duration==
 
==Duration==
 
'''Input Switch: -dur<cut of value>'''<br>
 
'''Input Switch: -dur<cut of value>'''<br>
===Description===
+
<u>Description</u><br>
 
Determines the duration in hours that the the results exceed the cut of value.<br>
 
Determines the duration in hours that the the results exceed the cut of value.<br>
'''Note: ''' A preferable approach is to use the .tcf file command: <tt>Time Output Cutoff Depths == <cut of 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.
+
'''Note: ''' A preferable approach is to use the .tcf file command: <tt>Time Output Cutoff Depths == <cut of 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>
===Examples===
+
<u>Examples</u><br>
 
<li><tt>dat_to_dat.exe -dur0.1 -typeD results.xmdf</tt></li>
 
<li><tt>dat_to_dat.exe -dur0.1 -typeD results.xmdf</tt></li>
 
Extracts the duration in flooding above 0.1m deep.
 
Extracts the duration in flooding above 0.1m deep.
Line 43: Line 42:
 
==Keep==
 
==Keep==
 
'''Input Switch: -k<output time>'''<br>
 
'''Input Switch: -k<output time>'''<br>
===Description===
+
<u>Description</u><br>
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.
+
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>
===Examples===
+
<u>Examples</u><br>
 
<li><tt>dat_to_dat.exe -k99999 results_h.dat</tt></li>
 
<li><tt>dat_to_dat.exe -k99999 results_h.dat</tt></li>
 
Creates a new results file containing just the maximum from the water level results.
 
Creates a new results file containing just the maximum from the water level results.
Line 53: Line 52:
 
==Range==
 
==Range==
 
'''Input Switch: -rangeA<start time> -rangeB<end time>'''<br>
 
'''Input Switch: -rangeA<start time> -rangeB<end time>'''<br>
===Description===
+
<u>Description</u><br>
Extracts all timestep between start time and end time (inclusive) into a separate results file.
+
Extracts all timestep between start time and end time (inclusive) into a separate results file.<br>
===Examples===
+
<u>Examples</u><br>
 
<li><tt>dat_to_dat.exe -rangeA1 -rangeB2.5 results_q.dat</tt></li>
 
<li><tt>dat_to_dat.exe -rangeA1 -rangeB2.5 results_q.dat</tt></li>
 
Creates a new results file containing the outputs between 1.0 and 2.5 hours.  Both 1 and 2.5 hour outputs are included.
 
Creates a new results file containing the outputs between 1.0 and 2.5 hours.  Both 1 and 2.5 hour outputs are included.
Line 63: Line 62:
 
==Remove==
 
==Remove==
 
'''Input Switch: -r<output time>'''<br>
 
'''Input Switch: -r<output time>'''<br>
===Description===
+
<u>Description</u><br>
Creates a new output file and removes the output time from this.
+
Creates a new output file and removes the output time from this.<br>
===Examples===
+
<u>Examples</u><br>
 
<li><tt>dat_to_dat.exe -r3 results_d.dat</tt></li>
 
<li><tt>dat_to_dat.exe -r3 results_d.dat</tt></li>
 
Creates a new output file which does not include the output at 3.
 
Creates a new output file which does not include the output at 3.
Line 71: Line 70:
 
==Trim Values==
 
==Trim Values==
 
'''Input Switch: -trim<value>'''<br>
 
'''Input Switch: -trim<value>'''<br>
===Description===
+
<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).
+
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>
===Examples===
+
<u>Examples</u><br>
 
<li><tt>dat_to_dat.exe -trim5 -typeV results.xmdf</tt></li>
 
<li><tt>dat_to_dat.exe -trim5 -typeV results.xmdf</tt></li>
 
Creates a new output of velocity with any outputs greater than 5.0 set to 5.0.
 
Creates a new output of velocity with any outputs greater than 5.0 set to 5.0.
Line 79: Line 78:
 
==Times==
 
==Times==
 
'''Input Switch: -times'''<br>
 
'''Input Switch: -times'''<br>
===Description===
+
<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.
+
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>
===Examples===
+
<u>Examples</u><br>
 
<li><tt>dat_to_dat.exe -times results_h.dat</tt></li>
 
<li><tt>dat_to_dat.exe -times results_h.dat</tt></li>
 
Creates an an output file "times.txt" which contains all timesteps that are contained in the results file.
 
Creates an an output file "times.txt" which contains all timesteps that are contained in the results file.
Line 87: Line 86:
 
==XMDF Information==
 
==XMDF Information==
 
'''Input Switch: -xnfo'''<br>
 
'''Input Switch: -xnfo'''<br>
===Description===
+
<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.
+
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>
===Examples===
+
<u>Examples</u><br>
 
<li><tt>dat_to_dat.exe -xnfo -out xmdf_info.txt results.xmdf</tt></li>
 
<li><tt>dat_to_dat.exe -xnfo -out xmdf_info.txt results.xmdf</tt></li>
 
Creates an an output file with the specified filename "xmdf_info.txt", which contains information about the contents of the xmdf file.
 
Creates an an output file with the specified filename "xmdf_info.txt", which contains information about the contents of the xmdf file.
  
 +
==Velocity Angle==
 +
'''Input Switch: -va'''<br>
 +
<u>Description</u><br>
 +
 +
<u>Examples</u><br>
 +
 +
==Concatenate==
 +
'''Input Switch: -con'''<br>
 +
<u>Description</u><br>
 +
 +
<u>Examples</u><br>
 +
 +
==Convert==
 +
'''Input Switch: -conv'''<br>
 +
<u>Description</u><br>
 +
 +
<u>Examples</u><br>
 +
 +
==Ensight (beta)==
 +
'''Input Switch: -ensight'''<br>
 +
<u>Description</u><br>
 +
 +
<u>Examples</u><br>
 
=General Options=
 
=General Options=
 
For examples on the current dat_to_dat utility please see section 11.3 of the 2010 TUFLOW manual.
 
For examples on the current dat_to_dat utility please see section 11.3 of the 2010 TUFLOW manual.

Revision as of 04:46, 28 October 2012



    This pages is being updated to include the latest version of the utility which supports .xmdf format resutls

    =Introduction= We are currently working on an updated version of the dat_to_dat utility which includes support for the XMDF file type. This page will be updated when this is complete.

    Operations

    This section of the con table below contains a list of operation the utility can perform. Additional input options are included in the next section. One of the operations from this section must be included in the input argument.

    Max

    Input Switch: -max
    Description
    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.
    Examples

  1. dat_to_dat.exe -max results_1_h.dat results_2_h.dat results_3_h.dat
  2. Extracts the maximum water level from the three .dat files.
  3. dat_to_dat.exe -max -typeH results_1.xmdf results_2.xmdf results_3.xmdf
  4. As above but for results stored in xmdf file format.

    Difference

    Input Switch: -dif
    Description
    This can be used to compare two datasets. If a third files is specified, the third file is used as the output file. The output filename can also be specified with the -out option. The output is the first results minus the second result file.
    A special wet/dry algorithm is used. If water level results are not specified (_h.dat or -typeH), the algorithm opens these files, as well as opens the .2dm file associated with the results files, and uses the water levels and ZH Zpt values (for 2D cells) and elevations at the WLL triangle corners to determine whether a node (corner of an mesh element) is wet or dry. This allows two special values to be output in the event that a node is dry in one results file and wet in the other or vica versa. A value of 99 is used to indicate that a node is dry in the first results file, but is flooded in the second resuilts file, while +99 indicates that the node was wet in the first results file but is dry in the second results file. Specifying -nowetdry does not carry out a wet/dry check using the water level results.
    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.
    Examples

  5. dat_to_dat.exe -dif results_developed_h.dat results_existing_h.dat
  6. Extracts the difference in water level, the output is results_developed_h - results_existing_h for all timesteps.
  7. dat_to_dat.exe -dif -typeH -nowetdry results_developed.xmdf results_existing.xmdf
  8. Extracts the difference in water level for the maximum water level and suppresses the wet/dry check described above.

    Duration

    Input Switch: -dur<cut of value>
    Description
    Determines the duration in hours that the the results exceed the cut of value.
    Note: A preferable approach is to use the .tcf file command: Time Output Cutoff Depths == <cut of value or values>. With this command specified TUFLOW tracks this on a timestep by timestep basis rather than post processing this at the map output interval.
    Examples

  9. dat_to_dat.exe -dur0.1 -typeD results.xmdf
  10. Extracts the duration in flooding above 0.1m deep.

    Keep

    Input Switch: -k<output time>
    Description
    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.
    Examples

  11. dat_to_dat.exe -k99999 results_h.dat
  12. Creates a new results file containing just the maximum from the water level results.
  13. dat_to_dat.exe -k2.5 -typeV results.xmdf
  14. Creates a new results file containing just velocity results for the 2.5 hour output.

    Range

    Input Switch: -rangeA<start time> -rangeB<end time>
    Description
    Extracts all timestep between start time and end time (inclusive) into a separate results file.
    Examples

  15. dat_to_dat.exe -rangeA1 -rangeB2.5 results_q.dat
  16. Creates a new results file containing the outputs between 1.0 and 2.5 hours. Both 1 and 2.5 hour outputs are included.
  17. dat_to_dat.exe -rangeA1 -rangeB2.5 results.xmdf
  18. As above but for xmdf input files.

    Remove

    Input Switch: -r<output time>
    Description
    Creates a new output file and removes the output time from this.
    Examples

  19. dat_to_dat.exe -r3 results_d.dat
  20. Creates a new output file which does not include the output at 3.

    Trim Values

    Input Switch: -trim<value>
    Description
    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).
    Examples

  21. dat_to_dat.exe -trim5 -typeV results.xmdf
  22. Creates a new output of velocity with any outputs greater than 5.0 set to 5.0.

    Times

    Input Switch: -times
    Description
    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.
    Examples

  23. dat_to_dat.exe -times results_h.dat
  24. Creates an an output file "times.txt" which contains all timesteps that are contained in the results file.

    XMDF Information

    Input Switch: -xnfo
    Description
    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.
    Examples

  25. dat_to_dat.exe -xnfo -out xmdf_info.txt results.xmdf
  26. Creates an an output file with the specified filename "xmdf_info.txt", which contains information about the contents of the xmdf file.

    Velocity Angle

    Input Switch: -va
    Description

    Examples

    Concatenate

    Input Switch: -con
    Description

    Examples

    Convert

    Input Switch: -conv
    Description

    Examples

    Ensight (beta)

    Input Switch: -ensight
    Description

    Examples

    General Options

    For examples on the current dat_to_dat utility please see section 11.3 of the 2010 TUFLOW manual.

    Up
    Go-up.png Back to TUFLOW Utilities