[Thread Prev][Thread Next][Index]

Re: [ferret_users] Read date



Hi Patrick,
Just for all our reference, the pieces of documentation are these: For reading Delimited files:
http://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/data-set-basics/ASCII-DATA#Chapter2-delimited_files

And for datatype in Ascii files:
http://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/commands-reference/SET#_VPINDEXENTRY_1617

The /TYPE=EURODATE specifier works correctly for data of the form yy-mm-dd or yyyy-mm-dd but it looks as if the form including both date and time does not.  You can read your data as follows:

yes? set dat/form=delimited/type="eurodate,time"/delim="\b" file1.txt
yes? list v1,v2
             DATA SET: ./file1.txt
             X: 0.5 to 9.5
 Column  1: V1 is V1 (days)(Julian days since 1-Jan-1900)
 Column  2: V2 is V2 (hours)(Time of day)
             V1    V2
1   / 1:  39612.  18.26
2   / 2:  39612.  18.59
3   / 3:  39612.  18.92
4   / 4:  39612.  19.25
5   / 5:  39612.  19.57
6   / 6:  39612.  19.90
7   / 7:  39612.  20.23
8   / 8:  39612.  20.56
9   / 9:  39612.  20.89

Then you could form a variable,
yes? let datetime = v1 + v2/24
Thank you for writing. We will at least fix up the documentation so it reflects what you can do!

Ansley


Brockmann Patrick wrote:
Hi all,
I try to read date and plot them on a real calendar
Is there an example somewhere.
Any help appreciated.


My test
$ cat file1.txt
2008-06-15 18:15:23
2008-06-15 18:35:19
2008-06-15 18:54:58
2008-06-15 19:14:42
2008-06-15 19:34:16
2008-06-15 19:54:14
2008-06-15 20:14:03
2008-06-15 20:33:39
2008-06-15 20:53:13

ferret
yes? set data/format=delimited/type="EURODATE" file1.txt
yes? list  v1

all bad...

Patrick


[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement