Commit Graph

582 Commits

Author SHA1 Message Date
Dennis Heimbigner
d06901f7d1 Suppress mistaken LGTM warnings 2022-11-15 20:54:01 -07:00
Dennis Heimbigner
591e6b2f6d Fix DAP4 remotetest server
Warning: This PR is a follow on to PR https://github.com/Unidata/netcdf-c/pull/2555 and should not be merged until that prior PR has been merged. The changeset for this PR is a delta on the PR https://github.com/Unidata/netcdf-c/pull/2555.

This PR re-enables the use of the server *remotetest.unidata.ucar.edu/d4ts*
to test several features:
1. Show that access over the Internet to servers using the DAP4 protocol works.
2. Test that DAP4 support in the [Thredds Data Server](https://github.com/Unidata/tds) is operating correctly.
4. Test that the DAP4 support in the [netcdf-java library](https://github.com/Unidata/netcdf-java) library and the DAP4 support in the netcdf-c library are consistent and are interoperable.

The test inputs (primarily *\*.nc* files) provided in the netcdf-c library
are also used by the DAP4 Test Server (aka d4ts) to present web access to a
collection of data files accessible via the DAP4 protocol and which can be
used for testing Internet access to a working server.

To be precise, this version of d4ts is currently in unmerged branches
of the *netcdf-java* and *tds* Github repositories and so are not actually
in the main repositories *yet*. However, the *d4ts.war* file was created
from that branch and used to populate the *remotetest.unidata.ucar.edu*
server

The two other remote servers that were used in the past are *Hyrax* (OPenDAP.org)
and *thredds-test*. These will continue to remain disabled until
those servers can be fixed.

## Primary Changes

* Rebuild the *baselineremote* directory. This directory contains the validation data needed to test the remote servers.
* Re-enable using remotetest.unidata.ucar.edu as part of the DAP4 testing process.
* Fix the *dap4_test/test_remote.sh* test script to match the current available test data.
* Make some changes to libdap4 to improve the ability to catch malformed data streams [affects a lot of files in libdap4].

## Misc. Unrelated Changes

* Remove a raft of warnings, especially in nc_test4/tst_quantize.c.
* Add some additional explanatory information to the NCZarr documentation.
* Cleanup some Doxygen errors in the docs file and reorder some files.
2022-11-15 20:29:21 -07:00
Dennis Heimbigner
835b81a285 Cleanup DAP4 testing
NOTE: This PR should not be included in 4.9.1 since additional
DAP4 related PRs will be forthcoming.

This PR makes major changes to libdap4 and dap4_test driven by changes to TDS.

* Enable DAP4
* Clean up the test input files and the test baseline comparison files. This entails:
    * Remove a multitude of unused test input and baseline data files; among them are dap4_test/: daptestfiles, dmrtestfiles, nctestfiles, and misctestfiles.
    * Define a canonical set of test input files and record in dap4_test/cdltestfiles.
    * Use the cdltestfiles to generate the .nc test inputs. This set of .nc files is then moved to the d4ts (DAP4 test server) war file in the tds repository. This set then becomes the canonical set of DAP4 test sources.
    * Scrape d4ts to obtain copies of the raw streams of DAP4 encoded data. The .dmr and .dap streams are then stored in dap4_test/rawtestfiles.
    * Disable some remote server tests until those servers are fixed.
* Add an option to ncdump (-XF) that forces the type of the _FillValue attribute; this is primarily to simplify testing of fill mismatch.
* Minor bug fixes to ncgen.
* Changes to libdap4:
    * Replace old checksum hack with the dap4.checksum flag.
    * Support the dap4.XXX controls.
    * Cleanup _FillValue handling, especially var-attribute type mismatches.
    * Fix enum handling based on changes to netcdf-java.
* Changes to dap4_test:
    * Add getopt support to various test support programs.
    * Remove unneeded shell scripts.
    * Add new scripts: test_curlopt.sh
2022-11-13 13:15:11 -07:00
Dennis Heimbigner
683d1ffea2 Update RELEASE_NOTES.md 2022-11-09 13:43:03 -07:00
Dennis Heimbigner
2943a78ebb Merge main and fix conflicts 2022-11-09 12:58:40 -07:00
Ward Fisher
773745b1d0
Merge branch 'main' into racecond1.dmh 2022-11-09 12:58:10 -07:00
Ward Fisher
87b50932de
Merge pull request #2530 from Unidata/v4.9.1-wellspring.wif
Merge subset of v4.9.1 files back into main development branch
2022-11-09 12:44:18 -07:00
Dennis Heimbigner
03b0e277d2 Update RELEASE notes 2022-11-08 20:18:12 -07:00
Ward Fisher
83fca01a0a Updated the relees notes. 2022-10-20 14:10:27 -06:00
Ward Fisher
39aeb2f30d
Merge branch 'v4.9.1-wellspring.wif' into filter_quickstart_guide.wif 2022-10-19 12:23:40 -06:00
Ward Fisher
c4fd240f39 Updated RELEASE_NOTES 2022-10-19 12:22:38 -06:00
Ward Fisher
dbfae7173b Update release notes. 2022-10-17 17:09:35 -06:00
Ward Fisher
ccd1e6a633 Updated for next release cycle. 2022-10-17 13:34:11 -06:00
DWesl
adde7f55ab BLD: Get CMake build compiling on Cygwin.
Mostly changing to Markdown files to a format Doxygen recognizes.
2022-10-12 13:00:03 -04:00
Ward Fisher
62f39e2eb3 Updated release notes. 2022-10-03 17:49:19 -06:00
Ward Fisher
59bfd82f0e Updated release notes. 2022-09-20 15:27:32 -06:00
Ward Fisher
320161f2e6 Updated release notes. 2022-09-20 09:04:03 -06:00
Ward Fisher
2f265b7193
Merge branch 'main' into moreszfixes.dmh 2022-09-16 10:51:22 -06:00
Dennis Heimbigner
db86c2c75a Update release notes 2022-09-09 19:30:38 -06:00
Dennis Heimbigner
1a45ee025f Fix some addtional errors in NCZarr
re: Issue https://github.com/Unidata/netcdf-c/issues/2502

H/T Charlie Zender

* Fix NCZarr handling of endianness value NC_ENDIAN_NATIVE. This now matches how it is handled in libhdf5
* Fix NCZarr handling of char typed attribute with value "". This now matches how it is handled in libhdf5
* Add test for various char attribute values
* Change the mapping of NC_CHAR and NC_STRING to dtype; requires changing some test files also.
* Optimize the testing for NC_ENOTBUILT in NC_open.
* Turn off debugging left on accidentally
* Fix memory leak in tst_pnetcdf.c
* Fix blosc test
2022-09-09 14:25:24 -06:00
Dennis Heimbigner
4fd290cb4b Fix conflicts 2022-09-08 11:15:26 -06:00
Ward Fisher
c489aad975
Merge branch 'main' into bloscfix.dmh 2022-09-06 15:50:01 -06:00
Ward Fisher
0d17edf2ea
Merge branch 'main' into bloscfix.dmh 2022-09-06 13:49:18 -06:00
Dennis Heimbigner
be88b66390 Update Release Notes 2022-09-03 14:54:18 -06:00
Dennis Heimbigner
6abaab967b Fix some problems with PR https://github.com/Unidata/netcdf-c/pull/2492
re: PR https://github.com/Unidata/netcdf-c/pull/2492
re: Issue https://github.com/Unidata/netcdf-c/issues/2494

This PR fixes some problems with the pull request https://github.com/Unidata/netcdf-c/pull/2492 in response to Issue https://github.com/Unidata/netcdf-c/issues/2494.

* Found and fixed more scalar handling problems and add a test case for scalars.
* Cleanup nczarr_test/run_string.sh test
* Document *_nczarr_default_maxstrlen* and *_nczarr_maxstrlen*.

* Support both "Nan" and *Nan* as being floating point constants
  for attributes. It is unclear from the Zarr V2 spec if
  unquoted *Nan* is legal or not, but support for reading.
  Write the quoted versions when writing an attribute.  Similar
  for Infinity constants.
  So NCZarr supports the following constants for use in Attributes
    * *Nan*, "Nan", *-Nan*, "-Nan"
    * *Nanf*, "Nanf", *-Nanf*, "-Nanf"
    * *Infinity*, "Infinity", *-Infinity*, "-Infinity"
    * *Infinityf*, "Infinityf", *-Infinityf*, "-Infinityf"
2022-09-03 14:21:48 -06:00
Ward Fisher
fae0f1fab6 Remove stray conflict markers that made their way into the branch. 2022-08-30 15:07:50 -06:00
Dennis Heimbigner
c9af92df8c conflicts 2022-08-28 13:26:20 -06:00
Dennis Heimbigner
4dc7050dfb update release notes 2022-08-27 20:30:54 -06:00
Dennis Heimbigner
c9205aea1f Update release notes" 2022-08-27 20:29:46 -06:00
Dennis Heimbigner
231ae96c4b Add support for Zarr string type to NCZarr
* re: https://github.com/Unidata/netcdf-c/pull/2278
* re: https://github.com/Unidata/netcdf-c/issues/2485
* re: https://github.com/Unidata/netcdf-c/issues/2474

This PR subsumes PR https://github.com/Unidata/netcdf-c/pull/2278.
Actually is a bit an omnibus covering several issues.

## PR https://github.com/Unidata/netcdf-c/pull/2278
Add support for the Zarr string type.
Zarr strings are restricted currently to be of fixed size.
The primary issue to be addressed is to provide a way for user to
specify the size of the fixed length strings. This is handled by providing
the following new attributes special:
1. **_nczarr_default_maxstrlen** —
This is an attribute of the root group. It specifies the default
maximum string length for string types. If not specified, then
it has the value of 64 characters.
2. **_nczarr_maxstrlen** —
This is a per-variable attribute. It specifies the maximum
string length for the string type associated with the variable.
If not specified, then it is assigned the value of
**_nczarr_default_maxstrlen**.

This PR also requires some hacking to handle the existing netcdf-c NC_CHAR
type, which does not exist in zarr. The goal was to choose numpy types for
both the netcdf-c NC_STRING type and the netcdf-c NC_CHAR type such that
if a pure zarr implementation read them, it would still work and an
NC_CHAR type would be handled by zarr as a string of length 1.

For writing variables and NCZarr attributes, the type mapping is as follows:
* "|S1" for NC_CHAR.
* ">S1" for NC_STRING && MAXSTRLEN==1
* ">Sn" for NC_STRING && MAXSTRLEN==n

Note that it is a bit of a hack to use endianness, but it should be ok since for
string/char, the endianness has no meaning.

For reading attributes with pure zarr (i.e. with no nczarr
atribute types defined), they will always be interpreted as of
type NC_CHAR.

## Issue: https://github.com/Unidata/netcdf-c/issues/2474
This PR partly fixes this issue because it provided more
comprehensive support for Zarr attributes that are JSON valued expressions.
This PR still does not address the problem in that issue where the
_ARRAY_DIMENSION attribute is incorrectly set. Than can only be
fixed by the creator of the datasets.

## Issue: https://github.com/Unidata/netcdf-c/issues/2485
This PR also fixes the scalar failure shown in this issue.
It generally cleans up scalar handling.
It also adds a note to the documentation describing that
NCZarr supports scalars while Zarr does not and also how
scalar interoperability is achieved.

## Misc. Other Changes
1. Convert the nczarr special attributes and keys to be all lower case. So "_NCZARR_ATTR" now used "_nczarr_attr. Support back compatibility for the upper case names.
2. Cleanup my too-clever-by-half handling of scalars in libnczarr.
2022-08-27 20:21:13 -06:00
Dennis Heimbigner
8774625c21 Add option to control accessing external servers
Add options
"--enable-external-server-tests" (automake)
"-DENABLE_EXTERNAL_SERVER_TESTS" (cmake)
to enable/disable tests that access
external URLS, where an external URL refers to some server not
directly under the control of netcdf-c.
This option defaults to off.

The reason for this PR is that external servers can be up or down
or change content without any warning to us, thus causing some
of our tests to fail.

Additionally. and recently, the thredds-test server was shut
down and some of our tests used it. So these tests are disabled
until a suitable replacement server is available.

## Misc. Fixes
* Bump the depth of trace support in nclog.c to avoid overflow
2022-08-27 14:24:47 -06:00
Dennis Heimbigner
517cb6e816 Fix master conflicts 2022-08-05 13:09:03 -06:00
Dennis Heimbigner
2b45c7ec84 Fix support for reading arrays of HDF5 fixed size strings
re: https://github.com/Unidata/netcdf-c/issues/2159

There was error in libhdf5 that only allowed reading a single
value HDF5 fixed string. Fix to allow reading an array of such strings.
Also make sure it still works for scalars and for attributes.
Add a testcase: nc_test4/tst_fixedstring.sh.
2022-07-29 14:47:07 -06:00
Ward Fisher
ba37c0af9f
Merge branch 'main' into enumdfalt.dmh 2022-07-26 15:23:40 -06:00
Ward Fisher
8b583d18ca
Merge branch 'main' into twojsons.dmh 2022-07-19 11:16:04 -06:00
Dennis Heimbigner
b588855ea2 Update release notes 2022-07-17 14:38:54 -06:00
Dennis Heimbigner
59806d0a32 Update release notes 2022-07-12 15:53:01 -06:00
Dennis Heimbigner
3623e17920 Fix some bugs in the blosc filter wrapper
re: Issue https://github.com/Unidata/netcdf-c/issues/2458

The above Github Issue revealed some bugs in the file netcdf-c/plugins/H5Zblosc.c. Fixed and added a testcase. Also discovered that the Blosc LZ sub-compressors do not work well with small datasets.

Misc. Other Change(s): I noticed that the file "dap4_test/baselinethredds/GOES16_CONUS_20170821_020218_0.47_1km_33.3N_91.4W.nc4.thredds" is still causing tar errors during "make distcheck", so I made some changes to do rename at test-time.
2022-07-12 15:19:07 -06:00
Edward Hartnett
4b0f337dbc
Merge branch 'main' into ejh_fix_quantize 2022-07-07 11:16:32 -06:00
Dennis Heimbigner
966a0c1a9f Resolve conflict 2022-07-06 14:21:51 -06:00
Dennis Heimbigner
f50007e21d Update RELEASENOTES.md 2022-07-05 22:06:28 -06:00
Dennis Heimbigner
8b0e1134b4 Ensure that netcdf_json.h does not interfere with ncjson.
re: Issue https://github.com/Unidata/netcdf-c/issues/2419

There are effectively two json subsystems in netcdf-c.
1. ncjson.[ch] in libnetcdf
2. netcdf_json.h for use by plugins so they can be built without need
   for libnetcdf.

The netcdf_json.h file is constructed from the concatenation of
ncjson.h plus ncjson.c. It turned out that in doing this, I was
leaving some symbols externally visible so that if, for some
reason, a plugin was built and needed libnetcdf, then symbol
conflicts arose.

The solution is to prefix the declarations in ncjson.[ch] with a
macro (OPTSTATIC) that can be resolved to either nothing or to
"static". Then in netcdf_json.h, it resolves to "static" and
prevents the symbol conflicts.

Note that netcdf_json.h is constructed once in
netcdf-c/include/Makefile.am with the rule named
"makepluginjson". This means that it is included in the
distribution. However, this also means that if ncjson.[ch] is
changed, then it is necessary to invoke makepluginjson
explicitly to rebuild netcdf_json.h
2022-07-05 22:03:52 -06:00
Ward Fisher
b2641a1fc5
Merge branch 'main' into cmakeplugin.dmh 2022-07-05 16:27:51 -06:00
Edward Hartnett
a2aeec8936 documentation 2022-07-02 06:19:52 -06:00
Ward Fisher
b6bdcacde7 Update release notes. 2022-06-30 14:44:09 -06:00
Ward Fisher
ae0b5e7d8c
Merge branch 'main' into cmakeplugin.dmh 2022-06-28 16:38:31 -06:00
Dennis Heimbigner
feb07359cd Update Release notes 2022-06-25 16:49:28 -06:00
Dennis Heimbigner
c633de1125 Fix way CMake handle -DPLUGIN_INSTALL_DIR
re: Issue https://github.com/Unidata/netcdf-c/issues/2429

The CMake tests for -DPLUGIN_INSTALL_DIR only accepted
"on" or "off" as boolean values. So extend to accept e.g.
-DPLUGIN_INSTALL_DIR=yes or -DPLUGIN_INSTALL_DIR=1, etc.
2022-06-25 16:47:49 -06:00
Dennis Heimbigner
d594f72a6d force rebuild 2022-06-23 16:08:58 -06:00
Dennis Heimbigner
bc55212936 Minimal changes to RELEASENOTES to get a working patch 2022-06-23 15:51:21 -06:00