4

I have a large amount of data generated with parallel netCDF, with enough entries that output could only be generated in CDF-5 format. I have an analysis routine in python I want to pass this data through. However, I have not been able to open the CDF-5 format with any python package (or visit, or read the header files with ncdump, although ncmpidump -h provides the correct header information of course). Does anyone know of either

1) A python package that can read CDF-5 formatted data

2) A utility that can convert parallel netCDF CDF-5 data to something more widely supported, like HDF5, that I could then read in to python?

Option 1 preferable of course.

Thanks

2
  • What python modules have You tried exactly? I know the package in scipy.io is different from python-netcdf4 and independent from C library. But if that doesn't work, You probably need to wrap C library to python yourself. Commented Jan 9, 2016 at 9:52
  • 1
    Neither scipy.io nor python-netcdf4 worked. I ended up just writing a little C program using parallel netCDF to convert CDF5 to CDF2, which was relatively painless to do, following included examples. It looks like the parallel netCDF team had committed to including CDF5 support in the standard netCDF distribution, but their postdocs tasked with this keep leaving :) Commented Jan 11, 2016 at 18:07

2 Answers 2

1

The latest NCO pre-release, 4.5.5-alpha02, supports CDF5, and conversion to/from CDF5 with all netCDF types, including netCDF4, e.g.,ncks -4 in_5.nc out_4.nc translates CDF5 files to netCDF4. The requirement is that NCO must be built with netCDF 4.4.0, released a few days ago.

Sign up to request clarification or add additional context in comments.

Comments

1

The latest release of netcdf4-python library should be able to make use of the support for CDF-5 added in version 4.4 of the C library. For more details, see here: https://github.com/Unidata/netcdf4-python/pull/482

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.