[Thread Prev][Thread Next][Index]
Re: [ferret_users] Ferret batch / redirection problem
Hi Bill,
Yes, this is an old problem -- apparently the Linux version of Ferret
chokes when the standard input exceeds 512 characters:
http://ferret.pmel.noaa.gov/Ferret/Mail_Archives/fu_2004/msg00008.html
A simple workaround is to make a tiny wrapper script (containing only "go
script2.jnl"), and pass that wrapper to Ferret. An even simpler
workaround, available since v5.53, is to use the "ferret -script" option
instead of redirecting from the standard input:
http://ferret.pmel.noaa.gov/Ferret/Documentation/Users_Guide/current/Chapter1_Introduction.htm#_VPINDEXENTRY_24
Cheers,
Andrew
On Wed, 17 Aug 2005, Gustafson, William I wrote:
> Hi,
>
> I have been trying to use Ferret in batch mode to download North American
> Reanalysis Data from NCDC through their DODS server. I have run into an
> oddity that is making life difficult. Below are two scripts that I run
> through Ferret with the command "ferret -batch < script_name". The first
> script works. The second does not. The only difference is the addition of
> one extra line in the script. From the error (also below), it looks like a
> line is not being read in properly from the text file and is getting
> truncated or something like that. Has anybody else seen this behavior and
> knows what triggers it? Besides using short scripts, is there a work around?
> The DODS server takes a long time to open the file so issuing a lot of small
> scripts will substantially increase the time needed for my project.
>
> Thanks,
> Bill
>
>
> Script 1 (works)------------------------------------------
> set data
> "http://nomads.ncdc.noaa.gov:9091/dods/NCEP_NARR_DAILY/200407/20040701/narr-
> a_221_20040701_0000_000"
> set region/i=252:420/j=65:135
> list/form=cdf/file="soilw10_40cm_2004_07.nc"/append
> soilw10_40cm[l=1:`soilw10_40cm,return=lend`]
> list/form=cdf/file="soilw40_100cm_2004_07.nc"/append
> soilw40_100cm[l=1:`soilw40_100cm,return=lend`]
> list/form=cdf/file="soilw100_200cm_2004_07.nc"/append
> soilw100_200cm[l=1:`soilw100_200cm,return=lend`]
> cancel data 1
> quit
>
>
> Script 2 (crahses) ------------------------------------------
> set data
> "http://nomads.ncdc.noaa.gov:9091/dods/NCEP_NARR_DAILY/200407/20040701/narr-
> a_221_20040701_0000_000"
> set region/i=252:420/j=65:135
> list/form=cdf/file="soilw0_10cm_2004_07.nc"/append
> soilw0_10cm[l=1:`soilw0_10cm,return=lend`]
> list/form=cdf/file="soilw10_40cm_2004_07.nc"/append
> soilw10_40cm[l=1:`soilw10_40cm,return=lend`]
> list/form=cdf/file="soilw40_100cm_2004_07.nc"/append
> soilw40_100cm[l=1:`soilw40_100cm,return=lend`]
> list/form=cdf/file="soilw100_200cm_2004_07.nc"/append
> soilw100_200cm[l=1:`soilw100_200cm,return=lend`]
> cancel data 1
> quit
>
>
> When the second script is run, Ferret outputs the following:
> -----------------
> NOAA/PMEL TMAP
> FERRET v5.80
> Linux(g77) 2.4.20 - 01/03/05
> 17-Aug-05 15:55
>
> yes? 00_200cm,return=lend`]
> **ERROR: command syntax: unpaired quotation marks, grave accent or brackets
> yes? cancel data 1
> **ERROR: unknown data set: 1
> yes? quit
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement