Re: Pass a string to NCL from within a c-shell variable?

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Mon Oct 11 2010 - 08:34:13 MDT

Hi Muarice

[1] Maybe [untested]

ncl inFile=\"{$outFile}.tmp.nc \" outFile=\"{$outFile}.nc"
./hybrid2Pres.ncl

[2] For sure

%> ncl ./hybrid2Pres.ncl

where within the hybrid2Pres.ncl script you use

    inFile = getenv("outFile") + ".tmp.nc"
    outFile = getenv("outFile") + ".nc"

http://www.ncl.ucar.edu/Document/Functions/Built-in/getenv.shtml

Let me know

On 10/11/10 5:38 AM, Maurice.McHugh@noaa.gov wrote:
> Dear NCL-ers,
>
> I have a c-shell script in which I pass available to a NCL script as command line. NCL doesn’t appear to see the string contained in the variable, and has trouble interpreting the $.
> Alternatives I could use include passing the string as an ENV or by writing the strings to a text file, but neither seem particularly elegant.
>
> Shell code snippet:
> ncl inFile=$outFile.tmp.nc outFile=$outFile.nc ./hybrid2Pres.ncl
> /code
>
> Can anyone suggest how I pass a string to NCL from within a c-shell variable?
>
> Many thanks,
>
> Maurice
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Oct 11 08:34:18 2010

This archive was generated by hypermail 2.1.8 : Tue Oct 12 2010 - 15:27:00 MDT