NetCDF Digest - Vol 1 : Issue 20

Harvey Davies (hld@xxxxxxxxxxxx) writes:

> We use both netCDF and CDF and it would be convenient to distinguish
> between them using different conventional file extensions.  I propose
> defining a new recommended file extension for netCDF.  I suggest ".nc".

I think this is a good suggestion, though I wish we had thought of it
earlier.  This would lessen the confusion between CDF and netCDF, and would
correct the early error of choosing the same file extension.  The history of
this choice is that we came up with a single-file implementation of the CDF
model using the ".cdf" extension when NASA/NSSDC already had a multi-file
implementation that required n+2 files for an n-variable dataset, with
extensions ".CDF", ".CDH", ".V01", ".V02", ..., ".Vnn".  Our single-file
implementation on Unix had a lower-case extension ".cdf", but we should have
foreseen the conflict this would create with NSSDC's CDF when it was ported
to Unix.

I don't know of any existing conflicts with the ".nc" extension.  However
there may be archives of netCDF files for which changing the file extension
is impractical.  There are by now probably a number of other software
packages than ours that makes use of the ".cdf" extension for netCDF files.
Hence changing from a ".cdf" extension to ".nc" may be disruptive.  Therefor
I agree that we should continue to support the old ".cdf" extension while
encouraging use of the ".nc" extension for future datasets.

> ncgen appends the ".cdf" extension if "-o outputfile" is not specified.
> This appears to be the only place where ".cdf" is built into the
> standard netCDF software.

Yes, of our netCDF software, only ncgen currently makes use of this
extension.  Applcation packages that use it could be changed to accept
either ".cdf" or ".nc" files.

>                            I suggest a new flag (say -N) similar to -n,
> except that it would generate the new default file extension. Note that
> -n would be retained for compatibility and would still produce ".cdf".

Unfortunately the "-N" and "-n" arguments could not easily be distinguished
on MSDOS systems, and would be inconvenient on VMS systems.  I suggest that
ncgen should use a "-b" flag (for binary) to specify the generation of a
binary netCDF dataset with the extension ".nc".  I agree that the old "-n"
action should be supported for backward compatibility, but its use for
future datasets should be deprecated, after the next release of the netCDF
software.

> It would be necessary to modify the "NetCDF User's Guide". I suggest it
> should mention both the new recommended extension & the old obsolete
> ".cdf".

I am willing to make such modifications, and again agree with your
suggestion.

If anyone knows of an existing conflict with the ".nc" extension, or wants
to argue why it is too late to begin changing the netCDF file extension from
".cdf" to ".nc", please let us know.  Thanks.

________________________________________________________________________

Russ Rew
Unidata Program Center
russ@xxxxxxxxxxxxxxxx


  • 1993 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: