weather stations problem

113 views
Skip to first unread message

ntorjanis

unread,
Dec 8, 2023, 10:56:50 AM12/8/23
to SWAT+ Editor
Hi, i import the two WGEN csv files containing the 3 stations i use and the monthly values of those stations. I have the observed precipitation files of the stations which are in .txt form so i check that i have the observed data. When i go to the Weather Stations tab in order to import the precipitation files i have this specific problem. I choose the SWAT2012/Global Data and i leave the rest as they are. then i press START and this error appears

Traceback (most recent call last):
  File "swatplus_api.py", line 102, in <module>
  File "actions\import_weather.py", line 398, in import_data
  File "actions\import_weather.py", line 121, in import_data
  File "actions\import_weather.py", line 253, in add_weather_files
  File "actions\import_weather.py", line 318, in add_weather_files_type
OSError: File C:\Users\doria\Desktop\GIOFIROS\Scenarios\Default\TxtInOut\Profit.Hlis_pcp.pcp not found. Weather data import aborted.
[5192] Failed to execute script 'swatplus_api' due to unhandled exception!


As i can see one of the stations is not found, but it is in my data and cant understand why it is not recognisable. And another quesstion how can i turn the txt precipitation files into pcp files. 

Jaclyn Tech

unread,
Dec 8, 2023, 11:00:23 AM12/8/23
to SWAT+ Editor
Please follow these instructions for formatting your data:

You can also download sample data in this format here: https://swatplus.gitbook.io/docs/user/editor/inputs/sample-data

Just double check yours and make sure it meets the requirements.

Andrew Hillman

unread,
Oct 1, 2024, 7:57:54 PM10/1/24
to SWAT+ Editor
I am having this exact same issue with my data, same errors. What i do not understand is that the OSError lists the file that it is supposed to be writing into the SWAT+ format. Of course it can't find it, it does not exist yet. I have double and triple checked my file formats compared to the instructions, and also compared to sample datasets that do import correctly. Is there some requirements for the names of the stations, or for the ordering of them within pcp.txt? I am really not sure.

Jaclyn B. Tech

unread,
Oct 1, 2024, 8:55:10 PM10/1/24
to Andrew Hillman, SWAT+ Editor
Can you send your files? I can try and debug and see what the issue could be. 

From: 'Andrew Hillman' via SWAT+ Editor <swatplu...@googlegroups.com>
Sent: Monday, September 30, 2024 9:29:33 AM
To: SWAT+ Editor <swatplu...@googlegroups.com>
Subject: [SWAT+ Editor User Group] Re: weather stations problem
 
I am having this exact same issue with my data, same errors. What i do not understand is that the OSError lists the file that it is supposed to be writing into the SWAT+ format. Of course it can't find it, it does not exist yet. I have double
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside your organization.
 
ZjQcmQRYFpfptBannerEnd
--
You received this message because you are subscribed to a topic in the Google Groups "SWAT+ Editor" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/swatplus-editor/dEDyf8CyYrQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to swatplus-edit...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/swatplus-editor/84222bca-4c84-47c9-addf-fbfac95a2579n%40googlegroups.com.

Andrew Hillman

unread,
Oct 3, 2024, 4:43:07 PM10/3/24
to SWAT+ Editor
Hello! Thank you for the response. I finally figured it out, sorry for posting prematurely about it. But I think this may be a common mistake people make, so I will explain what I did wrong here in the hopes that it may be useful to others:

When I created the text files for each station, I named them "tmpStation1", "tmpStation2", "pcpStation1" etc. I thought that in both the pcp and tmp text files, I could just list the stations as "Station1, Station2, etc", thinking that the tmp or pcp prefixes were sufficient. I definitely misinterpreted the format requirements of the sample files.

So, in the pcp and tmp text files, I listed the exact file name of each, and it worked fine. 

Hopefully this was helpful and sorry to have posted before I fully finished troubleshooting.
Reply all
Reply to author
Forward
0 new messages