NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
Gabriel Mateescu <gabriel@xxxxxxxxxx> writes: > Hi, > > Many thanks to Russ and David Pierce for the tips. > > With ncgen I generated a netcdf-4 classic and > a netcdf-4 file by using the command line options > -k "netCDF-4 classic model" and -k "netCDF-4", > respectively. > > The nc files generated this way have the expected format: > >   $ ncdump -k sample4.nc >   netCDF-4 > >   $ ncdump -k sample4-classic.nc >   netCDF-4 classic model > > and differ in length by 13 bytes: > >     $ ls -l sample4*nc >    -rw-r--r-- 1 gabriel users 15695 Dec 21 17:29 sample4-classic.nc >    -rw-r--r-- 1 gabriel users 15708 Dec 21 16:44 sample4.nc > > which is exactly the length of the string "classic model". So I > checked if the difference in the files comes only from meta-data > >   $ od -c sample4.nc | more                       >   0000000 211  H  D  F \r \n 032 \n 002 \b \b \0 > \0 \0 \0 \0 >   0000020 \0 \0 \0 \0 377 377 377 377 377 377 377 377  \  = > \0 \0 >   0000040 \0 \0 \0 \0  0 \0 \0 \0 \0 \0 \0 \0 332 > 323  H  * >   ... > >   $ od -c sample4-classic.nc | more                    >                  >   0000000 211  H  D  F \r \n 032 \n 002 \b \b \0 > \0 \0 \0 \0 >   0000020 \0 \0 \0 \0 377 377 377 377 377 377 377 377  O  = > \0 \0 >   0000040 \0 \0 \0 \0  0 \0 \0 \0 \0 \0 \0 \0  > I 263  j  } >   ... > > The dump seems to indicate that the data in netCDF-4 is > different from that in neCDF-4 classic, even though I have > not used any "new" API features (these files are obtained from > a cdl file with ncgen). Or am I interpreting incorrectly the output > from "od" ? > > Thank you. > Gabriel > The only difference between netCDF-4 classic model and netCDF-4 is the extra attribute, marking it as classic model. The data should be the same. Use ncdump to check it. Thanks, Ed -- Ed Hartnett -- ed@xxxxxxxxxxxxxxxx
netcdfgroup
archives: