Climate files

26 views
Skip to first unread message

Lefa Morake

unread,
Jun 23, 2025, 4:42:36 PM6/23/25
to QSWAT+
Good day,

I hope that one of you can help me with my issue.
I'm having problems trying to import climate data into my SWAT+ Editor. I have already prepared files for the catchment that I'm working on, but I'm having trouble loading them onto SWAT+ Editor. I would like to believe that the files I've prepared are in the correct format, and I've attached one as an example.

Can someone please assist?

Thank you 
pcp4.cli.txt

Tawan Charoenpittaya

unread,
Jun 24, 2025, 10:15:42 AM6/24/25
to QSWAT+
You’re encountering exactly the same issue I had! Just yesterday I was working on this part of the data. The problem here lies in how the output file you created is formatted. It seems the system can only read line breaks as /n, but if you use the default setting, it becomes /r/n, which the system fails to read correctly. Therefore, when exporting a CSV file, you need to add this line:
lineterminator="\n"
df.to_csv(f, sep=" ", index=False, header=False, float_format="%.3f", lineterminator="\n")

Or, if you're manually creating new lines in the file, make sure to use \n only—otherwise, the import function won’t be able to read the file properly.  

Screenshot 2025-06-24 103740.png
  After checking your file (by opening it in Notepad++ and going to View → Show Symbol → Show End of Line), I found that the issue you mentioned is indeed present. Try adjusting it accordingly.  

ในวันที่ วันอังคารที่ 24 มิถุนายน ค.ศ. 2025 เวลา 4 นาฬิกา 42 นาที 36 วินาที UTC+8 slim3...@gmail.com เขียนว่า:
Reply all
Reply to author
Forward
0 new messages