[Thread Prev][Thread Next][Index]
Re: plotting data in a separate directory
Hi Helge,
While specifiying path to a file, you must use quotes
like;
yes? use "/home/DATA/mydata.dat" ! full path
! or
yes? use "./DATA/mydata.dat" ! relative to current dir.
To use your present sript, define a new variable like;
yes? define symbol qts = \"
while setting the path to the symbol put ' " ' & ' . ' in case
of relative path
yes? define symbol RESULTS=($qts).($DIR)\/($LABEL).data($qts)
yes? define symbol VGRID=($qts).($DIR)\/($LABEL)-grid.data($qts)
Hope this helps
With Regards
Jaison Kurian
On Wed, 31 Mar 2004, Helge Avlesen wrote:
> Hi,
> I have some data in different directory that I want to include into my
> plot, but ferret crashes on me... minimized example follows:
>
> /avle@tindved: > cat data/test2.data
> 1 35.1 12.1
> 2 35.2 12.2
> 3 35.3 12.3
> 4 35.4 12.4
> /avle@tindved: > cat data/test2-grid.data
> 1 1
> 2 1
> 1 2
> 2 2
> /avle@tindved: > ferret
> appending ferret path
> NOAA/PMEL TMAP
> FERRET v5.53
> Linux(g77) 2.4.x - 09/26/03
> 31-Mar-04 09:39
>
> yes? go plot
> define symbol DIR=data
> define symbol LABEL=test2
>
> define axis/x=1:2:1 xaxis
> define axis/y=1:2:1 yaxis
> define grid/x=xaxis/y=yaxis grid1
>
> define symbol RESULTS=($DIR)\/($LABEL).data
> !-> define symbol RESULTS=data/test2.data
> define symbol VGRID=($DIR)\/($LABEL)-grid.data
> !-> define symbol VGRID=data/test2-grid.data
>
> file/var=xcoo,zcoo/grid=grid1 ($VGRID)
> !-> SET DATA/EZ/var=xcoo,zcoo/grid=grid1 data/test2-grid.data
>
> let xg=xcoo[d=($VGRID)]
> !-> DEFINE VARIABLE xg=xcoo[d=data/test2-grid.data]
> let zg=zcoo[d=($VGRID)]
> !-> DEFINE VARIABLE zg=zcoo[d=data/test2-grid.data]
>
> file/var=dill,sal,temp/grid=grid1 ($RESULTS)
> !-> SET DATA/EZ/var=dill,sal,temp/grid=grid1 data/test2.data
>
> shade dill,xg,yg
> fmt: end of file
> apparent state: unit 62 named ./data
> last format: (A)
> lately reading sequential formatted external IO
> Aborted
> /avle@tindved: >
>
>
> I also tried setting the full path to the grid like
> define VGRID="($DIR)/($LABEL)-grid.data"
> but then ferret will not find the dataset because the RESULTS symbol
> has a double set of "
>
> is there a way to work around this problem?
>
> Helge
>
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement