[Thread Prev][Thread Next][Index]

how to assign (spawn) arguments in batch



Hi!
I am trying to do some loop with shell scripting and passing arguments!
to ferret by means of a counter. The intention is to vary time axis and
create a XYT cdf file from xy individual files. Following my scripts:
====================0===============
#!/bin/sh
for (( i = $1; i <= $2; i++ ))
do
.
.
"some stuff"
.
.
grd2xyz sst.grd -R210/285/-5/33 -ZBLa -V > salida
awk '{if ($1 == "NaN") print -999; else print $1}' salida > dato
echo $i > cont

ferret << eof
let lo = '{spawn:"more cont"}'
list lo
go junta.jnl
eof
done
exit
=============0=========
!ferret answers with errors!
==============0===========
NOAA/PMEL TMAP
        FERRET v5.60
        Linux(g77) 2.4.20 - 04/08/04
         9-Jun-04 15:50

yes? let lo = '{spawn:"more cont"}'
ls: FER_DIR/ext_func/libs/: No such file or directory
yes? list lo
 **ERROR: variable unknown or not in data set: '{spawn:"more cont"}'
yes? go junta.jnl
use sst_2004.cdf
define axis/x=210:284.95:0.05 lon
Replacing definition of axis LON
 *** NOTE: grid  used by data set sst_2004
 *** NOTE: Redefinition may alter apparent contents of data set
define axis/y=-5:32.95:0.05 lat
define axis/t=lo:lo:1 tiempo
 **ERROR: command syntax: lo
define axis/t=lo:lo:1 tiempo
Command file, command group, or REPEAT execution aborted
yes?


===============0=================
junta.jnl contains:

use sst_2004.cdf
define axis/x=210:284.95:0.05 lon
define axis/y=-5:32.95:0.05 lat
define axis/t=lo:lo:1 tiempo
define grid/X=lon/Y=lat/T=tiempo rejilla
file/var=sst/grid=rejilla dato
save/append/file=sst_2004.cdf sst
cancel data dato
exit

==================0=====================


ext_func.libs error message seems not to be fatal, I have done ok work
with this
message.

I appreciate your help

Hector Manzo









[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement