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 Sourish, I verified the problem and see that Jeff Whitaker has reported a simplified version of it using the C API. It appears that the conditions required to trigger this are - using the netCDF-4 format - creating dimensions in one order - defining the corresponding coordinate variables in a different order It's amazing to me that our umpteen thousand tests never tested this particular case, but a quick workaround would be to define the coordinate variables in the same order as the dimensions, until we get this fixed. Thanks for reporting the bug! --Russ > I created the file using python's netCDF4 module, available at > http://code.google.com/p/netcdf4-python/. The actual code is part of a > bigger program, so I'm attaching some code that looks similar to the > relevant part of the program, and reproduces the problem. I'm afraid > that you might think that this is a python-netcdf4 issue, but I doubt > that. After all, ncdump and h5dump are giving me different results, and > neither have anything to do with python. > > To use the code, I did the following from the IPython prompt: > > [1]: %run TestNCDF4 > > [2]: x = TesNCDF4() > > [3]: x.WriteFile() > > Then I executed 'ncdump' and 'h5dump' to view the contents. Some more > information about my libraries you might find useful: > > $ ncdump > ncdump [-c|-h] [-v ...] [[-b|-f] [c|f]] [-l len] [-n name] [-p n[,n]] > [-k] [-x] [-s] [-t] [-w] file > <snip> > netcdf library version 4.1 of Feb 12 2010 16:32:10 $ > > $ ldd `which ncdump` > linux-vdso.so.1 => (0x00007fff18e97000) > libnetcdf.so.6 => /usr/local/lib/libnetcdf.so.6 (0x00007f093848d000) > libhdf5_hl.so.6 => /usr/local/lib/libhdf5_hl.so.6 > (0x00007f093825a000) > libhdf5.so.6 => /usr/local/lib/libhdf5.so.6 (0x00007f0937caa000) > libsz.so.2 => /usr/local/lib/libsz.so.2 (0x00007f0937a96000) > libm.so.6 => /lib/libm.so.6 (0x00007f0937812000) > libz.so.1 => /lib/libz.so.1 (0x00007f09375fb000) > libc.so.6 => /lib/libc.so.6 (0x00007f093728c000) > /lib64/ld-linux-x86-64.so.2 (0x00007f09387a0000) > > $ h5dump -V > h5dump: Version 1.8.4 > > $ ldd `which h5dump` > linux-vdso.so.1 => (0x00007fff8ccb5000) > libhdf5.so.6 => /usr/local/lib/libhdf5.so.6 (0x00007ff87cc9a000) > libsz.so.2 => /usr/local/lib/libsz.so.2 (0x00007ff87ca86000) > libz.so.1 => /lib/libz.so.1 (0x00007ff87c86f000) > libm.so.6 => /lib/libm.so.6 (0x00007ff87c5eb000) > libc.so.6 => /lib/libc.so.6 (0x00007ff87c27c000) > /lib64/ld-linux-x86-64.so.2 (0x00007ff87d24a000) > > $ ldd /usr/local/lib/python2.6/dist-packages/netCDF4.so > linux-vdso.so.1 => (0x00007fff4f5ff000) > libnetcdf.so.6 => /usr/local/lib/libnetcdf.so.6 (0x00007fa860208000) > libhdf5.so.6 => /usr/local/lib/libhdf5.so.6 (0x00007fa85fc58000) > libhdf5_hl.so.6 => /usr/local/lib/libhdf5_hl.so.6 > (0x00007fa85fa24000) > libz.so.1 => /lib/libz.so.1 (0x00007fa85f7e8000) > libpthread.so.0 => /lib/libpthread.so.0 (0x00007fa85f5cc000) > libc.so.6 => /lib/libc.so.6 (0x00007fa85f25c000) > libsz.so.2 => /usr/local/lib/libsz.so.2 (0x00007fa85f048000) > libm.so.6 => /lib/libm.so.6 (0x00007fa85edc4000) > /lib64/ld-linux-x86-64.so.2 (0x00007fa8607c5000) > > $ gcc -v > Using built-in specs. > Target: x86_64-linux-gnu > Configured with: ../src/configure -v --with-pkgversion='Ubuntu > 4.4.1-4ubuntu9' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs > --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr > --enable-shared --enable-multiarch --enable-linker-build-id > --with-system-zlib --libexecdir=/usr/lib --without-included-gettext > --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 > --program-suffix=-4.4 --enable-nls --enable-clocale=gnu > --enable-libstdcxx-debug --enable-objc-gc --disable-werror > --with-arch-32=i486 --with-tune=generic --enable-checking=release > --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu > Thread model: posix > gcc version 4.4.1 (Ubuntu 4.4.1-4ubuntu9) > > $ gfortran -v > Using built-in specs. > Target: x86_64-linux-gnu > Configured with: ../src/configure -v --with-pkgversion='Ubuntu > 4.4.1-4ubuntu9' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs > --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr > --enable-shared --enable-multiarch --enable-linker-build-id > --with-system-zlib --libexecdir=/usr/lib --without-included-gettext > --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 > --program-suffix=-4.4 --enable-nls --enable-clocale=gnu > --enable-libstdcxx-debug --enable-objc-gc --disable-werror > --with-arch-32=i486 --with-tune=generic --enable-checking=release > --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu > Thread model: posix > gcc version 4.4.1 (Ubuntu 4.4.1-4ubuntu9) > > $ g++ -v > Using built-in specs. > Target: x86_64-linux-gnu > Configured with: ../src/configure -v --with-pkgversion='Ubuntu > 4.4.1-4ubuntu9' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs > --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr > --enable-shared --enable-multiarch --enable-linker-build-id > --with-system-zlib --libexecdir=/usr/lib --without-included-gettext > --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 > --program-suffix=-4.4 --enable-nls --enable-clocale=gnu > --enable-libstdcxx-debug --enable-objc-gc --disable-werror > --with-arch-32=i486 --with-tune=generic --enable-checking=release > --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu > Thread model: posix > gcc version 4.4.1 (Ubuntu 4.4.1-4ubuntu9) > > Thanks, > > -Sourish > > Unidata netCDF Support wrote: > > Hi Sourish, > > > > Can you please make available a copy of the program that created the file? > > Thanks! > > > > --Russ > > > > Russ Rew UCAR Unidata Program > > address@hidden http://www.unidata.ucar.edu > > > > > > > > Ticket Details > > =================== > > Ticket ID: PVS-842308 > > Department: Support netCDF > > Priority: Normal > > Status: Closed > > > > > Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: PVS-842308 Department: Support netCDF Priority: Normal Status: Closed