[Thread Prev][Thread Next][Index]
[ferret_users] Reading ASCII data including formatted dates
- To: ferret_users <ferret_users@xxxxxxxx>
- Subject: [ferret_users] Reading ASCII data including formatted dates
- From: "William S. Kessler" <william.s.kessler@xxxxxxxx>
- Date: Mon, 19 Mar 2018 16:07:12 -0700
- Arc-authentication-results: i=2; mx.google.com; dkim=pass header.i=@noaa.gov header.s=google header.b=JXIkwfTl; spf=pass (google.com: domain of william.s.kessler@xxxxxxxx designates 209.85.220.41 as permitted sender) smtp.mailfrom=william.s.kessler@xxxxxxxx
- Arc-authentication-results: i=1; mx.google.com; dkim=pass header.i=@noaa.gov header.s=google header.b=JXIkwfTl; spf=pass (google.com: domain of william.s.kessler@xxxxxxxx designates 209.85.220.41 as permitted sender) smtp.mailfrom=william.s.kessler@xxxxxxxx
- Arc-message-signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-archive:list-help:list-post:list-id:mailing-list:precedence :mime-version:to:cc:message-id:date:subject :content-transfer-encoding:from:arc-authentication-results :arc-message-signature:dkim-signature:arc-authentication-results; bh=6YTV2/E9a3iSJbLj9vGWxXsMyhrAG0Cx90lbOROgv9k=; b=RUU5AJqav3opg8O/YXKjv2VtJ6Xe3eo0xh8hqSwic+M5tYDkOtYUKGj4lOAn7/Gb6b 4XDEjc0jITL0egj3zUHqLc6L1lZC1tih8gAfp41PA1rQ/wecSvGzAQZ5tdYwmY9H7Ob2 cqhXjBG9mTnSQeT9PyCtD6Y3E7H7SuwB7/0ZH1LIzNWFqWUL4/ZyOaWz9IqCQkWwP1QS 9VR2KME9jM6AGN7KmF0e2gObWPjw9GbrZwLZyngNDukIFQI3tgUmaEFpVts3fSQlHF9p HStlSfF1omXlCwhbkjAMH8wgNFTtOPJ+l/rluz+KZn1q54s62nanfODuwehruJZ78VN0 u7mQ==
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:to:cc:message-id:date:subject :content-transfer-encoding:from:dkim-signature :arc-authentication-results; bh=6YTV2/E9a3iSJbLj9vGWxXsMyhrAG0Cx90lbOROgv9k=; b=s2BFqECYcrLlJ0qzh2afYR8UY9Vv/NVuWzasF0ESpcgYU0HGehBO/w8y4GN62DV5J7 8UGxOW4AOfvZ37I01nFKEa0OcOvZRoDwy+eipNrdh/wgBlWeDthrJVDiE2m+80bo2TfX Ou/d6d1/ur8XRVPXYzuFjkBjtyWELKHoMwd8UhqgWgZpsBJ3IB0H2vmu1/aOspyY0Ju0 jgCm8gk59wWlcpvQQpISJ6rW3AcwbxduMoGF7frgck5wba/S+8Dft/Ik6jk5Bijc8a18 6/Af95a6vk8TsJIO4ed9SDfO7cDRgSDtP38xbELp2+KvwuAc7hWUybfcjexUIo/H+nOw xGkA==
- Arc-seal: i=2; a=rsa-sha256; t=1521500836; cv=pass; d=google.com; s=arc-20160816; b=i5ik9xcyllG6aeVFzwfKb4HolV8CUlr41xLMqaGxsnqDv7AYJB1FdTi4s8TexAKU7j 32/bGaOS5potLDRO41az78/7BF0pSg7m7ClA5JoIfKn5gmVltSELRgiPnA+2lkI7bg+1 jntcGWkFlKkMMURfCO+dfBFC59tLxDN1E8JxXOsWnEkQqMW6ay4lWwcy2wEPrCydSdx9 a6yvwlFQPpfZAP+eDmZtWMlzCdcAW3/eh0XwEhfYNprW18DIHiOFrrrxP7YGbmEPTyHZ gAzkbtk/HO0ER4KSmqMkJ0muC5fV+V/W00OETnETIqgM6SaCq7YvRis9DG23mGhNEdvA shaA==
- Arc-seal: i=1; a=rsa-sha256; t=1521500835; cv=none; d=google.com; s=arc-20160816; b=ITejj9fAc4BCw+wrOX/aqRhke4NuVl1dOE1dXCRJ7lYgpMuj5/8v2ue4hNcvR93mOm EhBUs77zEduHY9cg9nhuI8t6StkxdmB2wx3Dhoz8JHvZBAOI80u0fvygrHDgDejFhe29 7o+iDFkVjQV1rfXTa8ZttijadJ/ENthLrI16qb8JgM0SAjGtjaqwvok51jMxmrTNlkRD dTYVljYBz8JML9N+0rpd+cVnBsSXpB8iOmYXyWUimXrz0bq7WPyRtkGIvLhaerhJZ5at Ese9B8ILhvkjQOD8vL96WpdOURMkXoZQRXKJBRhLKJtLRDmShNJ2LNKsonsnb+NGoegB oFOg==
- Cc: "William S. Kessler" <william.s.kessler@xxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=noaa.gov; s=google; h=from:content-transfer-encoding:subject:date:message-id:cc:to :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive; bh=6YTV2/E9a3iSJbLj9vGWxXsMyhrAG0Cx90lbOROgv9k=; b=F0S+fMOcwN7aLPrhLDLu0XEvA2eteD9BXtaR9ZeuU87IFsKTx1C9eqX0cRe9g6y7sU I+m2E21IJwRag4JbgY0eLqq/03s0V9U1EpUk06ltX0gltiyWv2HbAew8GYkdnPoq/NXF RsYjBkBFUOKKm0L7yK51jWY77hQzbbdo06NYcmhIczahDgGA6BO6ga0Nzhs0inF6hxHG wMBv3K2wH2ldEWYPtuQmKqE4II6nn7PrUreg97F70NnL/fvs6WmRVQlcJCl22Jdtibk+ gmKZ1EdeIpS2rDvnmqHyTacBlvXACFO4Sd5LX9S+xdE12pI02ewsnr28M+X8ai0rm5/3 wJEQ==
- List-archive: <https://groups.google.com/a/noaa.gov/group/ferret_users/>
- List-help: <https://support.google.com/a/noaa.gov/bin/topic.py?topic=25838>, <mailto:ferret_users+help@noaa.gov>
- List-id: <ferret_users.noaa.gov>
- List-post: <https://groups.google.com/a/noaa.gov/group/ferret_users/post>, <mailto:ferret_users@noaa.gov>
- Mailing-list: list ferret_users@xxxxxxxx; contact ferret_users+owners@xxxxxxxx
- Sender: owner-ferret_users@xxxxxxxx
I'm trying to read a file consisting of a list of values (first few lines listed below). I've tried with both Ferret 6.94 and PyFerret 7.1 (on a Mac). I want to turn the list into a netcdf file (on a time axis) that I can do subsequent work on.
The hard part is the formatted dates; I am unable to do this with SET DAT/FORMAT=DELIMITED
First there's the problem with the alphabetical months, but even after laboriously changing all of those to numerical, and the separating dashes to slashes, EDATE failed.
I finally kluged this by editing the text to enforce comma-separated values, but this seems like unnecessary work. This is especially true since after having read the edited file on the default X-axis, using the numerical day/month/year to define a time axis, RESHAPEing all variables to that, then writing as cdf, Ferret's listing of the first few values is remarkably like the original!
Namely, I did a bunch of manual editing to make a file that Ferret could read and convert back to much like what I had to start with.
Was there a more straightforward way to do this? Can Ferret make sense of ASCII dates like "05-Sep-2007"? Should have asked the list before I started?
Billy K
PS - sorry for my mailtool ruining the nice columns in both the original file and the Ferret listing.
-------------------
Original file (first 11 of hundreds of lines):
#sec central_date Miss ID corr Pmax Q(0-500m) Q(0-700m)
1 05-Sep-2007 078006a 1 500 18.57 25.19
2 06-Dec-2007 07B018a 1 600 5.78 9.63
3 15-Jan-2008 07B018b 1 600 3.80 9.62
4 08-Apr-2008 082001a 1 600 -3.71 4.87
5 16-Jun-2008 082001b 1 600 16.43 16.63
6 21-Jul-2008 087006a 1 700 28.64 35.86
7 16-Sep-2008 087006b 1 700 14.80 15.31
8 01-Dec-2008 08B018a 1 700 16.57 22.62
9 23-Jan-2009 08B018b 1 700 4.22 6.70
10 02-Aug-2009 097006a 1 700 25.98 28.79
11 03-Aug-2009 097001a 1 700 24.83 28.62
Ferret listing of resulting cdf:
yes? list/l=1:11 secnumt,midt,bott,t500t,t700t
DATA SET: ./solsea103-tr_v2b.cdf
TIME: 21-JUL-2007 00:00 to 27-AUG-2009 00:00
Column 1: SECNUMT is RESHAPE(SECNUM,TTHH)
Column 2: MIDT is RESHAPE(MID,TTHH)
Column 3: BOTT is RESHAPE(BOT,TTHH)
Column 4: T500T is RESHAPE(T500,TTHH)
Column 5: T700T is RESHAPE(T700,TTHH)
SECNUMT MIDT BOTT T500T T700T
05-SEP-2007 00 / 1: 1.00 "078006a" 500.0 18.57 25.19
06-DEC-2007 00 / 2: 2.00 "07B018a" 600.0 5.78 9.63
15-JAN-2008 00 / 3: 3.00 "07B018b" 600.0 3.80 9.62
08-APR-2008 00 / 4: 4.00 "082001a" 600.0 -3.71 4.87
16-JUN-2008 00 / 5: 5.00 "082001b" 600.0 16.43 16.63
21-JUL-2008 00 / 6: 6.00 "087006a" 700.0 28.64 35.86
16-SEP-2008 00 / 7: 7.00 "087006b" 700.0 14.80 15.31
01-DEC-2008 00 / 8: 8.00 "08B018a" 700.0 16.57 22.62
23-JAN-2009 00 / 9: 9.00 "08B018b" 700.0 4.22 6.70
02-AUG-2009 00 / 10: 10.00 "097006a" 700.0 25.98 28.79
03-AUG-2009 00 / 11: 11.00 "097001a" 700.0 24.83 28.62
[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce /
NOAA /
OAR /
PMEL /
Ferret
Privacy Policy | Disclaimer | Accessibility Statement