Skip to content

Use h5netcdf to read and write netcdf data #786

@mraspaud

Description

@mraspaud

Feature Request

Is your feature request related to a problem? Please describe.
At the moment, satpy uses two engines for handling io on netcdf files: netCDF4, which is a python interface to the netcdf4 C library, and h5netcdf, which uses h5py to read and write nc files. While both engines seem to be working, it is unnecessary to use both, and a harmonisation within satpy would be nice.

Describe the solution you'd like
Using only one engine for nc I/O would be best. The netCDF4 is the official library from unidata. However, it uses a C library in the background that is known for not interacting well with the C hdf5 library. h5netcdf uses h5py, which in turn uses the hdf5 C library, hence removing the need for the C netcdf library. h5netcdf has been reported to be faster in some cases, but might not be fully mature.

My opinion is that limiting the amount of C libraries is a good thing, and relying on only one C library for reading both netcdf and hdf5 is to be preferred. The h5netcdf project seems to be active and responsive, so any problems we might encounter with reading data with it should be fixed rapidly.

Describe any changes to existing user workflow
Hopefully, having only one interface to the netcdf format will simplify the installation of satpy, and should be totally transparent to the user.

Additional context
The h5netcdf project: https://github.com/shoyer/h5netcdf
The netCDF4 project: http://unidata.github.io/netcdf4-python/netCDF4/index.html

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions