[ncl-install] ncl_convert2nc reports 'Badly placed ()'s'

Comiskey, Glenn g.comiskey at geos.com
Thu Jun 23 04:54:11 MDT 2011


Thanks for the feedback, Dave & Mary.
 
My Cygwin/X setup reports "/bin/csh -> tcsh" which is what is used by
ncl_convert2nc, i.e. #! /bin/csh -f
Similarly: /usr/bin/csh -> tcsh
 
Having added -v -x to the hash-bang command in ncl_convert2nc it
reports:
echo "Processing file: $ifiles_r[$n]..." if ( $?vars ) then
Badly placed ()'s
 
A grep of ncl_convert2nc and subsequent testing reveals this to be line
1573 of the script.
 
Get the same result if call using "csh $NCARG_ROOT/bin/ncl_convert2nc
<data file>" or set current shell to csh (default is bash).
 
Haven't solved the problem, but currently nolonger have a need to
convert files so will forgo any further investigation.

________________________________

From: Mary Haley [mailto:haley at ucar.edu] 
Sent: 23 June 2011 06:22
To: Comiskey, Glenn
Cc: ncl-install
Subject: Re: [ncl-install] ncl_convert2nc reports 'Badly placed ()'s'


Hi Glenn, 

Dave's right about this likely being a missing csh issue.
Please see these cygwin notes about csh:
http://www.ncl.ucar.edu/Download/cygwin.shtml#SetUpCShell

If you have "tcsh", then you may be able to create a soft-link as
described in the above URL.
--Mary

On Jun 22, 2011, at 12:29 PM, David Brown wrote:


	Hi Glenn,
	
	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?
	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.:
	bash $NCARG_ROOT/bin/ncl_convert2nc <some data file>
	I get an error that seems related to what you are seeing:
	ncl_convert2nc: line 63: onintr: command not found
	ncl_convert2nc: line 75: syntax error near unexpected token `('
	ncl_convert2nc: line 75: `set idirs = ()'
	If I instead run it using csh:
	csh  $NCARG_ROOT/bin/ncl_convert2nc <some data file>
	I get no error. Maybe that will shed some light on your problem.
	 -dave
	
	

	On Jun 22, 2011, at 9:33 AM, Comiskey, Glenn wrote:


		Hi,
		 
		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)
(http://www.ncl.ucar.edu/Download/cygwin.shtml), but when running
ncl_convert2nc it reports 'Badly placed ()'s':
		 
		$ ncl -V
		6.0.0
		$ ncl xy04n.ncl
		 Copyright (C) 1995-2011 - All Rights Reserved
		 University Corporation for Atmospheric Research
		 NCAR Command Language Version 6.0.0
		 The use of this software is governed by a License
Agreement.
		 See http://www.ncl.ucar.edu/ <http://www.ncl.ucar.edu/>
for more details.
		$ ncl_convert2nc nmww3.t00z.grb    #Note: This is a GRIB
v2 file.
		Badly placed ()'s.
		$ ncl_convert2nc CentralAtlantic.wind.grib   #Note: This
is a GRIB v1 file.
		Badly placed ()'s.
		$ ncl_convert2nc akw.t12z.grib.grib2    #Note: This is a
GRIB v2 file.
		Badly placed ()'s. 
		 
		
		Haven't been able to find anything in mail archives or
on the Internet to explain what the fault is.
		 
		
		Kind regards,
		 
		Glenn Comiskey
		Data System Administrator
		 
		Fugro Global Environment & Ocean Sciences
		Fugro House, Hithercroft Road
		Wallingford, Oxfordshire OX10 9RB, UK
		Registration No: 2985431 / VAT No: GB 655475606
		 
		Tel: +44 (0) 1491 820500 (Switchboard) / Tel: +44 (0)
1491 820559 (Direct) / Fax: +44 (0) 1491 820599
		E-mail: g.comiskey at geos.com
<mailto:g.comiskey at g.comiskey@geos.com>  / Website: www.geos.com
<http://www.geos.com/> 
		 
		Please note:

		*	
			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;
		*	
			Fugro Global Environment & Ocean Sciences
accepts no responsibility for loss or damage of any kind arising from
the use of this message;
		*	
			If you have received this message in error,
please note the sender immediately and delete the message.
			

		

		 
		_______________________________________________
		ncl-install mailing list
		List instructions, subscriber options, unsubscribe:
		http://mailman.ucar.edu/mailman/listinfo/ncl-install
		


	_______________________________________________
	ncl-install mailing list
	List instructions, subscriber options, unsubscribe:
	http://mailman.ucar.edu/mailman/listinfo/ncl-install
	


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-install/attachments/20110623/88123ab0/attachment.html 


More information about the ncl-install mailing list