Commit Graph

8268 Commits

Author SHA1 Message Date
Dennis Heimbigner
0e931f22a5 More cygwin fixes 2021-05-19 21:04:53 -06:00
Dennis Heimbigner
537f41aeb3 Fix 2 for cygwin build 2021-05-19 17:41:41 -06:00
Dennis Heimbigner
edc2c7af98 fix cygwin build 2021-05-19 17:19:33 -06:00
Dennis Heimbigner
453ad847b9 turn off tracing 2021-05-19 14:38:07 -06:00
Dennis Heimbigner
fba7198039 Fix NCclosedir in dpathmgr.c
re: Issue https://github.com/Unidata/netcdf-c/issues/1999

NCclosedir code is incorrect. Fix.
Note that this issue crops up when using a non-VisualStudio windows build
such as Mingw because Mingq defines dirent.h, but Visual Studio does not.

Addendum:
Fix some mingw bugs:

1. Modify XGetopt.h to be conditional on _WIN32 instead of _MSC_VER.
2. Make sure sys/stat.h is included in ncpathmgr.h
2021-05-19 14:19:28 -06:00
Ward Fisher
92e8808cd9
Merge pull request #2004 from DennisHeimbigner/dimcount.dmh
Fix counting of dimensions in ncdump
2021-05-19 11:29:48 -06:00
Dennis Heimbigner
c56133d1f9 Update Release Notes 2021-05-18 16:39:35 -06:00
Dennis Heimbigner
fbd0d73c6b Fix counting of dimensions in ncdump
re: issue https://github.com/Unidata/netcdf-c/issues/2002

It turns out that ncdump has an error where it assumes that the set of all dimension ids has no holes. That is that (maxid+1) = ndims. This is incorrect for a variety of reasons for netcdf-4.

So instead of counting total number of dimensions in a dataset, it is necessary to look for the maximum dimension id and use that when allocating a table of all dimensions.
2021-05-18 16:35:08 -06:00
Dennis Heimbigner
3194585c08 add extra test 2021-05-18 14:26:33 -06:00
Dennis Heimbigner
e196234ed9 Update RELEASENOTES 2021-05-18 14:08:41 -06:00
Dennis Heimbigner
51fa5fce1b Fix NCclosedir in dpathmgr.c
re: Issue https://github.com/Unidata/netcdf-c/issues/1999

NCclosedir code is incorrect. Fix.
Note that this issue crops up when using a non-VisualStudio windows build
such as Mingw because Mingq defines dirent.h, but Visual Studio does not.
2021-05-18 14:06:12 -06:00
Edward Hartnett
a71e777c56 improved program nc_perf/tst_gfs_data_1.c 2021-05-18 10:41:59 -06:00
Dennis Heimbigner
432477c1d0 Update RELEASE NOTES 2021-05-17 19:53:15 -06:00
Dennis Heimbigner
74e7812d83 Improve error message when non-existent filter is encountered.
re: https://github.com/Unidata/netcdf-c/issues/1996

Improve the error message and location that is reported when reading a filter with a variable that uses a filter that is not available on the reading platform.

This requires checking the availability of the filter, recording it, and failing when any attempt is made to read or write that variable. A test case was added for this in tst_filter.sh. Also, LOG level 0 message is generated giving the variable and the filter id.

Note that by design if there is no attempt to read or write the variable, then no error is reported; this means that, for example, ncdump -h will list the filter even though it is not actually available. This is important for allowing a user to see the filter details.
2021-05-17 19:49:58 -06:00
Dennis Heimbigner
00e71139f0 reset action triggers 2021-05-17 14:16:51 -06:00
Dennis Heimbigner
e82b65b7d7 Update RELEASE_NOTES.md 2021-05-14 12:08:40 -06:00
Dennis Heimbigner
6901206927 Regularize the semantics of mkstemp.
re: https://github.com/Unidata/netcdf-c/issues/1827

The issue is partly resolved by this PR. The proximate problem appears to be that the semantics of mkstemp in **nix is different than the semantics of _mktemp_s in Windows. I had thought they were the same but that is incorrect. The _mktemp_s function will only produce 26 different files and so the netcdf temp file code will fail after about that many iterations.

So, to solve this, I created my own version of mkstemp for windows that uses a random number generator. This appears to solve the reported issue.  I also added the testcase ncdap_test/test_manyurls but made it conditional on --enable-dap-long-tests because it is very slow.

I did note that the provided test program now fails after some 800 iterations with a libcurl error claiming it cannot resolve the host name. My belief is that the library is just running out of resources at this point: too many open curl handles or some such. I doubt if this failure is fixable.

So bottom line is that it is really important to do nc_close when you are finished with a file.

Misc. Other Changes:

1. I took the opportunity to clean up some bad string hacks in the code. Specifically
    * change all uses of strncat to strlcat
    * remove old string hacks: occoncat and occopycat
2. Add heck to see if test.opendap.org is running and if not, then skip test
3. Make CYGWIN use TEMP environment variable
2021-05-14 11:33:03 -06:00
Ward Fisher
44d9d365e9
Merge pull request #1993 from DennisHeimbigner/jsonquotes.dmh
Fix JSON quoted string processing in libnczarr
2021-05-10 14:42:40 -06:00
Dennis Heimbigner
7b0168a079 Update RELEASE_NOTES 2021-05-06 16:43:01 -06:00
Dennis Heimbigner
91168e33a0 Fix JSON quoted string processing in libnczarr
re: github issue https://github.com/Unidata/netcdf-c/issues/1982

The problem was that the libnczarr/zsjon.c handling of strings with
embedded double quotes was wrong; a one line fix.
Also added a test case.

Misc. other changes:

1. I Discovered, en passant, that the handling of 64 bit constants
had an error that was fixed.
2. cleanup of the constant conversion code to recurse on arrays of values.
2021-05-06 16:39:44 -06:00
Greg Sjaardema
362b37b552 Fix for use with szip and also 1.8.21 2021-04-28 15:42:02 -06:00
Greg Sjaardema
f92b7a9505
Fix so works with hdf5-1.8 also
Fix a bad change so can still compile with hdf5-1.8.x
2021-04-28 15:14:57 -06:00
Greg Sjaardema
cbcee382b0 Remove need for HDF5-1.6 API being defined 2021-04-28 13:59:24 -06:00
Ward Fisher
e6bdee5930
Merge pull request #1990 from DennisHeimbigner/nczarr_enhance1.dmh
Upgrade the nczarr code to match Zarr V2
2021-04-26 16:13:41 -06:00
Dennis Heimbigner
5873c627db remove push signal 2021-04-25 22:03:03 -06:00
Dennis Heimbigner
1243c3d866 Allow .rc tests to work in parallel by isolation 2021-04-25 22:02:29 -06:00
Dennis Heimbigner
dec9e74107 logdepend 2021-04-25 13:41:50 -06:00
Dennis Heimbigner
1f51ec56aa LGTM cleanup 2021-04-24 21:44:57 -06:00
Dennis Heimbigner
ed70a2e463 try 2: fix test properties 2021-04-24 20:49:03 -06:00
Dennis Heimbigner
05b4046173 try 1: fix test properties 2021-04-24 20:41:59 -06:00
Dennis Heimbigner
f3d118bfa1 reset action signals 2021-04-24 19:54:41 -06:00
Dennis Heimbigner
6ef02261f0 Update RELEASE NOTES 2021-04-24 19:53:18 -06:00
Dennis Heimbigner
74b40fd788 Upgrade the nczarr code to match Zarr V2
Re: https://github.com/zarr-developers/zarr-python/pull/716

The Zarr version 2 spec has been extended to include the ability
to choose the dimension separator in chunk name keys. The legal
separators has been extended from {'.'} to {'.' '/'}.  So now it
is possible to use a key like "0/1/2/0" for chunk names.

This PR implements this for NCZarr. The V2 spec now says that
this separator can be set on a per-variable basis. For now, I
have chosen to allow this be set only globally by adding a key
named "ZARR.DIMENSION_SEPARATOR=<char>" in the
.daprc/.dodsrc/ncrc file. Currently, the only legal separator
characters are '.' (the default) and '/'. On writing, this key
will only be written if its value is different than the default.
This change caused problems because supporting a separator of '/'
is difficult to parse when keys/paths use '/' as the path separator.
A test case was added for this.

Additionally, make nczarr be enabled default by default. This required
some additional changes so that if zip and/or AWS S3 sdk are unavailable,
then they are disabled for NCZarr.

In addition the following unrelated changes were made.

1. Tested that pure-zarr mode could read an nczarr formatted store.
1. The .rc file handling now merges all known .rc files (.ncrc,.daprc, and .dodsrc) in that order and using those in HOME first, then in current directory. For duplicate entries, the later ones override the earlier ones. This change is to remove some of the conflicts inherent in the current .rc file load process. A set of test cases was also added.
1. Re-order tests in configure.ac and CMakeLists.txt so that if libcurl
   is not found then the other options that depend upon it properly
   are disabled.
1. I decided that xarray support should be enabled by default for pure
   zarr. In order to allow disabling, I added a new mode flag "noxarray".
1. Certain test in nczarr_test depend on use of .dodsrc. In order for these
   to work when testing in parallel, some inter-test dependencies needed to
   be added.
1. Improved authorization testing to use changes in thredds.ucar.edu
2021-04-24 19:48:15 -06:00
Ward Fisher
706e33b056
Merge pull request #1989 from DennisHeimbigner/shellfix.dmh
Fix shell handling of escapes
2021-04-22 16:14:23 -06:00
Dennis Heimbigner
2bdc00cf4d Update RELEASENOTES 2021-04-21 15:03:50 -06:00
Dennis Heimbigner
efd1be5d62 Fix shell handling of escapes
re: https://github.com/Unidata/netcdf-c/issues/1988

There was an issue with certain shell programs (bash notably).
For certain platforms and when given a url that had an escaped
'#' character (e.g. \\#) bash would not remove the backslash. So I
had to add a hack for this. Unfortunately I overdid it and it
removed all '' characters. This is ok for non-windows platforms,
but obviously fails for windows.

The fix is this.

1. In a utility program (ncgen, ncdump, nccopy, etc) there is probably a call (or calls) to NC_backslashUnescape(xxx) where xxx is a path argument from the command line.
2. Replace each such call with NC_shellUnescape(xxx).

The NC_shellUnescape function was added and searched only for occurrences of "\#" and replaces them with "#".
2021-04-21 14:59:15 -06:00
Dennis Heimbigner
c984b3a428 fix CMake error 2021-04-16 18:54:35 -06:00
Dennis Heimbigner
fd261280dc Update release notes 2021-04-16 16:17:32 -06:00
Dennis Heimbigner
e07e32d552 Add test case 2021-04-16 16:12:53 -06:00
Dennis Heimbigner
fb8cf4b8f1 Fix ncdump bug when printing VLENs with basetype char 2021-04-16 15:53:05 -06:00
Dennis Heimbigner
ddd9819c7b Merge branch 'master' into authfix.tmp 2021-04-14 15:42:11 -06:00
Dennis Heimbigner
f720c5edbe try18 2021-04-14 15:14:14 -06:00
Ward Fisher
67c640f1b8
Merge pull request #1984 from DennisHeimbigner/kwaliasfix.dmh
Fix the handling of certain alias types in CDL files.
2021-04-14 14:20:56 -06:00
Dennis Heimbigner
30ee9914e2 Update release notes 2021-04-14 11:23:33 -06:00
Dennis Heimbigner
ac421620b3 Fix the handling of certain alias types on CDL files.
re: https://github.com/Unidata/netcdf-c/issues/1977

PR https://github.com/Unidata/netcdf-c/pull/1753, changed ncgen
to allows certain type names to be used as identifiers in
selected situations.

An unwanted side effect was that existing type aliases no longer
were accepted by ncgen. Specifically, using the "long" type
caused an error.

I was able to figure out a better solution to the original
problem (https://github.com/Unidata/netcdf-c/issues/1750)
that also fixes this problem as well.

This PR fixes that problem in ncgen/ncgen.l,
and adds tests to ncdump/test_keywords.sh
2021-04-13 16:56:43 -06:00
Ward Fisher
802916a914 Addressing some uninitialized variables to see if there is an effect on compiler optimizations. Good practice to have these fixed in any event. 2021-04-13 11:45:33 -06:00
Ward Fisher
1e99bb4a7c
Merge pull request #1979 from opoplawski/builddir
Fix out of tree builds with configure
2021-04-12 16:07:54 -06:00
Ward Fisher
bcadaf3839
Merge pull request #1980 from opoplawski/test
Fix tst_h_atts3 for hdf5 1.12
2021-04-12 16:07:24 -06:00
Orion Poplawski
9fc8ae62a8 Fix tst_h_atts3 for hdf5 1.12 2021-04-10 19:51:58 -06:00
Orion Poplawski
031b93a0f8 Fix out of tree builds with configure - add $(top_builddir)/include to include directory search 2021-04-10 17:57:55 -06:00