[Thread Prev][Thread Next][Index]

[ferret_users] looping through the files



Dear ferreters,
          I wanted to plot few tracks over a filled plot.  Lat, Longiutes of each track are in a single file. I need to apply a loop through many text files using repeat statement, to over plot tracks. To do so, i used a procedure given in archieves.  I am encountering an error when running the following script.  When i use "cancel region" before starting looping Error message says: 
!-> REPEAT: NF:1
 !-> define symbol ff = 1
 !-> SET DATA/EZ/format=delimited/delimiter="\t"/var="lat,lon"  "./1990_nov_01.txt"[d=2]
 **ERROR: variable unknown or not in data set: FILENAMES[I=1]
cancel data./`filenames[i=1]`"[d=2]
Command file, command group, or REPEAT execution aborted

When i did not use "cancel region" statement before repeat statement error as follows

!-> REPEAT: NF:1
 !-> define symbol ff = 1
 !-> SET DATA/EZ/format=delimited/delimiter="\t"/var="lat,lon"  "./1990_nov_01.txt"[d=2]
 **ERROR: illegal limits: X axis of LON
plot/VS/line/thickness=2/color=black/over lon[d=3],lat[d=3]
Command file, command group, or REPEAT execution aborted

Please let me know to overcome this problem.  sample text file for track plotting is attached to this mail. Journal i used as follows
-------------------------------------------------------------------------------------------------------------
use sst.nc
SET REGION/X=75:100/y=5:25
fill/l=1   SST
! looping through files 
define axis/x=1:22:1 xfile
define grid/x=xfile  gfile
file/grid=gfile/format=delimited/var="filenames" filenames.txt
! cancel region
        repeat/range=1:22:1/name=nf   (    ;\
                        define symbol ff = `nf` ;\
                        can var/all   ;\
                        file/format=delimited/delimiter="\t"/var="lat,lon"  "./`filenames[i=($ff)]`"[d=2] ;\
                        plot/VS/line/thickness=2/color=black/over lon[d=3],lat[d=3]  ;\
                        cancel data "./`filenames[i=($ff)]`"[d=2];\
                                      )
--------------------------------------------------------------------------------------------------------------

thanks n regards,
--
Steeven Paul Y                              
Research Fellow
National Institute of Oceanography(NIO)
Regional Center, Visakhapatnam (RCV)                 
176 Lawsons Bay Colony
Visakhapatnam - 530017
    






7.5	85.5
7.5	84.5
7.5	83.5
7	82.5
7	81.5
7.5	80
7.5	79.5
7.5	79
8	78.5
9	77.5
9.5	77.5
9.8	77
10.5	76.5
10.5	76
10.5	75.5
10.5	75
11	74.5
11.5	74.5
12	74.5
12.5	74.5
12.5	74.5
13.5	74.5
13.5	74.5
14	74.5
14.5	74.5
15	75


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement