Difficulty getting through the Weather Data Definition step

1,340 views
Skip to first unread message

ambika

unread,
Nov 18, 2012, 9:12:51 PM11/18/12
to arc...@googlegroups.com
Hi,

I am facing problem getting through the Weather Data Definition. I have the stations and their latitude and longitude, however they fall outside my watershed. The number of reading for rainfall, temperature, temperature, relative humidity, wind speed and radiation are for two years and the total number for each is 731. I have four user defined stations. When I try to define the weather stations with the data I have I keep getting the error "Conversion from type 'DBNull'  to type 'Integer' is not valid. I thought this error might have been due to missing values but there are no missing values and number of reading for all parameter is the same.  Can somebody suggest why I am getting this error and how can I resolve this?

Your help will be very much appreciated!

Best,

--
Ambika Khadka
Master of Environmental Science Candidate 2013
School of Forestry and Environmental Studies
Yale University
ambika...@yale.edu

Jonathan Knox

unread,
Nov 19, 2012, 10:55:53 AM11/19/12
to arc...@googlegroups.com
Hi Ambika,

Which weather def tables are you having a problem with- the weather generator table or the other user stations? Also how are you inputting the tables? Through the .mbd in Access or text file? What you can first try is to run the weather stations using just the weather generator, this isn't ideal but it will help you narrow down the problem.

Regards,
Jonathan
--
Jonathan Knox
GIS and Environmental Modeling Technician,
McGill University Dept. of Biology,
Montreal, QC, Canada
Email: jonath...@mail.mcgill.ca

Woonsup Choi

unread,
Jul 9, 2013, 2:00:58 PM7/9/13
to arc...@googlegroups.com
I had a similar problem, and I think solved the problem, at least for now. What I did was to use the sample txt files (pcpfork.txt, hop0pcp.txt, etc from the SWAT tutorial). I formatted my own weather data in txt, and copied the content into the sample files. When I chose my own txt files, it never worked and the error message popped up.

I tried to match the format as much as I could, such as decimal places.

Kerem Güngör

unread,
Nov 1, 2013, 12:26:05 PM11/1/13
to arc...@googlegroups.com
Hello, 

I ran into the same problem when I was trying to define `raingage` under `Rainfall Data` tab of ArcSwat2012. I was given `Conversion from type `DBNull` to type `Integer` error several times after I loaded the `locations table` in ASCII txt format. 

I figured out that the reason of the error was having more than one blank line in the locations table. If you go to your editor (e.g., Notepad) and delete the extra blank line, the problem will be solved.

Best,

Kerem GUNGOR

Jaison Renkenberger

unread,
Jun 18, 2014, 10:43:13 AM6/18/14
to arc...@googlegroups.com
Kerem,
It would have taken me a thousand years to figure this out. Thank your for your post! That was my problem exactly! 

Respectfully,
Jaison Renkenberger

Prasenjit Bhunia

unread,
Jul 21, 2014, 11:56:55 AM7/21/14
to arc...@googlegroups.com
Hi,
I,m facing problem of loading the weather data through Weather Data Definition. I think I missed the correct input format of input data. Can somebody suggest me some sample of formatting inputs.

Regards,
Prasenjit Bhunia

Iman Fazeli Farsani

unread,
Jul 21, 2014, 2:07:02 PM7/21/14
to Prasenjit Bhunia, arc...@googlegroups.com
Dear Prasenjit Bhunia,

I've attached a sample format of pcp and tmp for ArcSWAT 2012.


I hope you succeed,
Fazeli


--
You received this message because you are subscribed to the Google Groups "ArcSWAT" group.
To unsubscribe from this group and stop receiving emails from it, send an email to arcswat+u...@googlegroups.com.
To post to this group, send email to arc...@googlegroups.com.
Visit this group at http://groups.google.com/group/arcswat.
For more options, visit https://groups.google.com/d/optout.

pcp.rar
tmp.rar

Toby Oker

unread,
Jan 30, 2015, 5:06:28 PM1/30/15
to arc...@googlegroups.com
Yes you are aboslutely right. Removed the extra lines in Notepad++ and it worked. Thanks!

kris

unread,
Nov 29, 2015, 1:17:50 AM11/29/15
to ArcSWAT
Thank you so very much for posting this fix, I have been struggling for quite awhile not able to figure out what was wrong!  Removing the extra line worked perfectly.  K

Diva Bhatt

unread,
May 28, 2018, 3:08:02 AM5/28/18
to ArcSWAT
Thank you very much Kerem...eliminating the blank lines in the text files solved the problem for me too...thank you very much!
Reply all
Reply to author
Forward
0 new messages