Problem on creating a script

Post any questions or comments regarding the LINUX version of HYSPLIT. This includes the model execution, GUIs, results, or graphics. Be sure to mention the version of LINUX you are using.
Post Reply
tschonholz
Posts: 29
Joined: May 8th, 2013, 11:42 am
Registered HYSPLIT User: Yes
Location: Argentina
Contact:

Problem on creating a script

Post by tschonholz » April 11th, 2016, 1:05 pm

Hi all, I´ve been working a lot on windows but now I´m working on Linux and is quite different from windows.

I´m running a basic concentration run and when I use it manually it runs (create control and run),but when I do it by script it fails even to find the met file.

This is my script:
#!/bin/sh

echo off
echo 16 04 05 00 >CONTROL
echo 2 >>CONTROL
echo -41.32 -72.62 2003 >>CONTROL
echo -41.32 -72.62 9150 >>CONTROL
echo 24 >>CONTROL
echo 0 >>CONTROL
echo 15000.0 >>CONTROL
echo 1 >>CONTROL
echo var/tamara/HYSPLIT/trunk/exec/ >>CONTROL
echo hysplit.t00z.gfsf >>CONTROL
echo 4 >>CONTROL
echo p006 >>CONTROL
echo 0.008E+10 >>CONTROL
echo 06.0 >>CONTROL
echo 16 04 05 00 >>CONTROL
echo p020 >>CONTROL
echo 0.068E+10 >>CONTROL
echo 06.0 >>CONTROL
echo 16 04 05 00 >>CONTROL
echo p060 >>CONTROL
echo 0.250E+10 >>CONTROL
echo 06.0 >>CONTROL
echo 16 04 05 00 >>CONTROL
echo p200 >>CONTROL
echo 0.670E+10 >>CONTROL
echo 06.0 >>CONTROL
echo 16 04 05 00>>CONTROL
echo 1 >>CONTROL
echo -41.32 -72.62>>CONTROL
echo 0.25 0.25 >>CONTROL
echo 90.0 180.0 >>CONTROL
echo ./ >>CONTROL
echo cdump >>CONTROL
echo 3 >>CONTROL
echo 6096 10668 16764 >>CONTROL
echo 16 04 05 12 >>CONTROL
echo 16 04 05 00 >>CONTROL
echo -1 03 00 >>CONTROL
echo 4 >>CONTROL
echo 0.6 2.5 1.0 >>CONTROL
echo 0 0.0 0.0 0.0 0.0 >>CONTROL
echo 0.0 0.0 0.0 >>CONTROL
echo 0 >>CONTROL
echo 0.0 >>CONTROL
echo 2.0 2.5 1.0 >>CONTROL
echo 0 0.0 0.0 0.0 0.0 >>CONTROL
echo 0.0 0.0 0.0 >>CONTROL
echo 0 >>CONTROL
echo 0.0 >>CONTROL
echo 6.0 2.5 1.0 >>CONTROL
echo 0 0.0 0.0 0.0 0.0 >>CONTROL
echo 0.0 0.0 0.0 >>CONTROL
echo 0 >>CONTROL
echo 0.0 >>CONTROL
echo 20.0 2.5 1.0 >>CONTROL
echo 0 0.0 0.0 0.0 0.0 >>CONTROL
echo 0.0 0.0 0.0 >>CONTROL
echo 0 >>CONTROL
echo 0.0 >>CONTROL


/var/tamara/HYSPLIT/trunk/exec/hycs_std


If I create the control file manually with the exact lines I´m trying here it works.
Can anyone help me please? I´m not good at programming
Thanks!!!
Tamara Schonholz

barbara.stunder
Posts: 366
Joined: November 9th, 2012, 4:23 pm
Registered HYSPLIT User: Yes

Re: Problem on creating a script

Post by barbara.stunder » April 18th, 2016, 2:55 pm

The met directory name in the script needs a "/" before the "var", then it should find the file.

We keep only the executables in the exec directory, do the runs from 'working' and have the met files usually also in 'working', or at least not in exec.

Post Reply