Hi-
The SET REGION is a global setting, and so it applies to the axis
xfile that you define in order to loop through your datasets. I
would recommend not using SET REGION, but instead put the region
into the plotting command,
use sst.nc
fill/l=1 SST[X=75:100,y=5:25]
Then, in your loop, it looks like the closing quotes are just in the
wrong place. Both the end grave accent and the double quote need to
be outside the entire file specification, which includes the dataset
number where variable filenames is.
file/format=delimited/delimiter="\t"/var="lat,lon"
"./`filenames[i=($ff),[d=2]`"
--Ansley
On 3/22/2011 4:14 AM, Steeven Paul Yerraguntla wrote:
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
|