Difference between revisions of "TS1 File Format"

From Tuflow
Jump to navigation Jump to search
(Created page with "=Introduction= This page contains information about the .ts1 file format used by TUFLOW for inputting boundary data. The Convert_to_st1 can be used to co...")
 
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
=Introduction=
 
=Introduction=
This page contains information about the .ts1 file format used by TUFLOW for inputting boundary data.  The [[Convert_to_TS1 | Convert_to_st1]] can be used to convert a number of hydrologic model outputs to the .ts1 format.  However, the format is relatively simple variant of a .csv file.  It contains more information on the size and number of time-series and this makes it much faster to read into a TUFLOW model, particularly if there are a large number of input time-series.  It could be readily scripted using a variety of tools such as Excel, Python or Matlab.
+
This page contains information about the .ts1 file format used by TUFLOW for inputting boundary data.  The <u>[[Convert_to_TS1 | Convert to TS1 Utility]]</u> can be used to convert a number of hydrologic model outputs to the .ts1 format.  However, the format is relatively simple variant of a .csv file.  It contains more information on the size and number of time-series and this makes it much faster to read into a TUFLOW model, particularly if there are a large number of input time-series.  It could be readily scripted using a variety of tools such as Excel, Python or Matlab.
 +
 
 
=File Format=
 
=File Format=
 
Line 1 !comment line<br>
 
Line 1 !comment line<br>
Line 10: Line 11:
 
Each data line is of the following format:<br>
 
Each data line is of the following format:<br>
 
Time (in minutes). n time-series x data
 
Time (in minutes). n time-series x data
An example is below, it contains three time-series, with a maximum of 10 output times.  The last time-seriesonly contains five data points, all start at the first timestep, although this is not necessary.<br>
+
An example is below, it contains three time-series, with a maximum of 10 output times.  The last time-series only contains five data points, all start at the first timestep, although this is not necessary.<br>
 
'''Note: The time in the 1st column should be in minutes'''.  Please check the _bc_tables_check.csv files to ensure that the file has been read in correctly.<br>
 
'''Note: The time in the 1st column should be in minutes'''.  Please check the _bc_tables_check.csv files to ensure that the file has been read in correctly.<br>
 
In the example above the data has been written with a fixed column width for readability, however, this is not necessary in the .ts1 file.<br>
 
In the example above the data has been written with a fixed column width for readability, however, this is not necessary in the .ts1 file.<br>

Latest revision as of 10:55, 29 May 2022

Introduction

This page contains information about the .ts1 file format used by TUFLOW for inputting boundary data. The Convert to TS1 Utility can be used to convert a number of hydrologic model outputs to the .ts1 format. However, the format is relatively simple variant of a .csv file. It contains more information on the size and number of time-series and this makes it much faster to read into a TUFLOW model, particularly if there are a large number of input time-series. It could be readily scripted using a variety of tools such as Excel, Python or Matlab.

File Format

Line 1 !comment line
Line 2 <n time series>, <maximum number of output times>
Line 3 Start_Index , n time-series containing the start index of each output location (these are typically 1)
Line 4 End_Index , n time-series containing the end index of each output location (some time-seriesmay finish earlier and not contain the maximum number of output times)
Line 5 Time (min), n time-series x output label
Line 6 to end, data
Each data line is of the following format:
Time (in minutes). n time-series x data An example is below, it contains three time-series, with a maximum of 10 output times. The last time-series only contains five data points, all start at the first timestep, although this is not necessary.
Note: The time in the 1st column should be in minutes. Please check the _bc_tables_check.csv files to ensure that the file has been read in correctly.
In the example above the data has been written with a fixed column width for readability, however, this is not necessary in the .ts1 file.

Example Data

! Dummy example ts1
3, 10
Start_Index ,           1,           1,           1
End_Index   ,          10,          10,           5
Time (min)  ,       SA_05,       SA_04,       SA_11
        0.00,       0.000,       0.000,       0.000
        5.00,       0.100,       1.000,       1.100
       10.00,       0.200,       1.500,       2.200
       15.00,       0.500,       2.000,       0.800
       20.00,       0.800,       3.000,       0.000
       25.00,       1.000,       4.000,            
       30.00,       0.500,       2.000,            
       35.00,       0.400,       1.000,            
       40.00,       0.300,       0.500,            
       45.00,       0.000,       0.000,