Hi all,
we have a number of NCL applications that require passing of parameters 
to NCL. As this must be done using NCL syntax, quite some quoting of 
double-quotes and parens is needed to get things running.
To ease the pain, I've written a wrapper script for the ncl command, 
called nclsh. This takes command line options in a Unix-like manner, 
converts them to NCL syntax and passes them as variables assignments to 
your system-provided ncl. Using this, you may eg write
     nclsh plot.ncl -verbose -format=pdf -vars=slp,sst
which would then internally get translated to something like
     ncl plot.ncl verbose=True format='"pdf"' vars='(/"slp","sst"/)'
More details are explained in the 'nclsh.pdf' attached to this email.
I got some positive feedback from our lot, so I thought that maybe you 
folks would like this, too.
All you should need is attached. Just put the 'nclsh' where the shell 
can find it, and make sure it is executable. perl and ncl are assumed to 
be somewhere in the shell's search path (but they usually are). If you 
are really conscientious, there's also that 'nclsh.man' man page to be 
put where 'man' can find it.
As for the technicalities, the script is written using Perl (no 
apologies there), and is Unix only (though Cygwin or MinGW/MSYS may help)
Have a try and, of course, your feedback is most welcome!
Cheers,
Karl
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
This archive was generated by hypermail 2.1.8 : Thu May 03 2012 - 09:27:53 MDT