<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Glenn,<div><br></div><div>Are you actually able to run csh? What happens if you type "csh" on the UNIX command line?</div><div><br></div><div>Did you make any other changes to ncl_convert2nc to get it to work?</div><div><br></div><div>As a test, go back to the original "ncl_convert2nc" before you made any changes, and execute it with:</div><div><br></div><div><div>ncl_convert2nc $NCARG_ROOT/lib/ncarg/data/grb/ced1.lf00.t00z.eta.grb</div></div><div><br></div><div>Let us know what happens.</div><div><br></div><div>--Mary</div><div><br></div><div><div><div>On Jun 23, 2011, at 4:54 AM, Comiskey, Glenn wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
<div style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space">
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span class="869431110-23062011">Thanks for the feedback, Dave &
Mary.</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span class="869431110-23062011"></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span class="869431110-23062011">My Cygwin/X setup reports "/bin/csh -> tcsh" which
is what is used by ncl_convert2nc, i.e. #! /bin/csh -f</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span class="869431110-23062011">Similarly: /usr/bin/csh -> tcsh</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span class="869431110-23062011"></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span class="869431110-23062011">Having added -v -x to the hash-bang command in
ncl_convert2nc it reports:</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span class="869431110-23062011">echo "Processing file: $ifiles_r[$n]..." if ( $?vars )
then</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span class="869431110-23062011">Badly placed ()'s</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span class="869431110-23062011"></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span class="869431110-23062011">
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span class="869431110-23062011">A grep of ncl_convert2nc and subsequent testing
reveals this to be line 1573 of the
script.</span></font></div></span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span class="869431110-23062011"></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span class="869431110-23062011">Get the same result if call using "csh
$NCARG_ROOT/bin/ncl_convert2nc <data file>" or set current shell to csh
(default is bash).</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span class="869431110-23062011"></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span class="869431110-23062011">Haven't solved the problem, but currently nolonger have
a need to convert files so will forgo any further
investigation.</span></font></div><br>
<div dir="ltr" lang="en-us" class="OutlookMessageHeader" align="left">
<hr tabindex="-1">
<font size="2" face="Tahoma"><b>From:</b> Mary Haley [mailto:haley@ucar.edu]
<br><b>Sent:</b> 23 June 2011 06:22<br><b>To:</b> Comiskey, Glenn<br><b>Cc:</b>
ncl-install<br><b>Subject:</b> Re: [ncl-install] ncl_convert2nc reports 'Badly
placed ()'s'<br></font><br></div>
<div></div>Hi Glenn,
<div><br></div>
<div>Dave's right about this likely being a missing csh issue.</div>
<div>Please see these cygwin notes about csh:</div>
<div><a href="http://www.ncl.ucar.edu/Download/cygwin.shtml#SetUpCShell">http://www.ncl.ucar.edu/Download/cygwin.shtml#SetUpCShell</a><br></div>
<div>If you have "tcsh", then you may be able to create a soft-link as described
in the above URL.</div>
<div>--Mary</div>
<div><br>
<div>
<div>On Jun 22, 2011, at 12:29 PM, David Brown wrote:</div><br class="Apple-interchange-newline">
<blockquote type="cite">
<div style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space">Hi
Glenn,<br>
<div>Just as a bit of background: ncl_convert2nc is a csh (C-shell) script
that creates a temporary NCL script and then executes it with parameters
derived from the command line. I am not sure exactly what is wrong but I
suspect it is something to do the shell. The script is looking for
/bin/csh. If you execute 'which csh', does it find /bin/csh?</div>
<div>If I explicitly use another shell to execute the script (on my mac - I
don't have access to a Cygwin system at the moment), e.g.:</div>
<div>bash $NCARG_ROOT/bin/ncl_convert2nc <some data file></div>
<div>I get an error that seems related to what you are seeing:</div>
<div>
<div>ncl_convert2nc: line 63: onintr: command not found</div>
<div>ncl_convert2nc: line 75: syntax error near unexpected token `('</div>
<div>ncl_convert2nc: line 75: `set idirs = ()'</div></div>
<div>If I instead run it using csh:</div>
<div>csh $NCARG_ROOT/bin/ncl_convert2nc <some data
file></div>
<div>I get no error. Maybe that will shed some light on your problem.</div>
<div> -dave</div>
<div><font color="#0000ff" size="2" face="Arial"></font><br></div>
<div><br>
<div>
<div>On Jun 22, 2011, at 9:33 AM, Comiskey, Glenn wrote:</div><br class="Apple-interchange-newline">
<blockquote type="cite">
<div>
<div dir="ltr" align="left"><span class="580095309-22062011"><font size="2" face="Arial">Hi,</font></span></div>
<div><span class="580095309-22062011"><font size="2" face="Arial"></font></span> </div>
<div><span class="580095309-22062011"><font size="2" face="Arial">Have just
installed Cygwin/X and NCL Version 6.0.0 (CYGWIN), and setup the environment
as per the instructions for installing and running NCL under Cygwin/X
(Windows) (<a href="http://www.ncl.ucar.edu/Download/cygwin.shtml">http://www.ncl.ucar.edu/Download/cygwin.shtml</a>),
but when running ncl_convert2nc it reports 'Badly placed
()'s':</font></span></div>
<div><span class="580095309-22062011"><font size="2" face="Arial"></font></span> </div>
<div><span class="580095309-22062011"><font size="2" face="Arial">$ ncl
-V<br>6.0.0<br></font></span><span class="580095309-22062011"><font size="2" face="Arial">$ ncl xy04n.ncl</font></span></div>
<div><span class="580095309-22062011"><font size="2" face="Arial"> Copyright
(C) 1995-2011 - All Rights Reserved<br> University Corporation for
Atmospheric Research<br> NCAR Command Language Version
6.0.0<br> The use of this software is governed by a License
Agreement.<br> See </font><a href="http://www.ncl.ucar.edu/"><font size="2" face="Arial">http://www.ncl.ucar.edu/</font></a><font size="2" face="Arial"> for more details.<br></font></span><span class="580095309-22062011"><font size="2" face="Arial">$ ncl_convert2nc
nmww3.t00z.grb #Note: This is a GRIB v2 file.<br>Badly
placed ()'s.<br></font></span><span class="580095309-22062011"><font size="2" face="Arial">$ ncl_convert2nc CentralAtlantic.wind.grib #Note:
This is a GRIB v1 file.<br>Badly placed ()'s.<br></font></span><span class="580095309-22062011"><font size="2" face="Arial">$ ncl_convert2nc
akw.t12z.grib.grib2 #Note: This is a GRIB v2
file.<br>Badly placed ()'s.<span class="664473215-22062011"><font color="#0000ff"> </font></span></font></span></div>
<div><span class="580095309-22062011"><font size="2" face="Arial"><font color="#0000ff"></font></font></span> </div><font size="2" face="Arial"></font>
<div><span class="580095309-22062011"><font size="2" face="Arial">Haven't been
able to find anything in mail archives or on <span class="664473215-22062011"><font color="#0000ff">the </font></span>Internet
to explain what the fault is.</font></span></div>
<div><span class="580095309-22062011"><font size="2" face="Arial"></font></span> </div><font size="2" face="Arial"></font>
<div align="left"><span lang="en-gb"><font size="2" face="Arial">Kind
regards,</font></span></div>
<div align="left"><font size="2" face="Arial"><span lang="en-gb"></span></font> </div>
<div align="left"><font size="2" face="Arial"><span lang="en-gb">Glenn
Comiskey</span></font></div>
<div align="left"><font size="2" face="Arial"><span lang="en-gb">Data System
Administrator</span></font></div>
<div align="left"><font color="#808080" size="1" face="Arial"><span lang="en-gb"></span></font> </div>
<div align="left"><font size="2" face="Arial"><span lang="en-gb"><font color="#808080" size="1" face="Arial">Fugro Global Environment & Ocean
Sciences</font></span></font></div>
<div align="left"><font size="2" face="Arial"><span lang="en-gb"><font color="#808080" size="1" face="Arial">Fugro House, Hithercroft Road</font></span></font></div>
<div align="left"><font size="2" face="Arial"><span lang="en-gb"><font color="#808080" size="1" face="Arial">Wallingford, Oxfordshire OX10 9RB, UK<br>Registration No:
2985431 / VAT No: GB 655475606</font></span></font></div>
<div align="left"><font color="#808080" size="1" face="Arial"><span lang="en-gb"></span></font> </div>
<div align="left"><font size="2" face="Arial"><span lang="en-gb"><font color="#808080" size="1" face="Arial">Tel: +44 (0) 1491
820500 (Switchboard) / Tel: +44 (0) 1491 820559 (Direct) /
Fax: +44 (0) 1491 820599<br>E-mail: </font></span><a title="mailto:m.silva@geos.com" href="mailto:g.comiskey@g.comiskey@geos.com"><span lang="en-gb" title="mailto:m.silva@geos.com"><u title="mailto:m.silva@geos.com"><font title="mailto:m.silva@geos.com" color="#0000ff" size="1" face="Arial">g.comiskey@geos.com</font></u></span></a><span lang="en-gb"><font color="#808080" size="1" face="Arial"> / Website: </font></span><a title="http://www.geos.comaddress/" href="http://www.geos.com/"><span lang="en-gb" title="http://www.geos.comaddress/"><u title="http://www.geos.comaddress/"><font title="http://www.geos.comaddress/" color="#0000ff" size="1" face="Arial">www.geos.com</font></u></span></a></font></div>
<div><font size="2" face="Arial"><font color="#808080" size="1"></font></font> </div>
<div><font color="#808080" size="1" face="Arial">Please note:</font></div>
<ul>
<li>
<div align="left"><font color="#808080" size="1" face="Arial">The information
contained in this message is privileged and confidential and intended only
for the use of the addresses. If you are not the intended recipient
you should not read, copy, distribute or otherwise use the
information;</font></div>
</li><li>
<div align="left"><font color="#808080" size="1" face="Arial">Fugro Global
Environment & Ocean Sciences accepts no responsibility for loss or
damage of any kind arising from the use of this message;</font></div>
</li><li>
<div align="left"><font size="2"><font color="#808080" size="1" face="Arial">If you
have received this message in error, please note the sender immediately
and delete the message.</font><span lang="en-gb"></span></font></div><font size="2"></font><font size="2"></font></li></ul><font size="2"><font face="Arial">
<div align="left"><br></div></font></font>
<div> </div></div>_______________________________________________<br>ncl-install
mailing list<br>List instructions, subscriber options, unsubscribe:<br><a href="http://mailman.ucar.edu/mailman/listinfo/ncl-install">http://mailman.ucar.edu/mailman/listinfo/ncl-install</a><br></blockquote></div><br></div></div>_______________________________________________<br>ncl-install
mailing list<br>List instructions, subscriber options, unsubscribe:<br><a href="http://mailman.ucar.edu/mailman/listinfo/ncl-install">http://mailman.ucar.edu/mailman/listinfo/ncl-install</a><br></blockquote></div><br></div></div>
</blockquote></div><br></div></body></html>