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

removed g_ncid as the ascociated bug was fixed in c library 4.4.1 #131

Closed
wants to merge 1 commit into from
Closed

removed g_ncid as the ascociated bug was fixed in c library 4.4.1 #131

wants to merge 1 commit into from

Conversation

cptspacemanspiff
Copy link

Fixes #32 #30
Hi, So I have been digging into the global variable issue, it appears it was fixed in the C library in 2016.

specifically It seems like this was fixed in the netcdf-c 4.4.1 library:
Unidata/netcdf-c#240

If my understanding is correct, as it stands anyone using netcdf4 and defining custom types cannot have more than one file open at the same time. It also forces the custom type definition to be in the root group for netcdf4, rather than the parent group as one would expect.

I think the correct solution is to get rid of the global variable g_ncid and replace it with the groupID when calling nc_inq_type, though I am not sure what version compatibility you are targeting between this and netcdf-c.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


nlong seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@cptspacemanspiff cptspacemanspiff deleted the remove-global-g_ncid branch February 17, 2023 21:45
@cptspacemanspiff cptspacemanspiff restored the remove-global-g_ncid branch February 17, 2023 22:15
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

Successfully merging this pull request may close these issues.

Remove global ncid (g_ncid) when libnetcdf provides a null-accepting nc_inq_type()
2 participants