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