Hi Kent, It is a concern, certainly, that our users may use an attribute/name pair CLASS/IMAGE, and be confused about why it doesn't work. Ideally we'd be able to set an error code indicating that a reserved keyword was used. Since it doesn't look like that's the case, documenting this will probably be sufficient, especially without anybody else having encountered/reported this issue. We could always implement our own list of reserved keywords in nccopy/ncgen for various file types and throw a warning there, I suppose. It wouldn't be hard, but it is also relatively low priority for the moment. -Ward On Thu, Jan 14, 2016 at 3:03 PM, Kent Yang <address@hidden> wrote: > New Client Reply: nccopy cannot copy a nc3 file to a nc4 file > > Hi Ward, > > Thanks for looking into this quickly. > I just checked the latest HDF5 trunk version. H5DSattach_scale only > returns FAIL if anything goes wrong and there is one line coding as > /*check if the dataset is a "reserved" dataset(image,table)*/, > If yes, return FAIL. > > Any thoughts on what you expect the DSattach_scale to retun? > Are you concerned that the some NetCDF users may use the attribute CLASS > and assign a name IMAGE; the DS restriction may avoid them creating a valid > file? > > Kent > > -----Original Message----- > From: Unidata netCDF Support [mailto:address@hidden > Sent: Thursday, January 14, 2016 3:11 PM > To: Kent Yang > Cc: address@hidden > Subject: [netCDF #PJC-712062]: nccopy cannot copy a nc3 file to a nc4 file > > Hi Kent, > > Thanks for the additional information; we'll have to discuss how to handle > this internally, since we'll definitely want to handle this but we also > don't want to modify an end-user data set programatically. Do you know > offhand if H5DSattach_scale sets/returns any sort of error code or throws a > signal we can catch, in addition to returning FAIL? > > -Ward > > address@hidden> > wrote: > > > New Client Reply: nccopy cannot copy a nc3 file to a nc4 file > > > > I did a little more investigation of the original HDF5 that may be > helpful. > > In the original nc3 file, the attribute CLASS=IMAGE. This is a special > > convention for an HDF5 high-level image file. > > I think nccopy fails when calling H5DSattach_scale. In the function > > H5DSattach_scale, it will return FAIL if this dataset is an > > image(CLASS=IMAGE) or table(CLASS = TABLE). > > HDF5 IMAGE and TABLE cannot have dimension scales. > > > > One solution for this problem is to check if the attribute CLASS is > > IMAGE or TABLE, don't attach the scale if finding the variable is > > actually HDF5 image or table. > > > > Hope it helps, > > > > Kent > > -----Original Message----- > > From: Unidata netCDF Support [mailto:address@hidden > > Sent: Wednesday, January 13, 2016 3:10 PM > > To: Kent Yang > > Cc: address@hidden > > Subject: [netCDF #PJC-712062]: nccopy cannot copy a nc3 file to a nc4 > > file > > > > I have recreated the error using cygwin. > > > > A couple of things I noticed so far: > > 1. It appears to actually create the output netcdf4 file. > > 2. A diff of the metadata appears to show that the netcdf3 metadata > > and the netcdf4 metadata are consistent except that the netcdf4 > > metadata is missing all attributes named 'CLASS' or 'NAME'. > > Weird. > > > > =Dennis Heimbigner > > Unidata > > > > > > Ticket Details > > =================== > > Ticket ID: PJC-712062 > > Department: Support netCDF > > Priority: Normal > > Status: Closed > > > > > > > > Ticket Details > > =================== > > Ticket ID: PJC-712062 > > Department: Support netCDF > > Priority: Normal > > Status: Open > > Link: > > https://andy.unidata.ucar.edu/esupport/staff/index.php?_m=tickets&_a=v > > iewticket&ticketid=26542 > > > > > > > > Ticket Details > =================== > Ticket ID: PJC-712062 > Department: Support netCDF > Priority: Normal > Status: Open > > > > Ticket Details > =================== > Ticket ID: PJC-712062 > Department: Support netCDF > Priority: Normal > Status: Open > Link: > https://andy.unidata.ucar.edu/esupport/staff/index.php?_m=tickets&_a=viewticket&ticketid=26542 > > Ticket Details =================== Ticket ID: PJC-712062 Department: Support netCDF Priority: Normal Status: Open
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.