<div dir="ltr"><div class="gmail_default" style="font-size:small">Geeta,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I think your original email got cut from this thread, so I&#39;m going based on another email from you that I had archived.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">If you are talking about the situation where you were trying to open a file using &quot;$NCARG_ROOT&quot; as part of the path to the file, then this is where your problem is.  $NCARG_ROOT is just a substitution for a directory path, which is the directory path where NCL is installed on your system.  The &quot;<a href="http://uv300.nc" target="_blank">uv300.nc</a>&quot; file is included with the NCL installation and is found in the directory $NCARG_ROOT/lib/ncarg/data/cdf&quot;, so that&#39;s why the $NCARG_ROOT is showing up in your little test code.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I believe Kyle also responded to you and explained what $NCARG_ROOT was. </div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">The NetCDF file that I think you want to open is *not* under the $NCARG_ROOT path, but rather under a directory called &quot;<span style="font-size:12.8000001907349px">~/geeta/ncl/</span><span style="font-size:12.8000001907349px">myscripts_ncl&quot;.  This is the directory you want to use when you call addfile:</span></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><span style="font-size:12.8000001907349px"><font face="monospace, monospace">a = addfile(&quot;</font></span><span style="font-family:monospace,monospace;font-size:12.8000001907349px">~/geeta/ncl/</span><span style="font-family:monospace,monospace;font-size:12.8000001907349px">myscripts_ncl/</span><span style="font-family:monospace,monospace;font-size:12.8000001907349px"><a href="http://fnl_20150423_12_00.nc" target="_blank">fnl_20150423_12_00.nc</a>&quot;</span><span style="font-family:monospace,monospace;font-size:12.8000001907349px">,&quot;r&quot;)</span></div><div class="gmail_default" style="font-size:small"><span style="font-size:12.8000001907349px"><br></span></div><div class="gmail_default" style="font-size:small"><span style="font-size:12.8000001907349px">This will also work:</span></div><div class="gmail_default" style="font-size:small"><span style="font-size:12.8000001907349px"><br></span></div><div class="gmail_default" style="font-size:small"><div class="gmail_default"><font face="monospace, monospace"><span style="font-size:12.8000001907349px">dir   = &quot;</span><span style="font-size:12.8000001907349px">~/geeta/ncl/</span><span style="font-size:12.8000001907349px">myscripts_ncl/&quot;</span></font></div><div class="gmail_default"><span style="font-size:12.8000001907349px"><font face="monospace, monospace">fname = &quot;<a href="http://fnl_20150423_12_00.nc" target="_blank">fnl_20150423_12_00.nc</a>&quot;</font></span></div><div class="gmail_default"><span style="font-size:12.8000001907349px"><font face="monospace, monospace">a     = addfile(dir + fname,&quot;r&quot;)</font></span></div></div><div class="gmail_default" style="font-size:small"><span style="font-size:12.8000001907349px"><br></span></div><div class="gmail_default" style="font-size:small"><span style="font-size:12.8000001907349px">If the NCL script is in the same directory as the &quot;<a href="http://fnl_20150423_12_00.nc" target="_blank">fnl_20150423_12_00.nc</a>&quot; file, then you don&#39;t need a directory path at all:</span></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style><div class="gmail_default" style><div class="gmail_default" style="font-size:small"><span style="font-size:12.8000001907349px"><font face="monospace, monospace">a  = addfile(</font></span><span style="font-family:monospace,monospace;font-size:12.8000001907349px">&quot;<a href="http://fnl_20150423_12_00.nc" target="_blank">fnl_20150423_12_00.nc</a>&quot;</span><span style="font-family:monospace,monospace;font-size:12.8000001907349px">,&quot;r&quot;)</span><br></div><div style="font-size:small"><span style="font-size:12.8000001907349px"><font face="arial, helvetica, sans-serif"><br></font></span></div><div style="font-size:small"><span style="font-size:12.8000001907349px"><font face="arial, helvetica, sans-serif">As you can see, there are many ways to do this. As Kyle suggested, you need to be trying to figure some of these issues out on your own.  Please read the NCL documentation that he pointed you to. In particular, you can see some printed manuals here:</font></span></div><div style="font-size:small"><span style="font-size:12.8000001907349px"><font face="arial, helvetica, sans-serif"><br></font></span></div><div style><font face="arial, helvetica, sans-serif" style><a href="http://www.ncl.ucar.edu/Document/Manuals/">http://www.ncl.ucar.edu/Document/Manuals/</a><br></font></div><div style><font face="arial, helvetica, sans-serif" style><br></font></div><div style><font face="arial, helvetica, sans-serif" style>Good luck,</font></div><div style><font face="arial, helvetica, sans-serif" style><br></font></div><div style="font-size:small"><span style="font-size:12.8000001907349px"><font face="arial, helvetica, sans-serif">--Mary</font></span></div><div style="font-size:small"><span style="font-size:12.8000001907349px"><font face="monospace, monospace"><br></font></span></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 27, 2015 at 12:54 PM, Geeta Geeta <span dir="ltr">&lt;<a href="mailto:geetag54@yahoo.com" target="_blank">geetag54@yahoo.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><div style="color:#000;background-color:#fff;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,Sans-Serif;font-size:16px"><div><span>Thanks Mary for ur help. <br></span></div><div><span>But pls tell me why the data in my directory is NOT being read. </span></div><span class="HOEnZb"><font color="#888888"><div> </div><div><div>Geeta. </div></div></font></span><div><div class="h5">  <br><div><br><br></div><div style="display:block"> <div style="font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,Sans-Serif;font-size:16px"> <div style="font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,Sans-Serif;font-size:16px"> <div dir="ltr"> <font face="Arial" size="2"> On Thursday, 28 May 2015 12:21 AM, Mary Haley &lt;<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>&gt; wrote:<br> </font> </div>  <br><br> <div><div><div><div dir="ltr"><div style="font-size:small">That&#39;s correct, you do *not* want the &quot;end&quot; statement if you don&#39;t have a &quot;begin&quot; statement, or you will get an error.  Perhaps what you mean to use was &quot;quit&quot;.</div><div style="font-size:small"><br clear="none"></div><div style="font-size:small">The &quot;begin&quot; and &quot;end&quot; statements are optional for the main NCL code, but not optional when you are defining procedures and functions.</div><div style="font-size:small"><br clear="none"></div><div style="font-size:small"><br clear="none"></div><div style="font-size:small">--Mary</div><div style="font-size:small"><br clear="none"></div></div><div><br clear="none"><div>On Wed, May 27, 2015 at 12:27 PM, Alessandra Giannini <span dir="ltr">&lt;<a rel="nofollow" shape="rect" href="mailto:alesall@iri.columbia.edu" target="_blank">alesall@iri.columbia.edu</a>&gt;</span> wrote:<br clear="none"><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br clear="none">
Hi,<br clear="none">
<br clear="none">
I am not sure you need the<br clear="none">
<br clear="none">
end<br clear="none">
<br clear="none">
line when you copy and paste, and execute line by line, but if so, how come you have no<br clear="none">
<br clear="none">
begin<br clear="none">
<br clear="none">
?<br clear="none">
<br clear="none">
<br clear="none">
<br clear="none">
On May 27, 2015, at 2:23 PM, Geeta Geeta &lt;<a rel="nofollow" shape="rect" href="mailto:geetag54@yahoo.com" target="_blank">geetag54@yahoo.com</a>&gt; wrote:<br clear="none">
<br clear="none">
&gt; This is continuation of my mails.<br clear="none">
&gt; The script given on the NCL site runs perfectly on my system.  the ps file is created well.<br clear="none">
&gt;<br clear="none">
&gt; aditya@agniilap:~/geeta/ncl/myscripts_ncl$ echo $NCARG_ROOT<br clear="none">
&gt; /home/aditya/geeta/ncl<br clear="none">
&gt; aditya@agniilap:~/geeta/ncl/myscripts_ncl$ ncl<br clear="none">
&gt;  Copyright (C) 1995-2014 - All Rights Reserved<br clear="none">
&gt;  University Corporation for Atmospheric Research<br clear="none">
&gt;  NCAR Command Language Version 6.2.1<br clear="none">
&gt;  The use of this software is governed by a License Agreement.<br clear="none">
&gt;  See <a rel="nofollow" shape="rect" href="http://www.ncl.ucar.edu/" target="_blank">http://www.ncl.ucar.edu/</a> for more details.<br clear="none">
&gt; ncl 0&gt; a = addfile(&quot;$NCARG_ROOT/lib/ncarg/data/cdf/<a rel="nofollow" shape="rect" href="http://uv300.nc/" target="_blank">uv300.nc</a>&quot;,&quot;r&quot;)<br clear="none">
&gt; ncl 1&gt; u = a-&gt;U(1,:,:)<br clear="none">
&gt; ncl 2&gt; wks = gsn_open_wks(&quot;ps&quot;,&quot;ce&quot;)<br clear="none">
&gt; ncl 3&gt; plot = gsn_csm_contour_map_ce(wks,u,False)<br clear="none">
&gt; ncl 4&gt; end<br clear="none">
&gt; fatal:syntax error: line 4 before or near end<br clear="none">
&gt; end<br clear="none">
&gt; --^<br clear="none">
&gt;<br clear="none">
&gt; fatal:error in statement<br clear="none">
&gt; ncl 5&gt; quit<br clear="none">
&gt; aditya@agniilap:~/geeta/ncl/myscripts_ncl$ ls -lrt<br clear="none">
&gt; total 182900<br clear="none">
&gt; -rw-rw-r-- 1 aditya aditya 18838952 May 27 22:27 fnl_20150423_12_00.grib2<br clear="none">
&gt; -rw-rw-r-- 1 aditya aditya 83991480 May 27 22:29 <a rel="nofollow" shape="rect" href="http://fnl_20150423_12_00.nc/" target="_blank">fnl_20150423_12_00.nc</a><br clear="none">
&gt; -rw-rw-r-- 1 aditya aditya 83991480 May 27 22:34 <a rel="nofollow" shape="rect" href="http://test.nc/" target="_blank">test.nc</a><br clear="none">
&gt; -rw-rw-r-- 1 aditya aditya      542 May 27 23:41 test.ncl<br clear="none">
&gt; -rw-rw-r-- 1 aditya aditya   451983 May 27 23:50 <a rel="nofollow" shape="rect" href="http://ce.ps/" target="_blank">ce.ps</a><br clear="none">
&gt; aditya@agniilap:~/geeta/ncl/myscripts_ncl$<br clear="none">
&gt;<br clear="none">
&gt; pls suggest<br clear="none">
&gt; Geeta.<br clear="none">
&gt; _______________________________________________<br clear="none">
&gt; ncl-talk mailing list<br clear="none">
&gt; List instructions, subscriber options, unsubscribe:<br clear="none">
&gt; <a rel="nofollow" shape="rect" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><div><br clear="none">
<br clear="none">
<br clear="none">
<br clear="none">
_______________________________________________<br clear="none">
ncl-talk mailing list<br clear="none">
List instructions, subscriber options, unsubscribe:<br clear="none">
<a rel="nofollow" shape="rect" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br clear="none">
</div></blockquote></div><div><br clear="none"></div></div></div></div><br><br></div>  </div> </div>  </div></div></div></div></div></blockquote></div><br></div>