"Invalid file header" error

1,026 views
Skip to first unread message

Aaron Ruesch

unread,
Sep 4, 2015, 2:58:33 PM9/4/15
to SWAT-CUP
Hello all,

Has anyone come across this error before when writing parameter adjustments when running SUFI2_run.bat (see attached for screenshot)? It seems to have popped for no reason on a SUFI2 project that was previously operating perfectly well. I overwrote all the *.hru files in my project, including those in the backup folder, with my originals to test if there was an issue with my configuration text files. I also tried replacing my par_inf.txt file with one that used to work to test if there was an error with my parameterization that I wasn't catching. Neither of these seem to be the issue. I'm stumped.

Thanks,

Aaron


invalid_file_header.PNG

Abbaspour, Karim

unread,
Sep 9, 2015, 8:22:01 AM9/9/15
to swat...@googlegroups.com

What is parameter number 68?

Karim

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

Aaron Ruesch

unread,
Sep 9, 2015, 10:52:16 AM9/9/15
to swat...@googlegroups.com
It was also SURLAG. In this case, I was filtering SURLAG by soil texture--I remember reading somewhere that SWAT-CUP creates a soil type/texture lookup table to be able to accomplish this type of filter. Could this lookup table have been corrupted? I looked for a file that contained this information and I could not find one.

To note, I recreated my SWAT-CUP project with the exact same TxtInOut and it started working again. 

You received this message because you are subscribed to a topic in the Google Groups "SWAT-CUP" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/swat-cup/50e25pJrzZs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to swat-cup+u...@googlegroups.com.

Abbaspour, Karim

unread,
Sep 9, 2015, 11:02:53 AM9/9/15
to swat...@googlegroups.com

SURLAG is in the basin file. There is no soil type distinguished at the basin level. You can see that in the first line of the basin file

So, you cannot do that.

Aaron Ruesch

unread,
Sep 9, 2015, 11:23:44 AM9/9/15
to swat...@googlegroups.com
Sorry, the HRU-level SURLAG is what I was adjusting. I should have specified.

Abbaspour, Karim

unread,
Sep 9, 2015, 11:40:08 AM9/9/15
to swat...@googlegroups.com

What is that? In which file is it?

Aaron Ruesch

unread,
Sep 9, 2015, 11:50:52 AM9/9/15
to swat...@googlegroups.com
Since Rev.627, SURLAG is both/either a basins.bsn and *.hru parameter. If the *.hru SURLAG parameter is <= 0, it defaults to the basins.bsn value. In my case, I am adjusting *.hru SURLAG values.

Abbaspour, Karim

unread,
Sep 9, 2015, 12:38:33 PM9/9/15
to swat...@googlegroups.com

OK, in that case it is not yet in the swatcup.

José Alberto Monteiro

unread,
Sep 10, 2015, 4:36:42 AM9/10/15
to SWAT-CUP
Hi Karim,

It is actually in SWAT-CUP. I used SURLAG.hru to calibrate for the Tocantins basin and am using to calibrate for the Amazon basin. If I am not mistaken you added them when you was in College Station as Srini recommended.

Kind regards,
José

Abbaspour, Karim

unread,
Sep 10, 2015, 5:31:16 AM9/10/15
to swat...@googlegroups.com

OK, thanks Jose. I had forgotten about that. Then I don’t know where Aaron’s error is from.

Karim

 

 

 

 

From: swat...@googlegroups.com [mailto:swat...@googlegroups.com] On Behalf Of José Alberto Monteiro
Sent: Thursday, September 10, 2015 10:37 AM
To: SWAT-CUP
Subject: Re: "Invalid file header" error

 

Hi Karim,

--

Anil Acharya

unread,
Jan 26, 2016, 2:57:08 PM1/26/16
to SWAT-CUP
Hi
Did you ever get this problem solved? What was your option to go with when you got this error? I faced a similar error which never happened when I did the same process a year ago while running the model.

Thanks.

Aaron Ruesch

unread,
Jan 26, 2016, 3:19:59 PM1/26/16
to SWAT-CUP
Hmmm...I must have solved it at some point because I no longer have that issue. My guess is that I reverted to an earlier state of the model though, rather than trying to debug. I'm sorry to say that I don't have a memory or record of what I did.

--
You received this message because you are subscribed to a topic in the Google Groups "SWAT-CUP" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/swat-cup/50e25pJrzZs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to swat-cup+u...@googlegroups.com.

smille

unread,
Oct 25, 2016, 4:22:08 PM10/25/16
to SWAT-CUP
Hi,

I encountered the same problem. You may want to try "restore files from backup". It solved the problem for me.

Thanks,

Sara

Suraj Shah

unread,
Nov 2, 2020, 10:36:31 AM11/2/20
to SWAT-CUP
hi, I faced the same problem, I used files from backup .. and solved the problem..
Reply all
Reply to author
Forward
0 new messages