[Thread Prev][Thread Next][Index]
[ferret_users] looping through the files
- To: ferret_users@xxxxxxxx
- Subject: [ferret_users] looping through the files
- From: Steeven Paul Yerraguntla <steevenpaul@xxxxxxxxx>
- Date: Tue, 22 Mar 2011 16:44:42 +0530
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:from:date:message-id:subject:to :content-type; bh=Nmr0d3VWwn0kaq7Yt1Z//dbIBgyi3gXusRJcb4JDR1Y=; b=BlVYboYJaO69qSAk7w8GjPM4DPkpkBtjjOth7soFQSvaUuPUJQAen3S5PGNHtxq4gW A3kpXSdIJvMppP8aySnspyE6/pwZ+bweTmaFcrdMZtmQwhVcDACzleDph0IJD9RcxJqW FjT67h6M2RNrs2bfHqmsX5xbSe1gj122UF+5s=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=RUcHYenNMqqoXve6tJBwCCo9ZhVoEkiRqkiG21qNcN8GqnARUpP9hRyCOsgLfa+2VO ev7pU9sPrrqwG4SHqbLsHMIgOVO1A+Q7J0X8wWRhptuQPcpLZ/g+DWiykLyPolHbanCH X5p2Y1sbSo6+Q8OHAHwNRWSkN4YLD2gjEJ0ng=
- Sender: owner-ferret_users@xxxxxxxx
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