Since the last Copernicus Marine release (2.3.0 – 16/01/2026) release copernicusmarine a netcdf4/h5py incompatibility (see this issue) will affect the script download_mercator.py.
If you are already using croco_pytools, you will not encounter any issues as long as you keep your current environment unchanged. However, if you recreate your environment or update it, you may face an incompatibility between netCDF4 and h5py.
To resolve this, you will need to add the h5py package to your Python environment.
To minimize the impact, we plan to release a new version of croco_pytools within 2 weeks.
Hi,
Resolve your issue: simply import netCDF4 before h5py in your code.
import netCDF4 # Import FIRST then
import h5py # Import SECOND
(i hope it will fix this version conflict)
Or downgrade netCDF4 (netCDF4<1.7.3)
simply add the h5py package to your Python environment. Many systems will not work.
let me know.
Thank you.
Thank you for your answer. However, the issue originates from a subset function within the copernicusmarine package, which we cannot modify since we only use it as a dependency. Therefore, the appropriate solution is to update the Python environment to match the package’s requirements.
hi,
I’ve seen there have h5netcdf and netcdf4 (both use HDF5) engine and scipy (not need HDF5).
If you extract copernicusmarine-2.3.0.tar.gz there have download_functions/download_zarr.py at line 530.
xarray_download_format = "NETCDF3_CLASSIC" if netcdf3_compatible else None
engine = "h5netcdf" if not netcdf3_compatible else "netcdf4"