[ncl-talk] readAsciiTable to handle ***** in data
Dennis Shea
shea at ucar.edu
Tue Apr 9 15:41:09 MDT 2019
Likely, a fortran code with f4.1 was used but should have been f5.1
===
%> ncl XiaomingHu.ncl
===0) ndat=7; ncol=32
Variable: dstr
Type: string
Total Size: 56 bytes
7 values
Number of Dimensions: 1
Dimensions and sizes: [7]
Coordinates:
(0) 72249 03990 87 3 2008 3 31 11 51 55.21 32.83500 -97.29806
199 195 6 2008 3 31 12 55 7.29 14 94 7000 1.0 5 -70.2 -98.3
18481 18638 12.5 247
(1) 72249 03990 87 3 2008 3 31 11 51 55.21 32.83500 -97.29806
199 195 6 2008 3 31 12 55 56.21 28 94 6689 1.0 5 -72.3 -99.8
18750 18907 15.5 228
(2) 72249 03990 87 3 2008 3 31 11 51 55.21 32.83500 -97.29806
199 195 6 2008 3 31 12 56 16.21 21 94 6570 1.0 5 -72.9 999.9
18855 19014 17.2 229
(3) 72249 03990 87 3 2008 3 31 11 51 55.21 32.83500 -97.29806
199 195 6 2008 3 31 12 56 54.21 28 94 6360 1.0 5 -73.1 999.9
19046 19210 19.1 243
(4) 72249 03990 87 3 2008 3 31 11 51 55.21 32.83500 -97.29806
199 195 6 2008 3 31 12 58 24.21 28 94 5861 1.0 5 -73.0 999.9
19525 19694 13.5 290
(5) 72249 03990 87 3 2008 3 31 11 51 55.21 32.83500 -97.29806
199 195 6 2008 3 31 12 58 48.21 21 94 5744 1.0 5 -72.9 999.9
19643 19816 14.3 291
(6) 72249 03990 87 3 2008 3 31 11 51 55.21 32.83500 -97.29806
199 195 6 2008 3 31 12 59 29.21 28 94 5551 1.0 5 -69.3 -97.6
19846 20025 11.7 290
(0) 72249 88888 -98.3
(1) 72249 88888 -99.8
(2) 72249 88888 999.9
(3) 72249 88888 999.9
(4) 72249 88888 999.9
(5) 72249 88888 999.9
(6) 72249 88888 -97.6
(0) ---
Variable: dstr (subsection)
Type: string
Total Size: 24 bytes
3 values
Number of Dimensions: 1
Dimensions and sizes: [3]
Coordinates:
(0) 72249 03990 87 3 2008 3 31 11 51 55.21 32.83500 -97.29806
199 195 6 2008 3 31 12 55 7.29 14 94 7000 1.0 5 -70.2 -98.3
18481 18638 12.5 247
(1) 72249 03990 87 3 2008 3 31 11 51 55.21 32.83500 -97.29806
199 195 6 2008 3 31 12 55 56.21 28 94 6689 1.0 5 -72.3 -99.8
18750 18907 15.5 228
(2) 72249 03990 87 3 2008 3 31 11 51 55.21 32.83500 -97.29806
199 195 6 2008 3 31 12 59 29.21 28 94 5551 1.0 5 -69.3 -97.6
19846 20025 11.7 290
(0) ---
On Tue, Apr 9, 2019 at 10:18 AM xiaoming Hu <yuanfangcan at hotmail.com> wrote:
> I need to read a lot of table data. but some of them contains **** (but
> the number and location of **** in the file are uncertain), see one of the
> examples below.
> What is the best way to handle the **** in these files other than manually
> removing them? I am currently using readAsciiTable to read.
>
> Thanks a lot!
> Xiaoming
>
> 72249 03990 87 3 2008 3 31 11 51 55.21 32.83500 -97.29806 199 195
> 6 2008 3 31 12 55 7.29 14 94 7000 1.0 5 -70.2 -98.3 18481 18638
> 12.5 247
> 72249 03990 87 3 2008 3 31 11 51 55.21 32.83500 -97.29806 199 195
> 6 2008 3 31 12 55 56.21 28 94 6689 1.0 5 -72.3 -99.8 18750 18907
> 15.5 228
> 72249 03990 87 3 2008 3 31 11 51 55.21 32.83500 -97.29806 199 195
> 6 2008 3 31 12 56 16.21 21 94 6570 1.0 5 -72.9 ***** 18855 19014
> 17.2 229
> 72249 03990 87 3 2008 3 31 11 51 55.21 32.83500 -97.29806 199 195
> 6 2008 3 31 12 56 54.21 28 94 6360 1.0 5 -73.1 ***** 19046 19210
> 19.1 243
> 72249 03990 87 3 2008 3 31 11 51 55.21 32.83500 -97.29806 199 195
> 6 2008 3 31 12 58 24.21 28 94 5861 1.0 5 -73.0 ***** 19525 19694
> 13.5 290
> 72249 03990 87 3 2008 3 31 11 51 55.21 32.83500 -97.29806 199 195
> 6 2008 3 31 12 58 48.21 21 94 5744 1.0 5 -72.9 ***** 19643 19816
> 14.3 291
> 72249 03990 87 3 2008 3 31 11 51 55.21 32.83500 -97.29806 199 195
> 6 2008 3 31 12 59 29.21 28 94 5551 1.0 5 -69.3 -97.6 19846 20025
> 11.7 290
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190409/0ea75b44/attachment.html>
-------------- next part --------------
72249 03990 87 3 2008 3 31 11 51 55.21 32.83500 -97.29806 199 195 6 2008 3 31 12 55 7.29 14 94 7000 1.0 5 -70.2 -98.3 18481 18638 12.5 247
72249 03990 87 3 2008 3 31 11 51 55.21 32.83500 -97.29806 199 195 6 2008 3 31 12 55 56.21 28 94 6689 1.0 5 -72.3 -99.8 18750 18907 15.5 228
72249 03990 87 3 2008 3 31 11 51 55.21 32.83500 -97.29806 199 195 6 2008 3 31 12 56 16.21 21 94 6570 1.0 5 -72.9 ***** 18855 19014 17.2 229
72249 03990 87 3 2008 3 31 11 51 55.21 32.83500 -97.29806 199 195 6 2008 3 31 12 56 54.21 28 94 6360 1.0 5 -73.1 ***** 19046 19210 19.1 243
72249 03990 87 3 2008 3 31 11 51 55.21 32.83500 -97.29806 199 195 6 2008 3 31 12 58 24.21 28 94 5861 1.0 5 -73.0 ***** 19525 19694 13.5 290
72249 03990 87 3 2008 3 31 11 51 55.21 32.83500 -97.29806 199 195 6 2008 3 31 12 58 48.21 21 94 5744 1.0 5 -72.9 ***** 19643 19816 14.3 291
72249 03990 87 3 2008 3 31 11 51 55.21 32.83500 -97.29806 199 195 6 2008 3 31 12 59 29.21 28 94 5551 1.0 5 -69.3 -97.6 19846 20025 11.7 290
-------------- next part --------------
A non-text attachment was scrubbed...
Name: XiaomingHu.ncl
Type: application/octet-stream
Size: 766 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190409/0ea75b44/attachment.obj>
More information about the ncl-talk
mailing list