[Thread Prev][Thread Next][Index]

Re: [ferret_users] Problem with data from ASCII files



Hi Szymon and Ansley,

> The FILE command (an alias for SET DATA/EZ) only initializes the
> dataset. It checks that it can open the file, and stores the
> definitions of the variables and grids that you give in the FILE
> command.  It does not read any data or do anything to see what's in
> the file.  This means that each FILE command is just redefining the
> contents of the dataset.
>
> My suggestion would be to read each variable and save it to a netCDF
> file.  Then you would have them together in a dataset that's easy to

Another idea is to give multiple names to the datafile using
the symbolic-link mechanism.  At the end of this message,
I show a complete example.

Regards,
Ryo
--------------
linux-prompt$ cat tmp.dat  #-- contains one 1D variable on each line.
1 2 3  2 1 2  3 2 1
-3 -2 -1  -2 -3 -2  -1 -2 -3
linux-prompt$ ln -s tmp.dat tmp2.dat
linux-prompt$ ferret
. . . .
yes? define axis/x=1:9:1 xax
yes? define grid/x=xax mygrid
yes? file/var=var1/columns=9/grid=mygrid        tmp.dat
yes? file/var=var2/columns=9/grid=mygrid/skip=1 tmp2.dat
yes? show data
     currently SET data sets:
    1> ./tmp.dat
 name     title                             I         J         K         L
 VAR1     VAR1                             1:9       ...       ...       ...
 
    2> ./tmp2.dat  (default)
 name     title                             I         J         K         L
 VAR2     VAR2                             1:9       ...       ...       ...
 
yes? plot var1[d=1], var2[d=2]


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

Privacy Policy | Disclaimer | Accessibility Statement