netcdf-c/libdispatch
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
..
CMakeLists.txt Provide a Number of fixes/improvements to NCZarr 2020-11-19 17:01:04 -07:00
datt.c This PR adds EXPERIMENTAL support for accessing data in the 2020-06-28 18:02:47 -06:00
dattget.c added anchors for reading_attributes and writing_attributes, and refs to them, also changed order of files in Doxygen.in 2019-11-08 05:19:51 -07:00
dattinq.c
dattput.c added anchors for reading_attributes and writing_attributes, and refs to them, also changed order of files in Doxygen.in 2019-11-08 05:19:51 -07:00
dauth.c Provide a Number of fixes/improvements to NCZarr 2020-11-19 17:01:04 -07:00
daux.c Add zip file support 2021-01-28 20:11:01 -07:00
dcompound.c
dcopy.c Regularize the scoping of dimensions 2021-05-31 15:51:12 -06:00
dcrc32.c Make use of clock_gettime be conditional. 2020-12-06 18:19:53 -07:00
dcrc32.h Provide a Number of fixes/improvements to NCZarr 2020-11-19 17:01:04 -07:00
dcrc64.c Make use of clock_gettime be conditional. 2020-12-06 18:19:53 -07:00
ddim.c
ddispatch.c Upgrade the nczarr code to match Zarr V2 2021-04-24 19:48:15 -06:00
defcheck.c
denum.c
derror.c Improve error message when non-existent filter is encountered. 2021-05-17 19:49:58 -06:00
dfile.c Codify cross-platform file paths 2021-03-04 13:41:31 -07:00
dfilter.c Mostly revert the filter code to reduce its complexity of use. 2020-09-27 12:43:46 -06:00
dfilterx.c This PR adds EXPERIMENTAL support for accessing data in the 2020-06-28 18:02:47 -06:00
dgroup.c
dhttp.c Merge branch 'master' into dispatchversion.dmh 2021-03-22 12:40:09 -06:00
dinfermodel.c Merge branch 'master' into typescope.dmh 2021-05-27 14:13:14 -06:00
dinternal.c
dnotnc3.c
dnotnc4.c Mostly revert the filter code to reduce its complexity of use. 2020-09-27 12:43:46 -06:00
doffsets.c
dopaque.c
dparallel.c documentation improvements for nc_var_par_access() 2020-03-02 16:36:56 -07:00
dpathmgr.c Fix NCclosedir in dpathmgr.c 2021-05-18 14:06:12 -06:00
drc.c Allow .rc tests to work in parallel by isolation 2021-04-25 22:02:29 -06:00
dreadonly.c
dstring.c
dtype.c
durlmodel.c Prepare for the path management code 2020-10-13 19:12:15 -06:00
dutf8.c
dutil.c Fix shell handling of escapes 2021-04-21 14:59:15 -06:00
dv2i.c
dvar.c Mostly revert the filter code to reduce its complexity of use. 2020-09-27 12:43:46 -06:00
dvarget.c removed non-relaxed coord bounds from test code 2019-11-26 06:20:34 -07:00
dvarinq.c cleanup 2020-04-15 05:53:59 -06:00
dvarput.c now always relax! 2019-11-26 05:36:16 -07:00
dvlen.c
json.c
Makefile.am Provide a Number of fixes/improvements to NCZarr 2020-11-19 17:01:04 -07:00
nc.c
ncbytes.c Working on autoconf-based build on OSX 2020-09-15 14:56:12 -06:00
ncexhash.c Additional Fixes to NCZarr 2020-12-16 20:48:02 -07:00
nchashmap.c Provide a Number of fixes/improvements to NCZarr 2020-11-19 17:01:04 -07:00
nclist.c This PR adds EXPERIMENTAL support for accessing data in the 2020-06-28 18:02:47 -06:00
nclistmgr.c
nclog.c Add zip file support 2021-01-28 20:11:01 -07:00
ncsettings.hdr
nctime.c Fix for :60 seconds in ncdump 2021-01-26 10:24:43 +02:00
ncuri.c Codify cross-platform file paths 2021-03-04 13:41:31 -07:00
ncxcache.c Additional Fixes to NCZarr 2020-12-16 20:48:02 -07:00
netcdf.m4
stubdef.c
u8.c
u8.h
utf8proc_data.c
utf8proc.c
utf8proc.h