Multiple trajectories from batch .CMD command prompt. ERROR

Post any questions or comments regarding the Desktop PC version of HYSPLIT. This includes the model execution, GUIs, results, or graphics. Be sure to include the operating system you are using (Windows XP, Windows Vista, Windows 7, Windows 8, etc.
Post Reply
leonardozm
Posts: 8
Joined: August 5th, 2015, 9:28 am
Registered HYSPLIT User: No

Multiple trajectories from batch .CMD command prompt. ERROR

Post by leonardozm »

Hello there HYSPLIT community,
I am trying to run multiple trajectories with batch scripts. However, I'm not so familiar with windows .CMD batch scripting, so struggling a little bit. I've been trying to use this attached script to call HYSPLIT repeatedly.
traj_altoparana_teste.txt
Change .txt to .bat extension
(1.49 KiB) Downloaded 373 times
I have this attached file in my working directory, which is pointed in default_exec.
SETUP.txt
Change .txt to .CFG extension
(311 Bytes) Downloaded 368 times
I'm getting this error:
forrt1: severe (24): end-of-file during read, unit -5, file Internal List-Directed Read

If I try to run the model using the GUI and retrieving the CONTROL and SETUP.CFG files, it works fine. If I try to run the model through .CMD (windows command prompt) using another script also attached below, it also works.
Traj_run_leo.txt
Change .txt to .bat extension
(442 Bytes) Downloaded 333 times
Maybe you can help me?

Thanks again and kind regards,

P.S.: I can't send .bat and .CFG files here, they get blocked. So, to run traj_altoparana_teste and Traj_run_leo in .CMD (windows command prompt), you'd have to change the .txt extension to .bat . Also, change SETUP extension from .txt to .CFG
ariel.stein
Posts: 660
Joined: November 7th, 2012, 3:14 pm
Registered HYSPLIT User: Yes

Re: Multiple trajectories from batch .CMD command prompt. ER

Post by ariel.stein »

Try using the following bat script:
echo 00 00 00 %1 >CONTROL
echo 1 >>CONTROL
echo 40.0 -90.0 10.0 >>CONTROL
echo 48 >>CONTROL
echo 0 >>CONTROL
echo 10000.0 >>CONTROL
echo 1 >>CONTROL
echo ../metdata/ >>CONTROL
echo oct1618.BIN >>CONTROL
echo ./ >>CONTROL
echo tdump.%1 >>CONTROL

\hysplit4\exec\hyts_std
\hysplit4\exec\trajplot -itdump.%1 -oplot%1


that can be called by the following bat script:
for %%f in (00 01 02 03 04) do call traj_run.bat %%f
leonardozm
Posts: 8
Joined: August 5th, 2015, 9:28 am
Registered HYSPLIT User: No

Re: Multiple trajectories from batch .CMD command prompt. ER

Post by leonardozm »

That script actually worked perfectly fine. I thought the problem was that I had a SETUP.CFG file in my folder, but your example worked with it anyway.

If you can, please look at my annexed files and see where I am doing something wrong.

What I was trying to do was start 10-day backward trajectories from around 2500 points in South America. So I would have a text file with the starting points. I was testing things with a file that had only one starting set of coordinates which is this one:
startpt_teste3.txt
Text file containing the start point coordinates
(25 Bytes) Downloaded 371 times
leonardozm
Posts: 8
Joined: August 5th, 2015, 9:28 am
Registered HYSPLIT User: No

Re: Multiple trajectories from batch .CMD command prompt. ER

Post by leonardozm »

Hello HYSPLIT community,
I was able to find out what was the problem with my .bat files:

They had too many spaces in them.

The CONTROL file looked OK, but after each line's end, there were some spaces. The GUI could retrieve those files just fine, but when I tried to start the program from command prompt, it wouldn't work.

So this one can be marked as solved.
Post Reply

Return to “HYSPLIT for PCs”