Re: NCL and standard in

From: Daryl Herzmann <akrherz_at_nyahnyahspammersnyahnyah>
Date: Wed, 23 Jul 2008 08:19:02 -0500 (CDT)

Hi Dave,

My two cents idea would be to run ncl in your bash script like so:

ncl script.ncl infile=\"filespec\" < /dev/null

That should cause ncl to read STDIN from /dev/null instead of what the
shell script is getting, but I am not positive this will work.

daryl

On Wed, 23 Jul 2008, Mary Haley wrote:

> Dave,
>
> What happens if you try:
>
> ncl infile=\"filespec\" script.ncl
>
> I'm hoping that NCL will see that "script.ncl" and decide that
> it is done reading input.
>
> When it's the other way, however, NCL may be thinking that
> *everything* after the "script.ncl" is a command line option,
> and so it reads it all in.
>
> --Mary
>
> On Tue, 22 Jul 2008, Dave Allured wrote:
>
>> Hi. I would like to call an NCL script in batch mode within a loop in a
>> shell script. The shell script is trying to read input from standard in
>> (Unix). However, the first time NCL is called, it seems to grab all of the
>> remaining input from standard in.
>>
>> Is there a reasonable way to get NCL to not grab standard in?
>>
>> NCL version 5.0.1 pre-release on Mac OS 10.5 PPC. I think I have seen this
>> before on earlier versions. My invocation of NCL is fairly normal:
>>
>> ncl script.ncl infile=\"filespec\"
>>
>> Thank you for any advice.
>>
>> Dave Allured
>> CU/CIRES Climate Diagnostics Center (CDC)
>> http://cires.colorado.edu/science/centers/cdc/
>> NOAA/ESRL/PSD, Climate Analysis Branch (CAB)
>> http://www.cdc.noaa.gov/
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk_at_ucar.edu
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>

-- 
/**
  * Daryl Herzmann
  * Assistant Scientist -- Iowa Environmental Mesonet
  * http://mesonet.agron.iastate.edu
  */
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Jul 23 2008 - 07:19:02 MDT

This archive was generated by hypermail 2.2.0 : Fri Aug 01 2008 - 09:46:25 MDT