Go to file
Dennis Heimbigner ec5b3f9a4f Regularize the scoping of dimensions
This is a follow-on to pull request
````https://github.com/Unidata/netcdf-c/pull/1959````,
which fixed up type scoping.

The primary changes are to _nc\_inq\_dimid()_ and to ncdump.

The _nc\_inq\_dimid()_ function is supposed to allow the name to be
and FQN, but this apparently never got implemented. So if was modified
to support FQNs.

The ncdump program is supposed to output fully qualified dimension names
in its generated CDL file under certain conditions.

Suppose ncdump has a netcdf-4 file F with variable V, and V's parent group
is G. For each dimension id D referenced by V, ncdump needs to determine
whether to print its name as a simple name or as a fully qualified name (FQN).

The algorithm is as follows:

1. Search up the tree of ancestor groups.
2. If one of those ancestor groups contains the dimid, then call it dimgrp.
3. If one of those ancestor groups contains a dim with the same name as the dimid, but with a different dimid, then record that as duplicate=true.
4. If dimgrp is defined and duplicate == false, then we do not need an fqn.
5. If dimgrp is defined and duplicate == true, then we do need an fqn to avoid incorrectly using the duplicate.
6. If dimgrp is undefined, then do a preorder breadth-first search of all the groups looking for the dimid.
7. If found, then use the fqn of the first found such dimension location.
8. If not found, then fail.

Test case ncdump/test_scope.sh was modified to test the proper
operation of ncdump and _nc\_inq\_dimid()_.

Misc. Other Changes:
* Fix nc_inq_ncid (NC4_inq_ncid actually) to return root group id if the name argument is NULL.
* Modify _ncdump/printfqn_ to print out a dimid FQN; this supports verification that the resulting .nc files were properly created.
2021-05-31 15:51:12 -06:00
.github Regularize the scoping of dimensions 2021-05-31 15:51:12 -06:00
cmake Add zip file support 2021-01-28 20:11:01 -07:00
conda.recipe Attempting appveyor support. Based on work by @ocefpaf, see https://github.com/Unidata/netcdf-c/pull/347 for more information. 2018-04-24 11:28:22 -06:00
ctest_scripts Added a ctest script with DAP tests enabled. 2020-02-11 15:09:29 -07:00
dap4_test Fix Mingw versus XGetopt (again) 2021-05-26 14:27:27 -06:00
debug Codify cross-platform file paths 2021-03-04 13:41:31 -07:00
docs Updated doxyfile to include libnczarr/zarr.c, also removed references to files that have been removed. 2021-03-30 13:53:16 -06:00
examples Mostly revert the filter code to reduce its complexity of use. 2020-09-27 12:43:46 -06:00
h5_test Fix tst_h_atts3 for hdf5 1.12 2021-04-10 19:51:58 -06:00
hdf4_test Spelling fixes 2019-09-18 08:03:01 -06:00
include Regularize the scoping of dimensions 2021-05-31 15:51:12 -06:00
libdap2 Fix JSON quoted string processing in libnczarr 2021-05-06 16:39:44 -06:00
libdap4 Unify definition of NC_DISPATCH_VERSION 2021-01-31 21:40:08 -07:00
libdispatch Regularize the scoping of dimensions 2021-05-31 15:51:12 -06:00
libhdf4 Provide a Number of fixes/improvements to NCZarr 2020-11-19 17:01:04 -07:00
libhdf5 Improve error message when non-existent filter is encountered. 2021-05-17 19:49:58 -06:00
liblib Updated SO version in preparation for public release. 2021-03-19 10:36:13 -06:00
libnczarr Merge branch 'master' into badfilter.dmh 2021-05-27 12:30:39 -06:00
libsrc Codify cross-platform file paths 2021-03-04 13:41:31 -07:00
libsrc4 Regularize the scoping of dimensions 2021-05-31 15:51:12 -06:00
libsrcp Mostly revert the filter code to reduce its complexity of use. 2020-09-27 12:43:46 -06:00
nc_perf Additional Fixes to NCZarr 2020-12-16 20:48:02 -07:00
nc_test Addendum: This PR has been extended to include 2021-04-02 18:39:50 -06:00
nc_test4 Regularize the scoping of dimensions 2021-05-31 15:51:12 -06:00
ncdap_test Allow .rc tests to work in parallel by isolation 2021-04-25 22:02:29 -06:00
ncdump Regularize the scoping of dimensions 2021-05-31 15:51:12 -06:00
ncgen Fix Mingw versus XGetopt (again) 2021-05-26 14:27:27 -06:00
ncgen3 Fix Mingw versus XGetopt (again) 2021-05-26 14:27:27 -06:00
nctest Spelling fixes 2019-09-18 08:03:01 -06:00
nczarr_test Merge branch 'master' into xgetoptmingw.dmh 2021-05-27 14:07:18 -06:00
NUG Removed NUG files, added a README.md file directing people to the correct location. 2020-10-06 11:13:56 -06:00
oc2 LGTM cleanup 2021-04-24 21:44:57 -06:00
plugins Regularize the scoping of dimensions 2021-05-31 15:51:12 -06:00
unit_test Fix shell handling of escapes 2021-04-21 14:59:15 -06:00
.gitignore Fix JSON quoted string processing in libnczarr 2021-05-06 16:39:44 -06:00
acinclude.m4 Merge branch 'master' into ejh_cleanup 2018-04-02 18:11:58 -06:00
appveyor.yml unblock dmh appveyor 2020-12-02 18:17:07 -07:00
bootstrap Renamed autogen file. 2019-01-16 11:22:17 -07:00
cmake_uninstall.cmake.in Misc. files updated with copyright stanza. 2018-12-06 15:51:35 -07:00
CMakeInstallation.cmake Move away from deprecated PackageManager to the productbuild generator. 2019-02-05 13:08:30 -07:00
CMakeLists.txt Merge pull request #1973 from gsjaardema/patch-48 2021-05-27 12:31:30 -06:00
COMPILE.cmake.txt Merging from CMake branch in preparation for 4.3.0 release. 2013-04-29 20:15:57 +00:00
config.h.cmake.in Merge branch 'dispatchversion.dmh' of https://github.com/DennisHeimbigner/netcdf-c into 4.8.0-wellspring-prs.wif 2021-03-22 12:41:03 -06:00
config.h.cmake.in.old-works c: remove __CHAR_UNSIGNED__ 2018-02-14 17:24:49 -05:00
configure.ac More cygwin fixes 2021-05-19 21:04:53 -06:00
COPYRIGHT Modifying COPYRIGHT to reflect a standardized license, the BSD 3-clause license. 2018-12-04 15:17:54 -07:00
CTestConfig.cmake.in Adding new security stance to cdash instance. 2019-11-18 10:58:44 -07:00
CTestCustom.cmake Misc. files updated with copyright stanza. 2018-12-06 15:51:35 -07:00
dods.m4 Spelling fixes 2019-09-18 08:03:01 -06:00
FixBundle.cmake.in Misc. files updated with copyright stanza. 2018-12-06 15:51:35 -07:00
INSTALL.md Added a note about running autoreconf -if in support of https://github.com/Unidata/netcdf-c/issues/1397 2019-08-27 11:24:25 -06:00
lib_flags.am Fix out of tree builds with configure - add $(top_builddir)/include to include directory search 2021-04-10 17:57:55 -06:00
libnetcdf.settings.in Upgrade the nczarr code to match Zarr V2 2021-04-24 19:48:15 -06:00
Makefile.am Revert "Revert "Fix nczarr-experimental: improve build support, disengage hdf5 vs netcdf4 flags, and find AWS libraries"" 2020-08-17 19:15:47 -06:00
mclean Fix pull request https://github.com/Unidata/netcdf-c/pull/374 (dap4.dmh) 2017-04-03 21:39:44 -06:00
nc-config.cmake.in Improve the building of NCZARR S3 support in CMake and Autoconf 2020-10-16 15:04:51 -06:00
nc-config.in Improve the building of NCZARR S3 support in CMake and Autoconf 2020-10-16 15:04:51 -06:00
netcdf.pc.in Fix typo, exploring solution to https://github.com/Unidata/netcdf-c/issues/1324 2019-02-27 14:14:53 -07:00
netCDFConfig.cmake.in Correct typo. 2020-01-24 16:53:16 -07:00
PostInstall.cmake Reorganized postinstall scripts. 2014-11-18 12:52:41 -07:00
postinstall.sh.in Fix typo postinstall. 2020-08-06 15:27:20 -04:00
README.md Update links to netCDF-java documentation. 2021-02-26 15:11:10 -07:00
RELEASE_NOTES.md Merge branch 'master' into ncdumpvlenbug.dmh 2021-05-27 14:50:05 -06:00
test_common.in fix cygwin build 2021-05-19 17:19:33 -06:00
test_prog.c Misc. files updated with copyright stanza. 2018-12-06 15:51:35 -07:00
test-driver-verbose The Jetstream remote test server is now working. 2018-06-26 13:58:45 -06:00
travis.yml Additional Fixes to NCZarr 2020-12-16 20:48:02 -07:00
wjna Backadded the fix of Jira-228 2014-06-13 13:41:11 -06:00

Unidata NetCDF

Build Status Coverity Scan Build Status

About

The Unidata network Common Data Form (netCDF) is an interface for scientific data access and a freely-distributed software library that provides an implementation of the interface. The netCDF library also defines a machine-independent format for representing scientific data. Together, the interface, library, and format support the creation, access, and sharing of scientific data. The current netCDF software provides C interfaces for applications and data. Separate software distributions available from Unidata provide Java, Fortran, Python, and C++ interfaces. They have been tested on various common platforms.

Properties

NetCDF files are self-describing, network-transparent, directly accessible, and extendible. Self-describing means that a netCDF file includes information about the data it contains. Network-transparent means that a netCDF file is represented in a form that can be accessed by computers with different ways of storing integers, characters, and floating-point numbers. Direct-access means that a small subset of a large dataset may be accessed efficiently, without first reading through all the preceding data. Extendible means that data can be appended to a netCDF dataset without copying it or redefining its structure.

Use

NetCDF is useful for supporting access to diverse kinds of scientific data in heterogeneous networking environments and for writing application software that does not depend on application-specific formats. For information about a variety of analysis and display packages that have been developed to analyze and display data in netCDF form, see

More information

For more information about netCDF, see

Latest releases

You can obtain a copy of the latest released version of netCDF software for various languages:

Copyright and licensing information can be found here, as well as in the COPYRIGHT file accompanying the software

Installation

To install the netCDF-C software, please see the file INSTALL in the netCDF-C distribution, or the (usually more up-to-date) document:

Documentation

A language-independent User's Guide for netCDF, and some other language-specific user-level documents are available from:

A mailing list, netcdfgroup@unidata.ucar.edu, exists for discussion of the netCDF interface and announcements about netCDF bugs, fixes, and enhancements. For information about how to subscribe, see the URL

Feedback

We appreciate feedback from users of this package. Please send comments, suggestions, and bug reports to support-netcdf@unidata.ucar.edu.