[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #CCW-349155]: Convert McIDAS MD to netCDF



Hi Dave,

> I hope you are doing well!

Yes, thanks, I'm about to return to Boulder from the week long AGU meeting, 
where I gave a talk on recent netCDF advances for for data interoperability.

> I usually contact TomY about these issues, but I see your name attached
> to this page:
> http://www.unidata.ucar.edu/software/netcdf/Contrib.html
> 
> Ideally, what I'm looking for is a way to convert McIDAS MD files to
> netCDF. If you aren't aware of that, next would be text->netCDF. I see
> tbl2cdf and text2nc on your page, but they're from the 1990s. Are they
> still being used?

I don't know of an existing program to convert McIDAS MD to netCDF.  I also 
don't know how much use tbl2cdf or text2nc are getting, but we still support
the netCDF version 2 APIs in terms of which they were written, even in the 
most recent netCDF-4.1.1 release.  So if they look useful, you should be able
to compile and link them with the most recent library.

> What complicates this in my mind is the data are upper-air reports, so
> for each station there could be up to 50 pressure levels. I'm not sure
> if these text->nc converters are going to work, anyway.
> 
> Any thoughts or suggestions?

One route to a solution would be to use CDL, a text form for representing netCDF
data, as an intermediate form.  Roughly, if you can convert the McIDAS MD data 
to
text form and then use text tools like sed, awk, or perl to make that text form 
look
like CDL, then you can use the ncgen utility that comes with netCDF to convert 
the
CDL to binary netCDF form.

This also might be helpful for generating a program to do what you want.  The 
ncgen
utility, in addition to converting CDL to netCDF, can also generate a C program 
that
will create the same netCDF data.  So that could generate a lo of the 
boilerplate code
you would need for a conversion program.

Another intermediate text form that can be used in the same way is NcML, which 
the
Java equivalent of ncdump and ncgen can use in the same way, though I don't 
think
you can generate Java code from NcML.

I hope that helps.  Gotta go catch a plane now ...

--Russ

Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: CCW-349155
Department: Support netCDF
Priority: Normal
Status: Closed