Description
A strict prerequisite for converting a text file to a dfs0 file is the input file needs to have the appropriate format. An example demo setup (AsciiCsv2Dfs0.zip including a .csv and a .mzt file) is attached for your reference. This example file does not imply it follows the only format accepted by the conversion tools described here. There may be many different combinations and you are of course welcome to experiment importing files with any different format based on your preferences.
The workflow includes the following steps/process:
#01 - Creating a new dfs0 file from an existing text (Ascii) file - see Fig. 1, 2, 3
You need to import the text (.csv) file by creating a new time series (.dfs0) file.
Fig. 1 - Creating a New Time Series (.dfs0) file
#02 - Configuring the ‘Time Description’ tab at the ‘File Import’ dialog - see Fig. 4.
Set up a ‘File path’ for saving a template file (to reuse for another import process) and define the Date and time values at the ‘Time Description’ tab as shown below.
Fig. 4 - ‘Time Description’ tab
#03 - Configuring the ‘Data Description’ tab at the ‘File Import’ dialog - see Fig. 5.
Set up the Item type, Unit, Value type and Data description parameters at the ‘Data Description’ tab as shown below.
Fig. 5 - ‘Data Description’ tab
#04 - Check the Import result - see Fig. 6.
Click on the ‘Preview’ tab to check that the input file will be imported as expected and then click ‘OK’ to complete the import process.
Fig. 6 - ‘Preview’ tab
Lastly, open the output time series .dfs0 file to double check it is created as expected - see Fig. 7.
Fig. 7 - The converted time series .dfs0 file
An alternative for the conversion process would be to apply the “Time Series Batch Conversion” tool located at the ‘Time Series’ group of tools within the MIKE Zero Toolbox (accessed from both the MIKE Zero or MIKE+ ('Tools' menu) platforms) - see Fig. 8.
Fig. 8 - The “Time Series Batch Conversion” tool in the MIKE Zero Toolbox
The import process would then follow similar steps as above:
(A) - Selecting the Input format and Type of batch conversion - see Fig. 9
Select the input file format (and the input file itself) and whether you are applying the conversion process to a single file or multiple files (of the same format) located within the same Folder.
Fig. 9 - Input data format and conversion type selection dialog
(B) - Template selection - see Fig. 10
Select the third option to define an existing template or create a new one “I do not have a template and would like to specify the format manually”.
Conclusion
Converting a text file into a timeseries file (and vice versa) is a process that can be initiated by either creating a new Time Series (.dfs0) file or running the “Time Series Batch Conversion” tool in the MIKE Zero Toolbox.
The advantages of using the “Time Series Batch Conversion” tool allow you ton:
convert multiple files at once without having to repeat the process for each file separately
execute the tool from command line (or by running a batch .bat file from Windows)
reverse the conversion process by converting time series (.dfs0) files to text files
FURTHER INFORMATION AND USEFUL LINKS
Manuals and User Guides
MIKE Zero General Documentation Index
MIKE+ Model Manager User Guide


