[Thread Prev][Thread Next][Index]

Re: load ascii



Hi -
You might be able to use the SET DATA/FORMAT=DELIMITED
command where you can tell Ferret that one of the fields is a DATE,
if the date is in one of these forms:

     DATE - mm/dd/yy or mm/dd/yyyy or yyyy-mm-dd or yyyymmdd - value returned is days
     from 1-jan-1900 (consistent with the DAYS1900 function)

     EURODATE - dd/mm/yy or dd/mm/yyyy or yyyy-mm-dd TIME - e.g. hh:mm or
     hh:mm:ss.s/

If it is not in one of these forms, you could perhaps read
year, month, day, individually with a formatted read statement,
and then use the days1900 function to make a variable which
then could be used to define a time axis.

Ansley Manke

Joe McLean wrote:

> Hi Martinho,
> try the following command.
> file/col=2/var="var1,var2" test.dat
>
> "format=unf" is for floating point, binary, FORTRAN-style records.
>
> Also you might want to define a grid first so that your I axis isn't the
> default length of 20840.
> def axis/t=1:NumofPts:1 tabstract
> def grid/t=tabstract gabstract
> file/col=2/grid=gabstract/var="var1,var2" test.dat
>
> There are ways to reformat time, what are the units?
>
> Joe
> ------------------------------------------------
>
> Martinho Marta Almeida wrote:
>
> > Hi,
> > I use ferret with netcdf files, but now just wanna open an ascii file:
> >
> > 981417600 1.167711
> > 981421200 1.195930
> > 981424800 0.917893
> > 981428400 0.401335
> > 981432000 -0.223957
> > 981435600 -0.798760
> > 981439200 -1.174996
> > 981442800 -1.253920
> > 981446400 -1.012061
> > 981450000 -0.508093
> >  ...         ...
> >
> > I tried with
> > >>set data/ez/format=unf/var=var1,var2/col=2 test.dat
> > but its not working ?!
> > This is probably very simple...
> > (by the way, first column is time; can I give it a better look ?)
> >
> > Thanks in advance
> > MMA
> >
> > --
> > Martinho Marta Almeida
> > Physics Department
> > Aveiro University
> > Portugal
> > martinho@fis.ua.pt
> > http://mat.ua.pt/bjc/mma

--
Ansley Manke  Pacific Marine Environmental Laboratory  Seattle WA  (206)526-6246




[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement