This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Hi Jeremy, > Filed on github, along with a link to a repro: > https://github.com/Unidata/netcdf-c/issues/116 Thanks for the comprehensive test. I can reproduce the problem here on our latest developer snapshot. There is another workaround than just not creating dimensions and variables with the same name that aren't coordinate variables. My tests show that if the order of the operations is changed to: 1. create the dimensions A and B 2. create the variables A[B] and B[A], 3. write data to the variables then this works fine with netCDF-4, as can be demonstrated with the 10-line file appended below and the use of ncgen to create the netCDF-4 file: $ cat names.cdl netcdf names { dimensions: A = 10; B = 10; variables: int A(B); int B(A); data: A = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9; B= 0, 1, 2, 3, 4, 5, 6, 7, 8, 9; } $ ncgen -b -k4 names.cdl; ncdump -k names.nc netCDF-4 classic model Nevertheless, doing things in a different order should still work. Thanks for reporting the bug! --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: SRG-700835 Department: Support netCDF Priority: Normal Status: Closed