[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[IDV #BQX-315994]: Question About How to Convert ASCII txt Buoy File to netCDF
- Subject: [IDV #BQX-315994]: Question About How to Convert ASCII txt Buoy File to netCDF
- Date: Thu, 19 Jul 2007 15:49:58 -0600
Hi Jacob-
You can read in ASCII point data in text files if the format is comma
or space separated fields with each line containing one observation time.
There is some documentation in the User's Guide at:
http://www.unidata.ucar.edu/software/idv/docs/userguide/data/TextPointData.html
and we are working on a Wizard tool that will make this easier. Currently,
though the wizard doesn't support having the time span multiple files as in
your sample data.
> I am trying to get files that contain buoy data to display and plot in
> the Integrated Data Viewer in the same way the IDV displays METAR data.
> The format the files are in are ASCII txt and I cannot get the IDV to
> plot the files on the map in this format. Is there a way to convert the
> ASCII txt files into a netCDF format or any other format that would be
> compatible with the IDV? I found a website based upon the GEON IDV that
> discusses ASCII data; however, it appears the format of the files I have
> are different that the format discussed on the GEON IDV site. I was
> unable to understand what it was explaining. A small sample/readout of
> one of the buoy data files are below. There are many other buoys in the
> files and I cut most of them out because it would have been an extremely
> long list.
> Can there be a way for me to convert the way in which the data
> below is structured so that the IDV can display and plot the data in the
> same way the program displays METAR/observational data?
>
> #STN LAT LON YYYY MM DD hh mm WDIR WSPD GST WVHT DPD APD MWD
> PRES PTDY ATMP WTMP DEWP VIS TIDE
> #text deg deg yr mo day hr mn degT m/s m/s m sec sec degT
> hPa hPa degC degC degC mi ft
> 41001 34.68 -72.66 2007 07 17 20 50 210 4.0 6.0 1.4 6 MM MM
> 1019.6 -1.0 25.3 26.1 23.2 MM MM
> 41004 32.5 -79.09 2007 07 17 20 50 210 6.0 8.0 0.9 8 4.3 MM
> 1018.3 -1.6 28.4 29.1 MM MM MM
> 41008 31.4 -80.87 2007 07 17 21 50 170 7.0 8.0 0.6 9 4.1 107
> 1018.0 -1.8 28.7 29.7 25.0 MM MM
> 41009 28.5 -80.17 2007 07 17 21 20 110 3.0 4.0 0.6 8 5.6 MM
> 1019.0 MM 29.7 30.1 MM MM MM
> 41010 28.95 -78.47 2007 07 17 21 20 160 4.0 5.0 1.0 8 5.7 MM
> 1019.0 MM 29.3 29.9 24.4 MM MM
> 41013 33.44 -77.74 2007 07 17 21 50 210 8.0 9.0 1.0 5 4.1 184
> 1017.3 -1.9 27.9 28.2 25.8 MM MM
> 41025 35.01 -75.4 2007 07 17 21 50 190 6.0 8.0 1.0 9 4.3 MM
> 1017.6 -1.2 27.9 27.4 25.2 MM MM
> 41027 33.3 -78.14 2007 07 17 20 00 220 6.0 MM MM MM MM MM
> 1018.4 MM 29.4 MM MM MM MM
> 41030 32.52 -79.34 2007 07 17 20 00 210 7.0 MM MM MM MM MM
> 1018.6 MM 28.8 MM MM MM MM
> 41033 32.28 -80.41 2007 07 17 20 00 190 6.0 MM MM MM MM MM
> 1017.9 MM 30.0 MM MM MM MM
> 41035 34.48 -77.28 2007 07 17 21 20 200 10.0 11.0 MM MM MM MM
> 1016.4 MM 28.1 27.8 25.4 MM MM
> 41036 34.21 -76.95 2007 07 17 21 20 200 8.0 10.0 1.0 8 4.3 127
> 1016.3 MM 27.8 28.0 25.0 MM MM
> 41037 33.99 -77.36 2007 07 17 21 00 210 8.0 10.0 MM MM MM MM
> 1016.3 MM 28.4 MM MM MM MM
> 41038 34.14 -77.71 2007 07 17 21 00 210 9.0 11.0 MM MM MM MM
> 1017.7 MM 28.5 MM MM MM MM
> 41040 14.48 -53.03 2007 07 17 21 50 060 10.0 11.0 MM MM MM MM
> 1013.4 +0.0 27.3 27.8 23.3 MM MM
> 41041 14.53 -46 2007 07 17 20 50 090 8.0 10.0 2.4 9 5.6 MM
> 1014.5 -0.0 26.3 26.5 25.1 MM MM
I'm attaching a modified version of your sample that can be read into
the IDV. You'll need to select the Text Point Data files as the
Data Source Type in the Files chooser.
Don
Ticket Details
===================
Ticket ID: BQX-315994
Department: Support IDV
Priority: Normal
Status: Open
(index) -> IDN, Latitude, Longitude, Time, WDIR, WSPD, GST, WVHT, DPD, APD,
MWD, PRES, PTDY, ATMP, WTMP, DEWP, VIS, TIDE
IDN, Latitude[unit="deg"], Longitude[unit="deg"], Time[fmt="yyyy MM dd HH mm"
colspan="5"], WDIR[unit="deg" miss="MM"], WSPD[unit="m/s" miss="MM"],
GST[unit="m/s" miss="MM"], WVHT[unit="m" miss="MM"], DPD[unit="sec" miss="MM"],
APD[unit="sec" miss="MM"], MWD[unit="deg" miss="MM"], PRES[unit="hPa"
miss="MM"], PTDY[unit="hPa" miss="MM"], ATMP[unit="degC" miss="MM"],
WTMP[unit="degC" miss="MM"], DEWP[unit="degC" miss="MM"], VIS[unit="mi"
miss="MM"], TIDE[unit="ft" miss="MM"]
#STN LAT LON YYYY MM DD hh mm WDIR WSPD GST WVHT DPD APD MWD PRES PTDY ATMP
WTMP DEWP VIS TIDE
#text deg deg yr mo day hr mn degT m/s m/s m sec sec degT hPa hPa degC degC
degC mi ft
41001 34.68 -72.66 2007 07 17 20 50 210 4.0 6.0 1.4 6 MM MM 1019.6 -1.0 25.3
26.1 23.2 MM MM
41004 32.5 -79.09 2007 07 17 20 50 210 6.0 8.0 0.9 8 4.3 MM 1018.3 -1.6 28.4
29.1 MM MM MM
41008 31.4 -80.87 2007 07 17 21 50 170 7.0 8.0 0.6 9 4.1 107 1018.0 -1.8 28.7
29.7 25.0 MM MM
41009 28.5 -80.17 2007 07 17 21 20 110 3.0 4.0 0.6 8 5.6 MM 1019.0 MM 29.7 30.1
MM MM MM
41010 28.95 -78.47 2007 07 17 21 20 160 4.0 5.0 1.0 8 5.7 MM 1019.0 MM 29.3
29.9 24.4 MM MM
41013 33.44 -77.74 2007 07 17 21 50 210 8.0 9.0 1.0 5 4.1 184 1017.3 -1.9 27.9
28.2 25.8 MM MM
41025 35.01 -75.4 2007 07 17 21 50 190 6.0 8.0 1.0 9 4.3 MM 1017.6 -1.2 27.9
27.4 25.2 MM MM
41027 33.3 -78.14 2007 07 17 20 00 220 6.0 MM MM MM MM MM 1018.4 MM 29.4 MM MM
MM MM
41030 32.52 -79.34 2007 07 17 20 00 210 7.0 MM MM MM MM MM 1018.6 MM 28.8 MM MM
MM MM
41033 32.28 -80.41 2007 07 17 20 00 190 6.0 MM MM MM MM MM 1017.9 MM 30.0 MM MM
MM MM
41035 34.48 -77.28 2007 07 17 21 20 200 10.0 11.0 MM MM MM MM 1016.4 MM 28.1
27.8 25.4 MM MM
41036 34.21 -76.95 2007 07 17 21 20 200 8.0 10.0 1.0 8 4.3 127 1016.3 MM 27.8
28.0 25.0 MM MM
41037 33.99 -77.36 2007 07 17 21 00 210 8.0 10.0 MM MM MM MM 1016.3 MM 28.4 MM
MM MM MM
41038 34.14 -77.71 2007 07 17 21 00 210 9.0 11.0 MM MM MM MM 1017.7 MM 28.5 MM
MM MM MM
41040 14.48 -53.03 2007 07 17 21 50 060 10.0 11.0 MM MM MM MM 1013.4 +0.0 27.3
27.8 23.3 MM MM
41041 14.53 -46 2007 07 17 20 50 090 8.0 10.0 2.4 9 5.6 MM 1014.5 -0.0 26.3
26.5 25.1 MM MM