Page 1 of 1

Malformed Header Error

Posted: August 18th, 2015, 2:16 pm
by thomasb
I am writing a python program that executes Hysplit and when it begins hycs_std I receive this error:

"malformed header from script. Bad Header= HYSPLIT4 - Initialization 201: hysupdate.py"

Have any of you encountered this error before? What exactly does it mean?

Re: Malformed Header Error

Posted: August 18th, 2015, 2:35 pm
by glenn.rolph
This message is written to standard output when HYSPLIT is started giving the version number of HYSPLIT, so your program needs to account for messages coming out of standard out.

Re: Malformed Header Error

Posted: August 18th, 2015, 3:33 pm
by thomasb
In the script I include a process ID number that is associated with the CONTROL file. Isn't that supposed to bypass the interaction?
The line in the script is:

Code: Select all

os.system('usr/local/hysplit/trunk/exec/hycs_std '+pid)
With pid being the process ID. I have a correlating CONTROL.pid in the working directory.

Re: Malformed Header Error

Posted: August 19th, 2015, 6:45 am
by glenn.rolph
Unfortunately some comments are not written to the MESSAGE file that has the extension. It is best to pipe the output that is not written to the MESSAGE file similar to (in perl)

exec "$CGI/disp4.scr $proc 1>>$proc_progress.txt 2>>$proc_progress.txt"

where disp4.scr contains the call to hycs_std