Commit Graph

9485 Commits

Author SHA1 Message Date
Dennis Heimbigner
3765d86e46 "Simplify" XGetopt usage
When "getopt()" is not available, various of the netcdf-c utilities
use XGetopt instead. This occurs primarily when building under Window,
so the build changes are restricted to CMake.

This PR tries to isolate XGetopt.c to the libdispatch directory
and then builds the various utilities using this cliche:
````
IF(USE_X_GETOPT)
  SET(XGETOPTSRC "${CMAKE_CURRENT_SOURCE_DIR}/../libdispatch/XGetopt.c")
ENDIF()
````

This avoids the need to copy XGetopt.c to all the directories that
use it.
2023-04-09 13:10:41 -06:00
Edward Hartnett
0c20199272 added fortran 2023-04-06 10:04:12 -06:00
Edward Hartnett
ad292eb06a documenting logging 2023-04-06 09:10:15 -06:00
Edward Hartnett
397912bbde documenting logging 2023-04-06 09:05:19 -06:00
Edward Hartnett
ea8d8dd05b documenting logging 2023-04-06 08:04:57 -06:00
uweschulzweida
b0d6fc70b4
Fix issue #2674 2023-04-05 18:05:53 +02:00
Dennis Heimbigner
5b42e382b0 Update to latest main 2023-04-04 18:37:20 -06:00
Dennis Heimbigner
2aee428ee4 ubuntufix1 2023-04-04 14:28:32 -06:00
Dennis Heimbigner
0ca921f721 ub1" 2023-04-04 13:15:27 -06:00
Conrad Poelman
532137d94f
CMakeLists.txt use ON vs YES, indent
In CMake logically ON, YES, TRUE, 1 are equivalent. But many CMake editors won't syntax highlight a lower-case "yes", and CMake-gui will change them to ON, creating unnecessary changes to CMakeCache.txt. Also indent a WIN32 if/then block.
2023-03-19 21:02:58 -04:00
Dennis Heimbigner
d7d216a3f5 Merge branch 'master' into dap4tests2.dmh 2023-03-16 14:03:29 -06:00
Dennis Heimbigner
2971d9731d Merge branch 'master' into dap4tests1.dmh 2023-03-16 14:02:49 -06:00
Dennis Heimbigner
17218d788a bad file reference 2023-03-14 20:25:36 -06:00
Dennis Heimbigner
250604582a oops 2023-03-14 14:48:30 -06:00
Ward Fisher
5ea154da96 Maintainer mode should only be turned on prior to minting a release. 2023-03-14 14:29:56 -06:00
Dennis Heimbigner
d738e03f5b Update 2023-03-14 14:14:44 -06:00
Ward Fisher
5f37f7639a Merge branch 'main' into v4.9.2-wellspring.wif 2023-03-14 13:58:59 -06:00
Ward Fisher
43abd699e1
Merge pull request #2661 from WardF/hdf5-1.14.0-ci.wif
Add hdf5 1.14.0 to GitHub CI.
2023-03-14 13:57:52 -06:00
Dennis Heimbigner
e439a0788b Fix run_jsonconvention.sh to be resilient against irrelevant changes to _NCProperties. 2023-03-14 13:46:31 -06:00
Ward Fisher
331ed2bdab Expand CI testing with HDF5 1.14.0 2023-03-14 11:47:57 -06:00
Ward Fisher
77738e546d Add hdf5 1.14.0 to GitHub CI. 2023-03-14 11:39:14 -06:00
Ward Fisher
97dbb4f25b
Merge pull request #2635 from DennisHeimbigner/vfd13.dmh
Extend the dispatch table for H5FD back to version 1.13.2
2023-03-14 11:36:17 -06:00
Ward Fisher
9c388dfd6a
Merge branch 'main' into vfd13.dmh 2023-03-14 11:36:09 -06:00
Ward Fisher
dc11c6d094 Correct jsonconvention map with netcdf version. 2023-03-14 09:23:48 -06:00
Dennis Heimbigner
69b5fa4f4e fix memory leak 2023-03-13 20:11:54 -06:00
Ward Fisher
b41127bec5 Bump version strings to reflect next development version. 2023-03-13 15:43:44 -06:00
Ward Fisher
59971b5475 Update release notes. 2023-03-13 15:42:29 -06:00
Ward Fisher
a55680d1c4 Bumped SO version. 2023-03-13 15:40:12 -06:00
DWesl
2f103420f6
CI: Test --without-plugin-dir on Cygwin
This caused problems a bit ago.
This will likely take a bit of iteration.
2023-03-13 16:28:35 -04:00
Dennis Heimbigner
5c07ebfd11 Check at nc_open if file appears to be in NCZarr/Zarr format.
re: Issue https://github.com/Unidata/netcdf-c/issues/2656

Charlie Zender notes that *nc_open()* does not immediately detect that the given path refers to a file not in zarr format. Rather it fails later when trying to read the (meta-)data.

The reason is that the Zarr format is highly decentralized. There is no easily testable magic number or superblock to look for. In effect the only way to see if a directory is Zarr is to successfully read it.

It is possible to heuristically detect that a path refers to an NCZarr/Zarr file by doing a breadth-first search of the file tree starting at the given path. If the search encounters a file whose name starts with ".z", then assume it is a legitimate NCZarr/Zarr file. Of course, this test could be costly. One hopes that in practice that it is not.

In addition to this fix, a corresponding test case was added.

## Other Changes

re: PR https://github.com/Unidata/netcdf-c/pull/2529

There was an error under Cygwin for this PR that is fixed in this PR. The fix was to convert all *noinst_* references to *check_*.
2023-03-13 13:24:14 -06:00
Peter Hill
ad2db15002
Fix wrong base type for enum in transient type test 2023-03-13 11:01:18 +00:00
Peter Hill
c95ce50317
Check there are two transient types in test 2023-03-10 17:44:40 +00:00
Peter Hill
20d87a3edb
Free memory in test 2023-03-10 17:40:59 +00:00
Peter Hill
84cc4362da
Add HDF5 transient type test to autoconf build system 2023-03-10 17:38:33 +00:00
Peter Hill
246f53855a
Add enum to HDF5 transient type test 2023-03-10 17:17:59 +00:00
Peter Hill
86f91888cc
Make transient type test work with MSVC 2023-03-10 16:47:45 +00:00
Peter Hill
03f3eb3ce1
Explicitly ignore HDF5 object references when reading types 2023-03-10 10:19:42 +00:00
Peter Hill
8589214b93
Check that transient/unnamed types can be queried 2023-03-10 10:12:56 +00:00
Peter Hill
9c18dad567
Add support for HDF5 transient types
These are compound or enum datatypes stored directly in the dataset
itself, and so aren't read as standalone objects during the initial
metadata gathering when the file is opened
2023-03-09 10:11:42 +00:00
Ward Fisher
bb632f269d
Merge pull request #2630 from DennisHeimbigner/encode.dmh
Enable ACCEPT_ENCODING on DAP requests
2023-03-07 14:18:56 -07:00
Ward Fisher
8d51666d04
Merge branch 'main' into encode.dmh 2023-03-07 14:18:38 -07:00
Ward Fisher
59cca5c955
Merge pull request #2649 from DennisHeimbigner/byterange.dmh
Fix byterange handling of some URLS
2023-03-06 10:59:38 -07:00
Dennis Heimbigner
cf6fcb3b9c Merge branch 'master' into dap4tests2.dmh 2023-03-02 20:00:05 -07:00
Dennis Heimbigner
bec55cb95e Merge branch 'master' into dap4tests1.dmh 2023-03-02 19:59:32 -07:00
Dennis Heimbigner
69e84fe9f1 Fix byterange handling of some URLS
re: Issue

The byterange handling of the following URLS fails.

### Problem 1: "https://crudata.uea.ac.uk/cru/data/temperature/HadCRUT.4.6.0.0.median.nc#mode=bytes"
It turns out that byterange in hdf5 has two possible targets: S3 and not-S3 (e.g. a thredds server or the crudata URL above). Each uses a different HDF5 Virtual File Driver (VFD).
I incorrectly set up the byterange code in libhdf5 so that it would choose one or the other of the two VFD's for any netcdf-c library build. The fix is to allow it to choose either one at run-time.

### Problem 2: "https://noaa-goes16.s3.amazonaws.com/ABI-L1b-RadF/2022/001/18/OR_ABI-L1b-RadF-M6C01_G16_s20220011800205_e20220011809513_c20220011809562.nc#mode=bytes,s3"
When given what appears to be an S3-related URL, the netcdf-c library code converts it into a canonical, so-called "path" format. In casing out the possible input URL formats, I missed the case where the host contains the bucket ("noaa-goes16"), but not the region. So the fix was to check for this case.

## Misc. Related Changes
1. Since S3 is used in more than just NCZarr, I changed the automake/cmake options to replace "--enable-nczarr-s3" with "--enable-s3", but keeping the former option as a synonym for the latter. This also entailed cleaning up libnetcdf.settings WRT S3 support
2. Added the above URLS as additional test cases

## Misc. Un-Related Changes
1. CURLOPT_PUT is deprecated in favor to CURLOPT_UPLOAD
2. Fix some minor warnings

## Open Problems
* Under Ubuntu, either libcrypto or aws-sdk-cpp has a memory leak.
2023-03-02 19:51:02 -07:00
Ward Fisher
a715d1a12b
Merge pull request #2607 from gsjaardema/patch-56
Missing `goto fail`
2023-03-02 16:55:22 -07:00
Zhipeng Xue
ec6471e7e8 Fix compile 2023-02-28 18:37:18 +08:00
Zhipeng Xue
e0792b41a0 Fix potential null dereference 2023-02-28 18:29:40 +08:00
Zhipeng Xue
a992aadb32 Fix potential dead store 2023-02-28 16:26:27 +08:00
Ward Fisher
00a722b253
Merge pull request #2618 from skosukhin/fix-macro-use
Fix macro usage
2023-02-27 18:39:20 -07:00