Analysis of ArcSWAT Output Export – Why doesn’t SWAT Change Result Format a little bit?

What happened when the “Import Files to Database” button is clicked?

  1. Copy SWATOutput.mdb from C:\swat\ArcSWAT\Databases\SWATOutput.mdb to [ArcSWAT Project]\Scenarios\Default\TablesOut. The previous database will be overwritten.
  2. Copy Schema.ini from C:\swat\ArcSWAT\Databases\Schema.ini to [ArcSWAT Project]\Scenarios\Default\txtinout. This file defines the data columns in text files generated in step 3. More information could be found from MSDN.
  3. Read SWAT output files (output.rch, output.sub, etc.) and generate corresponding text files (outputsub.txt, outputRch.txt, outputSed.txt, outputHru.txt, outputRsv.txt, outputPst.txt) in [ArcSWAT Project]\Scenarios\Default\txtinout. The result files would be read line by line and string parser is used to extract data values for each column, which would be slightly different for different SWAT version.
  4. Copy the data from the generated text files to tables in SWATOutput.mdb though “Select INTO” statement.
  5. Delete all the text files generated in step 3.

Most of the time would be spent at step 3 and step 4, where the data format is converted twice: one from SWAT format to text format and the second from text format to mdb format, where the first conversion would probably cost more.

So, question is why doesn’t SWAT just generate the results in text format required in step 3. Are there any advantage the current result format over text format? What’s no doubt is generating results in text format would greatly save time on this import function.

The result format would also have impact on SWAT_CUP, which would read the specific results from result files after each simulation to calculate the objective functions. From my experience, sometimes the time spent on result reading is even longer than the simulation time!

For SWAT result analysis, I would usually want outputs for a specific element (hru, subbasin or reach, etc.) in a specific time period. It’s a query process and would gain the best performance in a database, e.g. mdb. This may be the thought under the “Import Files to Database” function. It’s also true for SWAT_CUP. So, why not just generate the outputs in a database format directly in SWAT model? Thus, we don’t need to spend extra time to convert the format and it would be a lot easier to do the result analysis, especially for daily outputs.

2 Replies to “Analysis of ArcSWAT Output Export – Why doesn’t SWAT Change Result Format a little bit?”

  1. Dear Zhiqiang Yu, Could you recommend me the best way to calibrate SWAT models, maybe a program or explain the calibration tool from ArcSWAT interface. I have some issues in this step.
    Thanks,
    Regards from Perú.

    1. Hi Carlos,

      About calibration, I don’t think there is a best way there. People use different tools based on their background and preference. There are some tools out there,like swat_cup. Some people also developed some tools.
      For me, I prefer manual calibration, in which you could control the whole process. It may need more hydrologic knowledge, but is worthwhile.

      Thanks for the comments. We could have more talk on this issue. Chat on Google hangout if possible.

      Best
      Zhiqiang

Leave a Reply to zhiqiangyu Cancel reply