diff --git a/kerchunk/netCDF3.py b/kerchunk/netCDF3.py index a3b0c58f..200159d1 100644 --- a/kerchunk/netCDF3.py +++ b/kerchunk/netCDF3.py @@ -207,9 +207,15 @@ def translate(self): outer_shape = size // dt.itemsize offset = start for name in dt.names: + dtype = dt[name] + + # Skip padding, but increment offset. + if name.startswith("_padding_"): + offset += dtype.itemsize + continue + # the order of the names if fixed and important! var = self.variables[name] - dtype = dt[name] base = dtype.base # actual dtype shape = (outer_shape,) + dtype.shape