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 Si, > I am working with netcdf 4.2 Fortran, C, and C++ version. > When I ran the nc-config command, the output looks like this: > > nc-config --all > > This netCDF 4.2 has been built with the following features: > --cc -> gcc > --cflags -> -I/glade/apps/opt/netcdf/4.2/gnu/4.4.6/include > -I/glade/apps/opt/hdf5/1.8.9/gnu/4.4.6/include > -I/glade/apps/opt/szlib/2.1/gnu/4.4.6/include > --libs -> -L/glade/apps/opt/netcdf/4.2/gnu/4.4.6/lib -lnetcdf > --cxx -> @CXX@ > --has-c++ -> @HAS_CXX@ > --fc -> @FC@ > --fflags -> @FFLAGS@ @MOD_FLAG@/glade/apps/opt/netcdf/4.2/gnu/4.4.6/include > --flibs -> -L/glade/apps/opt/netcdf/4.2/gnu/4.4.6/lib @NC_FLIBS@ > --has-f77 -> @HAS_F77@ > --has-f90 -> @HAS_F90@ > --has-dap -> yes > --has-nc2 -> yes > --has-nc4 -> yes > --has-hdf5 -> yes > --has-hdf4 -> no > --has-pnetcdf-> no > --has-szlib -> > --prefix -> /glade/apps/opt/netcdf/4.2/gnu/4.4.6 > --includedir-> /glade/apps/opt/netcdf/4.2/gnu/4.4.6/include > --version -> netCDF 4.2 > > My understanding is those Fortran/C++ flags(e.g. @HAS_F77@) should be > obtained from nf-config or ncxx4-config command, they are not necessary > here for C version at all. I have not seen any problem with this netcdf > so far but believe it will look much better if nc-config only shows the > necessary parts. Actually, several C users have requested that nc-config continue to report on Fortran flags and libraries, because otherwise that breaks Makefiles that use nc-config for this information, see: https://www.unidata.ucar.edu/jira/browse/NCF-179 So I fixed nc-config to detect whether nf-config is installed, and if so, to call it to get the needed information. The fixed version of nc-config is in the netCDF-4.2.1-rc1 release candidate, which you can get from here, if you want to test it and report on any problems you find: ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4.2.1-rc1.tar.gz > We also noticed that there are a lot of changes in the new CPP version > of netcdf. Do you have the documentation that describes all your recent > changes? Previous CPP programs written with netcdf previous versions > are not compatible with the new netcdf 4.2 now. I have not found the > information I need in the Release Notes. We make available two versions of the C++ API, as announced on the netcdfgroup mailing list: http://www.unidata.ucar.edu/mailing_lists/archives/netcdfgroup/2011/msg00365.html They are distributed separately from the C library distribution, so we aren't documenting C++ API changes in the C release notes. It looks like there are no release notes in the netcdf-cxx4 distribution, but there is an overview of the changes here: http://www.unidata.ucar.edu/netcdf/docs/cxx4/ Our intention is that new programs will use the new release, but that the old release will still work with new netCDF C releases. If that's not the case, please let us know. Thanks. --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: MBM-356064 Department: Support netCDF Priority: Normal Status: Closed