<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hi,<br>
    <br>
    just to get sure that you have set all NCL environments working for
    your <br>
    bash script and redirect stderr and stdout to the file ncl.log using
    2&gt;&amp;1:<br>
    <br>
    <font color="#3333ff"><tt>#!/bin/bash</tt><tt><br>
      </tt><tt><br>
      </tt><tt>export NCARG_ROOT=/Users/ego/local/ncl-6.3.0_10.9_gcc492</tt><tt><br>
      </tt><tt>export PATH=$NCARG_ROOT/bin:$PATH</tt><tt><br>
      </tt><tt>export NCL=$NCARG_ROOT/bin/ncl</tt><tt><br>
      </tt><tt><br>
      </tt><tt>$NCL ./my_ncl_script.ncl <b>2&gt;&amp;1</b> &gt; ncl.log</tt><tt><br>
      </tt><tt><br>
      </tt><tt>exit</tt><tt><br>
      </tt></font><br>
    Run the script:<br>
    <font color="#3333ff"><tt>  </tt></font><tt><font color="#3333ff">bash
        my_bash_script.sh</font><br>
      <br>
    </tt>or if the shell script has execution permission: <br>
    <font color="#3333ff"><tt>  ./my_bash_script.sh</tt></font><br>
    <br>
    <br>
    Hope this helps,<br>
    Karin<br>
    <br>
    <div class="moz-cite-prefix">Am 21.04.15 um 09:20 schrieb Jatin
      Kala:<br>
    </div>
    <blockquote cite="mid:5535FA42.2010902@gmail.com" type="cite">
      <meta content="text/html; charset=windows-1252"
        http-equiv="Content-Type">
      Hi,<br>
      what error message appears in ncl.log??<br>
      "It does not work" is not really useful to help diagnose the
      problem.<br>
      As per a previous comment by someone else, add the "which ncl"
      command in your bash script. I suspect it will return nothing,
      which would be the problem.<br>
      <br>
      Also, on the command line, what does this return:<br>
      $echo $SHELL<br>
      <br>
      How did you install ncl on your machine, where did you define
      NCARG_ROOT?, in .bashrc or .cshrc or something else?<br>
      <br>
      <br>
      <br>
      <div class="moz-cite-prefix">On 21/04/2015 4:55 pm, Guiting Song
        wrote:<br>
      </div>
      <blockquote
cite="mid:CAJy6Gbnz+hvtCCBGE3JxG98s33OSKzKVkaeS257288ofUMViQQ@mail.gmail.com"
        type="cite">
        <div dir="ltr">
          <div>
            <div>
              <div>
                <div>Hi, <br>
                  <br>
                </div>
                I also tried <br>
                <br>
                #!/bin/bash<br>
                <span class="">ncl</span>
                /home/arnold/ROMS_AGRIF_Vietnam/Roms_tools/Run/FORECAST/roms_5_ratio.<span
                  class="">ncl</span> &gt; <span class="">ncl</span>.log<br>
                <br>
              </div>
              But it does not work, any help will be welcomed.<br>
            </div>
            Thank you,<br>
            <br>
          </div>
          Tony<br>
          <br>
          <br>
        </div>
        <div class="gmail_extra"><br>
          <div class="gmail_quote">On Mon, Apr 20, 2015 at 3:32 PM,
            Jatin Kala <span dir="ltr">&lt;<a moz-do-not-send="true"
                href="mailto:jatin.kala.jk@gmail.com" target="_blank">jatin.kala.jk@gmail.com</a>&gt;</span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div bgcolor="#FFFFFF" text="#000000"> Hi,<br>
                If you've installed ncl correctly, which it seems that
                you have since you ran on the command line, this should
                just work:<br>
                #!/bin/bash<br>
                ncl
                /home/arnold/ROMS_AGRIF_Vietnam/Roms_tools/Run/FORECAST/roms_5_ratio.ncl
                &gt; ncl.log
                <div>
                  <div class="h5"><br>
                    <br>
                    <br>
                    <br>
                    <br>
                    <br>
                    <br>
                    <div>On 20/04/15 12:29 PM, Guiting Song wrote:<br>
                    </div>
                  </div>
                </div>
                <blockquote type="cite">
                  <div>
                    <div class="h5">
                      <div dir="ltr">
                        <div>Hi, All,<br>
                          <br>
                          I can run my ncl script-roms_5_ratio.ncl in
                          linux command line. But can not make it in
                          bash file. My bash file is like below<br>
                          <br>
_______________________________________________________________<br>
                          #!/bin/bash<br>
                          <br>
                          export
                          NCL=/home/arnold/software/ncl_ncarg/bin/ncl<br>
                          $NCL
                          /home/arnold/ROMS_AGRIF_Vietnam/Roms_tools/Run/FORECAST/roms_5_ratio.ncl
                          &gt; ncl.log<br>
                          <br>
_____________________________________________________________<br>
                          <br>
                        </div>
                        <div>however it does not give me the running
                          result, does anybody have experiences about
                          how to run ncl scripts in bash file, please
                          share with me and I will be very appreciated.<br>
                        </div>
                        <div><br>
                          Best regards,<br>
                        </div>
                        <div>Tony<br>
                        </div>
                        <div><br>
                          <br>
                          <br>
                          <br>
                        </div>
                      </div>
                      <br>
                      <fieldset></fieldset>
                      <br>
                    </div>
                  </div>
                  <pre>_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
<a moz-do-not-send="true" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a>
</pre>
                </blockquote>
                <br>
              </div>
              <br>
              _______________________________________________<br>
              ncl-talk mailing list<br>
              List instructions, subscriber options, unsubscribe:<br>
              <a moz-do-not-send="true"
                href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk"
                target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
              <br>
            </blockquote>
          </div>
          <br>
        </div>
      </blockquote>
    </blockquote>
  </body>
</html>