Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GMT crashes when dealing with classic netcdf files after 4.7.4 update #1689

Open
PaulWessel opened this issue Apr 4, 2020 · 9 comments
Open

Comments

@PaulWessel
Copy link

After my macports distro updated to netcdf 4.7.4 overnight, our GMT test suite reports these types of messages for any GMT command that tries to read one of our netcdf grids:

gmt (gmt_api.c:4658(api_import_grid)): NetCDF: Attempting netcdf-4 operation on netcdf-3 file [tut_bathy.nc]

There has been no change to GMT in regards to grid reading for weeks and all was working well yesterday. Something backwards incompatible must have been introduced - ideas?

@PaulWessel
Copy link
Author

Traced in the debugger to this line:

nc_inq_var_deflate (ncid, z_id, &shuffle, &deflate, &deflate_level);

So previous behavior was (probably) to just return if the netcdf file is not netcdf 4 but now it instead throws this message. Was the change intentional? The file in question is netcdf3 classic.

@PaulWessel PaulWessel changed the title GMT crashes when dealing with netcdf files after 4.7.4 update GMT crashes when dealing with classic netcdf files after 4.7.4 update Apr 4, 2020
@PaulWessel
Copy link
Author

We are able to work around this in the GMT repo by adding a check if the grid is netcdf4 before calling this function, but users of older GMT releases may get a surprise when their repo updates to netcdf 4.7.4.

@DennisHeimbigner
Copy link
Collaborator

DennisHeimbigner commented Apr 4, 2020 via email

@PaulWessel
Copy link
Author

OK, we have already fixed this issue in our GitHub repo. I can understand you may consider the change a netCDF bug fix in that regard, but it also breaks 10 years of backward compatibility for others I would think. Probably deserving of an entry in the release notes, though. Best, Paul

@dopplershift
Copy link
Member

I think this was fixed by #1691.

@edwardhartnett
Copy link
Contributor

This may not have been fixed by #1691. That PR fixed this problem with nc_inq_var_szip/nc_inq_var_deflate. The problem still exists with nc_inq_var_chunking and nc_inq_var_filter, if I understand correctly. I believe these will be fixed by @DennisHeimbigner .

Let me know if you need help getting these fixed.

@WardF
Copy link
Member

WardF commented Apr 13, 2020

Fwiw, once these final fixes are in, we'll be doing a quick 4.7.x release and then moving on to 4.8.x.

@DennisHeimbigner
Copy link
Collaborator

What happened to the idea of using dispatch entries
NC_SHOWOFF_xxx?

@edhartnett
Copy link
Contributor

edhartnett commented Apr 13, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants