{"action":"opened","issue":{"url":"https://api.github.com/repos/Unidata/thredds/issues/535","repository_url":"https://api.github.com/repos/Unidata/thredds","labels_url":"https://api.github.com/repos/Unidata/thredds/issues/535/labels{/name}","comments_url":"https://api.github.com/repos/Unidata/thredds/issues/535/comments","events_url":"https://api.github.com/repos/Unidata/thredds/issues/535/events","html_url":"https://github.com/Unidata/thredds/issues/535","id":148543055,"number":535,"title":"netCDF4 writing","user":{"login":"lesserwhirls","id":67096,"avatar_url":"https://avatars.githubusercontent.com/u/67096?v=3","gravatar_id":"","url":"https://api.github.com/users/lesserwhirls","html_url":"https://github.com/lesserwhirls","followers_url":"https://api.github.com/users/lesserwhirls/followers","following_url":"https://api.github.com/users/lesserwhirls/following{/other_user}","gists_url":"https://api.github.com/users/lesserwhirls/gists{/gist_id}","starred_url":"https://api.github.com/users/lesserwhirls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lesserwhirls/subscriptions","organizations_url":"https://api.github.com/users/lesserwhirls/orgs","repos_url":"https://api.github.com/users/lesserwhirls/repos","events_url":"https://api.github.com/users/lesserwhirls/events{/privacy}","received_events_url":"https://api.github.com/users/lesserwhirls/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Unidata/thredds/labels/Area:%20NetCDF-4","name":"Area: NetCDF-4","color":"bfdadc"},{"url":"https://api.github.com/repos/Unidata/thredds/labels/Area:%20NetCDF-Java","name":"Area: NetCDF-Java","color":"c7def8"},{"url":"https://api.github.com/repos/Unidata/thredds/labels/Area:%20TDS","name":"Area: TDS","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/Unidata/thredds/milestones/3","html_url":"https://github.com/Unidata/thredds/milestones/Bug%20fixes%20and%20docs%20for%204.x%20branch","labels_url":"https://api.github.com/repos/Unidata/thredds/milestones/3/labels","id":1487781,"number":3,"title":"Bug fixes and docs for 4.x branch","description":"The next iteration of bug fixes and docs on 4.6 branch","creator":{"login":"lesserwhirls","id":67096,"avatar_url":"https://avatars.githubusercontent.com/u/67096?v=3","gravatar_id":"","url":"https://api.github.com/users/lesserwhirls","html_url":"https://github.com/lesserwhirls","followers_url":"https://api.github.com/users/lesserwhirls/followers","following_url":"https://api.github.com/users/lesserwhirls/following{/other_user}","gists_url":"https://api.github.com/users/lesserwhirls/gists{/gist_id}","starred_url":"https://api.github.com/users/lesserwhirls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lesserwhirls/subscriptions","organizations_url":"https://api.github.com/users/lesserwhirls/orgs","repos_url":"https://api.github.com/users/lesserwhirls/repos","events_url":"https://api.github.com/users/lesserwhirls/events{/privacy}","received_events_url":"https://api.github.com/users/lesserwhirls/received_events","type":"User","site_admin":false},"open_issues":14,"closed_issues":5,"state":"open","created_at":"2016-01-06T16:26:50Z","updated_at":"2016-04-15T03:07:21Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2016-04-15T03:07:21Z","updated_at":"2016-04-15T03:07:21Z","closed_at":null,"body":"Related to Unidata/thredds#534. I feel we need to make a call to the HDF5 lib when we load netCDF-C to ensure 1.8.x compatibility, no if, ands, or buts. hehehe. But seriously, we don't need servers creating netCDF4 files that can only be read if users built netCDF-C with the latest version of the HDF5 lib. Based on the comments in Unidata/netcdf-c#250, this seems like the call we need to make:\r\n\r\nhttps://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetLibverBounds\r\n\r\nThe link is sort of slow to load, so here are the docs for the function:\r\n\r\n```\r\nName: H5Pset_libver_bounds\r\nSignature:\r\nherr_t H5Pset_libver_bounds( hid_t fapl_id, H5F_libver_t low, H5F_libver_t high )\r\nPurpose:\r\nSets bounds on library versions, and indirectly format versions, to be used when creating objects.\r\nDescription:\r\nH5Pset_libver_bounds controls the versions of the object formats that will be used when creating \r\nobjects in a file. The object format versions are determined indirectly from the HDF5 Library \r\nversions specified in the call.\r\nThis property is set in the file access property list specified by fapl_id.\r\n\r\nParameters:\r\nhid_t fapl_id\t        IN: File access property list identifier\r\nH5F_libver_t low    \tIN: The earliest version of the library that will be used for writing objects. \r\nThe library version indirectly specifies the earliest object format version that can be used when \r\ncreating objects in the file.\r\nCurrently, low must be one of two pre-defined values:\r\n\r\nSetting low to H5F_LIBVER_EARLIEST will result in objects being created using the earliest possible \r\nformat for each object. Note that earliest possible is different from earliest, as some features introduced \r\nin library versions later than 1.0.0 resulted in updates to object formats. With \r\nlow=H5F_LIBVER_EARLIEST, if the application creates an object that requires a feature introduced in \r\nlibrary versions later than 1.0.0, the earliest possible version that supports the requested feature will be \r\nused.\r\n\r\nThe upper bound on the range of possible library versions used to create the object is controlled by the \r\nhigh parameter.\r\n\r\nThis is the default behavior of the library if H5Pset_libver_bounds is not called.\r\n\r\nSetting low to H5F_LIBVER_LATEST will result in objects being created using the latest available format \r\nfor each object. This setting means that objects will be created with the latest format versions available \r\n(within the range of library versions specified in the call), and can take advantage of the latest features \r\nand performance enhancements. Objects written with the H5F_LIBVER_LATEST setting for low may be \r\naccessible to a smaller range of library versions than would be the case if the H5F_LIBVER_EARLIEST \r\nvalue had been used.\r\n\r\nThe upper bound on the range of possible library versions used to create the object is controlled by the \r\nhigh parameter.\r\n\r\nH5F_libver_t high    \tIN: The latest version of the library that will be used for writing objects. The \r\nlibrary version indirectly specifies the latest object format version that can be used when creating objects \r\nin the file.\r\n\r\nCurrently, high must be set to the pre-defined value H5F_LIBVER_LATEST. H5F_LIBVER_LATEST \r\ncorresponds to the version of the HDF5 Library in use. \r\n\r\nReturns:\r\n\r\nReturns a non-negative value if successful; otherwise returns a negative value.\r\n```\r\n\r\nWe should be able to use\r\n\r\n```\r\nH5Pset_libver_bounds (file_id, low=H5F_LIBVER_EARLIEST_F, high=H5F_LIBVER_LATEST_F)\r\n```\r\n\r\nand the netCDF4 files we write out will be just fine for netCDF-C built with v1.8.x of HDF5."}}