Commit #9cf83a5 'Update CI' introduces a breaking change to utils._read_xy_chunk.
Prior to this commit, reading 3-D diagnostics mds files (containing more than one 3-D field, e.g. state_3d_set1 in ECCOv4r2) on the LLC grid via open_mdsdataset works perfectly.
After this commit, open_mdsdataset appears to work and returns an xarray dataset of the right format, but all diagnostics apart from the first field appear incorrect and in fact appear to be repeats of the first diagnostic in the file.
I narrowed this down by trial and error to a single change in commit #9cf83a5, in utils._read_xy_chunk, section 1 "compute offset_variable, init to zero":
if (dim=='nx') or (dim=='ny'):
nbytes_thisvar = nbytes_thisvar*file_metadata[dim]
Where the if statement is new. Commenting out this line only, open_mdsdataset reverts to expected behaviour. I guess it is because nz is also neaded to calculate the correct byte offset.
I would happily submit a pull request but I'm sure @IvanaEscobar had a reason to introduce this line so curious what the reason was so we can resolve.
Commit #9cf83a5 'Update CI' introduces a breaking change to utils._read_xy_chunk.
Prior to this commit, reading 3-D diagnostics mds files (containing more than one 3-D field, e.g. state_3d_set1 in ECCOv4r2) on the LLC grid via open_mdsdataset works perfectly.
After this commit, open_mdsdataset appears to work and returns an xarray dataset of the right format, but all diagnostics apart from the first field appear incorrect and in fact appear to be repeats of the first diagnostic in the file.
I narrowed this down by trial and error to a single change in commit #9cf83a5, in utils._read_xy_chunk, section 1 "compute offset_variable, init to zero":
if (dim=='nx') or (dim=='ny'):nbytes_thisvar = nbytes_thisvar*file_metadata[dim]Where the if statement is new. Commenting out this line only, open_mdsdataset reverts to expected behaviour. I guess it is because nz is also neaded to calculate the correct byte offset.
I would happily submit a pull request but I'm sure @IvanaEscobar had a reason to introduce this line so curious what the reason was so we can resolve.