Commit Graph

887 Commits

Author SHA1 Message Date
Edward Hartnett
ba0491bb40 documentation improvements for nc_var_par_access() 2020-03-02 16:36:56 -07:00
Dennis Heimbigner
b488c272d5 Fix conflicts with master 2020-02-27 14:06:45 -07:00
Dennis Heimbigner
44d0dcaad2 Add support for multiple filters per variable.
re: https://github.com/Unidata/netcdf-c/issues/1584

Support has been added for multiple filters per variable.  This
affects a number of components in netcdf. The new APIs are
documented in NUG/filters.md.

The primary changes are:
* A set of new functions are provided (see __include/netcdf_filter.h__).
    - Obtain a list of the filters associated with a variable
    - Obtain the parameters for a specific filter.
* The existing __nc_inq_var_filter__ function now returns info
  about the first defined filter.
* The utilities (ncgen, ncdump, and nccopy) now support
  an extended format for specifying a sequence of filters.
  The general form is __<filter>|<filter>..._.
* The ncdump **_Filter** attribute now dumps a list of all the
  filters associated with a variable using the above new format.
* Filter specifications can now use a filter name instead of number
  for filters known to the netcdf library, which in turn is taken
  from the HDF5 filter registration page.
* New errors are defined: NC_EFILTER and NC_ENOFILTER. The latter
  is returned if an attempt is made to access an unknown filter.
* Internally, the dispatch table has been extended to add a function
  to handle all of the filter functions.
* New, filter-related, tests were added to nc_test4.
* A new plugin was added to the plugins directory to help with testing.

Notes:
1. The shuffle and fletcher32 filters are not part of the multifilter system.

Misc. changes:
1. A debug module was added to libhdf5 to help catch error locations.
2020-02-16 12:59:33 -07:00
Edward Hartnett
c0d9c6237d added more documentation to nc_def_var_filter() 2020-02-09 17:59:41 -07:00
Edward Hartnett
8057a552ef move nc_def_var_szip function so it will appear in the documentation 2020-02-07 09:09:01 -07:00
Edward Hartnett
cbc2677094 updated documentation 2020-02-07 05:02:59 -07:00
Edward Hartnett
fb2a1048bb documentation improvements for nc_inq_var_szip() 2020-02-06 07:42:53 -07:00
Edward Hartnett
d5859e91b7 not return 0 for parameters to nc_inq_var_szip if szip is not turned on for var 2020-02-06 07:35:07 -07:00
Edward Hartnett
a6fbc3eea2 fix problem with pre-enddef call to nc_inq_var_szip() 2020-02-04 07:11:44 -07:00
Edward Hartnett
626f40843c more documentation for nc_inq_var_szip 2020-02-04 05:41:20 -07:00
Ward Fisher
8771d0bdf4
Merge pull request #1582 from NOAA-GSD/ejh_parallel_zlib
Allow user to turn on zlib, shuffle, and/or fletcher32 filters with parallel I/O for HDF5-1.10.2+
2020-01-13 16:06:51 -07:00
Dennis Heimbigner
748d26c114 Add support for CURLOPT_CONNECTTIMEOUT
I see that there is no way to set CURLOPT_CONNECTTIMEOUT,
but there is support for CURLOPT_TIMEOUT.
So, accept the line 'HTTP.CONNECTTIMEOUT'
in .rc file to allow user to set CURLOPT_CONNECTTIMEOUT.
2020-01-09 11:48:04 -07:00
Dennis Heimbigner
f587654670 Make the dap4 code resistant to various server errors.
Some versions of some servers are returning malformed responses.
Make the library either handle them or gracefully fail.
The three server errors "fixed" here are as follows.
1. The attribute _NCProperties sometimes has a trailing nul character
   in its value. Soln is to elide the nul(s).
2. Sometimes a DAP response has no data part, only a DMR.
   Soln is to detect and return an error code instead of crashing.
3. Sometimes a server returns a redirection, but our current
   openmagic() function was not following the redirect. Soln
   is to follow redirects.
Also because of #2, I am temporarily making --disable-dap-remote-tests
be the default.
2020-01-08 15:18:31 -07:00
Ward Fisher
438119dd69
Merge pull request #1560 from NOAA-GSD/ejh_cache_docs
increase default cache size for netCDF-4/HDF5 files, also improve cache docs and add benchmarking program
2020-01-07 11:46:30 -07:00
Ward Fisher
fb062f4406 Correct a cmake linking error discovered when working in a mips qemu environment. 2020-01-02 12:57:59 -05:00
Edward Hartnett
995cfdad96 merged master 2019-12-20 11:16:11 -07:00
Edward Hartnett
accb83a8b5 even more documentation updates 2019-12-20 07:20:02 -07:00
Edward Hartnett
8681b0d241 more documentaiton 2019-12-20 07:10:13 -07:00
Edward Hartnett
2136063d69 better documentation 2019-12-20 07:05:23 -07:00
Edward Hartnett
6952eb779b documentation updates 2019-12-20 05:36:09 -07:00
Ward Fisher
6c75e97764
Merge pull request #1570 from NOAA-GSD/ejh_compact
enable compact storage for netcdf-4 vars
2019-12-19 16:47:05 -07:00
James Sharpe
c5d1e4bdec Call find_package(MPI) to locate MPI paths and link to libdispatch if required 2019-12-18 16:48:40 +00:00
Edward Hartnett
19fef32a9e better documentation for compact storage 2019-12-16 09:52:59 -07:00
Edward Hartnett
e43a5d952c updated docs for NC_COMPACT 2019-12-04 09:16:33 -07:00
Edward Hartnett
64d821b568 removed non-relaxed coord bounds from test code 2019-11-26 06:20:34 -07:00
Edward Hartnett
5ab7bf7796 now always relax! 2019-11-26 05:36:16 -07:00
Edward Hartnett
2682ffd68d improved docs for cache functions, added libhdf5/hdf5cache.c to Doxyfile.in, added benchmark program for cache settings 2019-11-25 16:33:04 -07:00
Ward Fisher
af8f9ad2cf
Merge pull request #1523 from NetCDF-World-Domination-Council/ejh_udf
User-defined formats must come first in NC_infermodel, plus test
2019-11-15 16:40:07 -07:00
Ward Fisher
e4003be502
Merge pull request #1515 from NetCDF-World-Domination-Council/ejh_att_docs
update for attribute documentation
2019-11-15 16:39:46 -07:00
Ward Fisher
2462cda15e
Merge pull request #1525 from NetCDF-World-Domination-Council/ejh_anon_dims
If HDF5 dataset has multiple anonymous dimensions of the same size, assume they are different dimensions
2019-11-14 16:58:24 -07:00
Constantine Khrulev
91d3a89bdd Fix NC_coord_zero indexing in NCDISPATCH_initialize()
Fixes #1518.
2019-11-14 08:26:33 -09:00
edwardhartnett
b9f57b2b5f now UDF mode flags take priority over NC_NETCDF4 2019-11-13 12:13:33 -07:00
edwardhartnett
0bbe91e438 udf must take priority in NC_infermodel 2019-11-13 12:07:33 -07:00
edwardhartnett
c76dae1c5d 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
edwardhartnett
09fe16c847 cleanup 2019-11-08 04:47:57 -07:00
edwardhartnett
8b2630913a adding doxygen docs for every att function 2019-11-08 04:45:45 -07:00
edwardhartnett
7919e2c052 fixing documentation for attribute put functions 2019-11-07 12:19:18 -07:00
edwardhartnett
42df9b09e5 fixing documentation for attribute put functions 2019-11-07 11:58:41 -07:00
edwardhartnett
3ecef5e7f0 fixing documentation for attribute get functions 2019-11-07 11:47:27 -07:00
edwardhartnett
209da6563c greater distinction between netCDF-4 and classic formats in attribute documentation 2019-11-07 11:32:57 -07:00
edwardhartnett
f46679c8cc cleanup and minor fixes for attribute rename/delete functions 2019-11-07 09:53:43 -07:00
edwardhartnett
ed8ef60855 cleanup and minor fixes for attribute inq functions 2019-11-07 09:46:23 -07:00
edwardhartnett
d961f7b76e cleanup of documentation format in attributes write code 2019-11-07 09:31:04 -07:00
edwardhartnett
837dccd217 changed format to match other docs, fixed file documentation 2019-11-07 07:09:54 -07:00
Ward Fisher
f77b96b066 Fixed a potential null/garbage free. 2019-10-24 16:37:52 -06:00
Ward Fisher
36ccecf053 Addressing a potential null argument to strlen 2019-10-24 14:28:39 -06:00
Greg Sjaardema
5ecad63c6a
Remove incorrect comment
The comment states that prefix must end in '/', but the '/' is added in the function itself, so the prefix should *not* end in '/' and the comment is incorrect.
2019-10-16 08:40:58 -06:00
Ward Fisher
d001ec8590 Removing a problematic const causing issues on OSX. 2019-10-09 17:18:48 -06:00
Dennis Heimbigner
f1506d552e Change (again), and hopefully simplify, the file model inference algorithm.
* For URL paths, the new approach essentially centralizes all information
  in the URL into the "#mode=" fragment key and uses that value
  to determine the dispatcher for (most) URLs.

* The new approach has the following steps:

  1. canonicalize the path if it is a URL.
  2. use the mode= fragment key to determine the dispatcher
  3. if dispatcher still not determined, then use the mode flags
     argument to nc_open/nc_create to determine the dispatcher.
  4. if the path points to something readable, attempt to read the
     magic number at the front, and use that to determine the dispatcher.
     this case may override all previous cases.

* Misc changes.

  1. Update documentation
  2. Moved some unit tests from libdispatch to unit_test directory.
  3. Fixed use of wrong #ifdef macro in test_filter_reg.c
     [I think this may fix an previously reported esupport query].
2019-09-29 12:59:28 -06:00
Ward Fisher
e7cc899264 Merge branch 'ejh_try2' of https://github.com/NetCDF-World-Domination-Council/netcdf-c into gh1487.wif 2019-09-20 14:04:56 -06:00
Greg Sjaardema
56c0d5cf8a Spelling fixes 2019-09-18 08:03:01 -06:00
edwardhartnett
2cd228bcd4 porting changes from other PR 2019-09-16 11:28:18 -06:00
edwardhartnett
e4ef7b1a65 more unit tests, this time for nc4internal.c 2019-08-21 04:46:00 -06:00
Ed Hartnett
bce3fa6169
Merge branch 'master' into ejh_next 2019-08-16 03:42:32 -06:00
edwardhartnett
94f1a89a40 final removal 2019-08-15 07:05:10 -06:00
edwardhartnett
c7c2892de5 clean up 2019-08-15 06:53:57 -06:00
edwardhartnett
2077729abc removed base_pe functions from dispatch table 2019-08-15 06:51:06 -06:00
edwardhartnett
60f436e7ee starting to remove obsolete _CRAYMPP macros 2019-08-14 06:13:45 -06:00
edwardhartnett
dce6f32a76 documentation 2019-08-13 14:57:43 -06:00
edwardhartnett
f007523826 fixed missing dependency in unit_test Makefile.am 2019-08-13 11:06:06 -06:00
edwardhartnett
978707c319 only run slow nclist test if --enable-large-file-tests is used 2019-08-13 10:55:44 -06:00
edwardhartnett
88077fe26e more comments 2019-08-13 06:31:06 -06:00
edwardhartnett
821b749186 removed unnecessary checking in find_in_NCList() 2019-08-13 06:03:48 -06:00
edwardhartnett
d76114aab3 more testing, sorting out some memory issues in test 2019-08-13 05:45:03 -06:00
edwardhartnett
8b8ece4f4b more testing of nclistmgr.c 2019-08-09 13:49:52 -06:00
edwardhartnett
f20db2e024 more documentation 2019-08-09 11:13:55 -06:00
edwardhartnett
d558873c93 documented functions in nclistmgr.c 2019-08-09 09:15:59 -06:00
edwardhartnett
916802bf4c starting to add doxygen docs for nclistmgr.c 2019-08-09 08:48:28 -06:00
edwardhartnett
fb32957b2b whitespace cleanup 2019-08-09 08:45:39 -06:00
edwardhartnett
3a9207d55c more changes for user-defined formats 2019-08-03 18:33:43 -06:00
edwardhartnett
83c6cd58a7 more changes in support of user-defined formats 2019-08-03 17:19:13 -06:00
edwardhartnett
170c5b0901 removed NC from open in dispatch table 2019-08-01 14:30:20 -06:00
Dennis Heimbigner
4c92fc3405 Remove netcdf-4 conditional on the dispatch table.
Partially address: https://github.com/Unidata/netcdf-c/issues/1056

Currently, some of the entries in the dispatch table
are conditional'd on USE_NETCDF4.

As a step in upgrading the dispatch table for use
with user-defined tables, we remove that conditional.
This means that all dispatch tables must implement the
netcdf-4 specific functions even if only to make them
return NC_ENOTNC4. To simplify this, a set of default
functions are defined in libdispatch/dnotnc4.c to provide this
behavior. The file libdispatch/dnotnc3.c is also relevant to
this.

The primary fix is to modify the various dispatch tables to
remove the conditional and use the functions in
libdispatch/dnotnc4.c as appropriate. In practice, all of the
existing tables are prepared to handle this, so the only
real change is to remove the conditionals.

Misc. Unrelated fixes
1. Fix some annoying warnings in ncvalidator.

Notes:
1. This has not been tested with either pnetcdf or hdf4 enabled.
   When those are enabled, it is possible that there are still
   some conditionals that need to be fixed.
2019-07-20 13:59:40 -06:00
Dennis Heimbigner
000f22b12a Fix encoding of a DAP2 constraint specified outside the URL.
re: github issue #1425

The 'ncdump -v' command causes a constraint to be sent
to the opendap code (in libdap2). This is a separate path
from specifying the constraint via a URL.

This separate path encoded its constraint using code independent
of and duplicative of that provided by ncuri.c and this duplicate
code did not properly encode the constraint, which might include
square brackets.

Solution chosen here was to get rid of the duplicate code and
ensure that all URL escaping is performed in the ncuribuild function
in the ncuri.c file.

Also removed the use of the NEWESCAPE conditional in ncuri.c
because it is no longer needed.
2019-07-14 15:56:29 -06:00
Ward Fisher
9db0e26b80
Merge pull request #1432 from NetCDF-World-Domination-Council/ejh_dispatch
create header netcdf_dispatch.h
2019-07-09 12:58:28 -06:00
Ward Fisher
281ac5ff15
Merge pull request #1431 from NetCDF-World-Domination-Council/ejh_remove_macro
remove unused macro USE_REFCOUNT
2019-07-09 12:58:17 -06:00
Ward Fisher
8b1c4e3ff8
Merge pull request #1410 from Unidata/ansifix2.dmh
Fix ncconfigure.h to solve a -ansi problem with strdup()
2019-07-09 12:57:31 -06:00
Ed Hartnett
d408006d06 handle UDF formats on NC_create() 2019-07-05 13:39:50 -06:00
Ed Hartnett
620f17d5ef finidhed removing refcount from dfile.c 2019-07-04 15:46:15 -06:00
Ed Hartnett
f6ea863011 finidhed removing refcount from dfile.c 2019-07-04 15:45:49 -06:00
Ed Hartnett
0727ccf5ad starting to take out ref count stuff 2019-07-04 15:45:03 -06:00
Ed Hartnett
edf1f92042 starting to take out ref count stuff 2019-07-04 15:44:01 -06:00
Ed Hartnett
41cef20d1a fixed handling of NULL name in nc_open 2019-06-30 04:56:24 -06:00
Dennis Heimbigner
4de0c555e1 Fix nctime to not include ncconfigure.h
re: https://github.com/Unidata/netcdf-c/pull/1411

Turns out that the real problem here is that nctime.c
is including ncconfigure.h rather than config.h.
2019-05-30 12:47:50 -06:00
Ward Fisher
d6a3944199
Merge pull request #1409 from Unidata/nccopydefault.dmh
Nccopy was overriding default chunking when it should not.
2019-05-29 15:26:09 -06:00
Dennis Heimbigner
06498ff16a various fixes 2019-05-23 16:35:03 -06:00
Ed Hartnett
1d9f28fb70 changing USE_NETCDF4 to USE_HDF5 in dfilter.c 2019-05-22 07:36:22 -06:00
Dennis Heimbigner
331a1f1c63 Centralize calls to curl_global_init and curl_global_cleanup
re: https://github.com/Unidata/netcdf-c/issues/1388

1. Centralize calls to curl_global_init and curl_global_cleanup
   to libdispatch/ddispatch.c
2. Make the above calls if options require curl: currently
   any of DAP2, DAP4, or byterange.
3. Side issue: Fix obscure bug in mmapio.c involving non-persistent mmap.
2019-05-03 13:22:54 -06:00
Ward Fisher
3b34a82e19 Merge branch 'master' into threads_part1.dmh 2019-05-01 14:41:13 -06:00
Ward Fisher
5410967b00 Merge branch 'master' into addfilter.dmh 2019-04-30 14:51:25 -06:00
Ward Fisher
6446ff37c5
Merge pull request #1368 from jschueller/mingw
Fix MinGW build
2019-04-03 17:32:22 -06:00
Dennis Heimbigner
6934aa2e8b Thread safety: step 1: cleanup
re: https://github.com/Unidata/netcdf-c/issues/1373 (partial)

* Mark some global constants be const to indicate to make them easier to track.
* Hide direct access to the ncrc_globalstate behind a function call.
* Convert dispatch tables to constants (except the user defined ones)
  This has some consequences in terms of function arguments needing to be marked
  as const also.
* Remove some no longer needed global fields
* Aggregate all the globals in nclog.c
* Uniformly replace nc_sizevector{0,1} with NC_coord_{zero,one}
* Uniformly replace nc_ptrdffvector1 with NC_stride_one
* Remove some obsolete code
2019-03-30 14:06:20 -06:00
Ward Fisher
752a040bb0 Merge branch 'master' into cleanup.wif 2019-03-26 15:33:40 -06:00
Dennis Heimbigner
4026323383 Fix minor --ansi warnings in dinfermodel.c and bzlib.c
re:

Needed to provide centralized definitions of fileno and fdopen;
also need to #include sys/types.h
2019-03-22 15:16:47 -06:00
Ward Fisher
5ee026f843 Cleaned up some errant conflict resolution fenceposting. 2019-03-21 15:56:27 -06:00
Ward Fisher
cb7bec8dbc Merge branch 'master' into cleanup.wif 2019-03-21 14:39:57 -06:00
Dennis Heimbigner
8d0bced60d Allow in-line definition of filters
Priority: Low

re: issue https://github.com/Unidata/netcdf-c/issues/1329

HDF5 has the ability to programmatically define new filters,
as opposed to using HDF5_PLUGIN_PATH env variable.
This PR adds support for that feature.
Not clear how useful this is, though.
See docs/filters.md for details.
2019-03-21 11:33:27 -06:00
Ward Fisher
e2b31ffae4
Merge branch 'master' into byterange.dmh 2019-03-19 12:05:44 -06:00
Ward Fisher
3de2cf3d55
Merge pull request #1346 from wkliao/nc_mpiio
move checking for flag conflict to nc_create_par
2019-03-19 12:04:38 -06:00
Julien Schueller
a3c2031071 Fix MinGW build
Som Win32 includes are also needed on MinGW
2019-03-17 09:18:56 +01:00
Ward Fisher
b066336b5c Merge branch 'master' into cleanup.wif 2019-03-06 12:25:44 -07:00
Ward Fisher
3bed028d52 Correcting div by zero error, minor resource leak. 2019-03-05 14:24:17 -07:00
Wei-keng Liao
142cd5b5ca as NC_MPIIO has deprecated, move checking for flag conflict to nc_create_par 2019-02-26 11:01:35 -06:00
Ed Hartnett
26f4bfdd28 added comment about function ordering 2019-02-25 12:23:54 -07:00
Ed Hartnett
d0a6e9c246 more work on var documentation 2019-02-25 12:20:53 -07:00
Ed Hartnett
ea5e7f9b9a fixing some documentation issues in hdf5var.c 2019-02-25 10:44:05 -07:00
Ed Hartnett
d47006fd3f fixing some documentation issues in hdf5var.c 2019-02-25 10:32:17 -07:00
Ed Hartnett
160186d52e more doc cleanup 2019-02-25 08:35:18 -07:00
Ed Hartnett
c2c2f8e044 cleanup of var docs 2019-02-25 08:25:12 -07:00
Ed Hartnett
c620d8c5c7 more documentation cleanup 2019-02-25 08:15:43 -07:00
Ed Hartnett
2f8f5baf0f more documentation cleanup 2019-02-25 08:14:42 -07:00
Ed Hartnett
3277ef2359 formatting cleanup 2019-02-25 07:58:55 -07:00
Ed Hartnett
0e204ebe0c formatting cleanup 2019-02-25 07:55:29 -07:00
Ed Hartnett
7dc9097d62 cleaned away uncorrect section 2019-02-25 07:48:29 -07:00
Ed Hartnett
2dd178bfa1 documentation cleanup 2019-02-25 07:37:23 -07:00
Ed Hartnett
f83c8a5d3a documentation of dim rename for netcdf-4 vs classic 2019-02-25 07:32:06 -07:00
Ed Hartnett
fba4c19953 documentation cleanup 2019-02-25 07:28:35 -07:00
Ed Hartnett
05d549e900 fixed doxygen warnings in RELEASE_NOTES.md 2019-02-25 07:16:47 -07:00
Ed Hartnett
3997511379 documentation work 2019-02-25 06:50:53 -07:00
Ed Hartnett
953e0ab668 documentation work 2019-02-25 06:46:32 -07:00
Ed Hartnett
f02d1151f6 documentation work 2019-02-25 06:41:13 -07:00
Dennis Heimbigner
0c59e13bf7 Master merge, conflict resolution, cleanup 2019-02-24 16:54:13 -07:00
Dennis Heimbigner
45a8a265b8 master merge 2019-02-23 17:14:12 -07:00
Ward Fisher
6c3b7a0077
Merge branch 'master' into urlauth.dmh 2019-02-13 16:32:38 -07:00
Dennis Heimbigner
a1f080db19
Merge branch 'master' into byterange.dmh 2019-02-13 14:45:53 -07:00
Dennis Heimbigner
4cd440dd96 URL with username+pwd in url is not working.
re: esupport (DVK-211460)

Turns out it was a typo in libdispatch/dauth.c
Fix is to Change:
HTTP.USERNAME -> HTTP.CREDENTIALS.USERNAME
and
HTTP.PASSWORD-> HTTP.CREDENTIALS.PASSWORD
2019-02-09 15:06:03 -07:00
Ward Fisher
3a14251dd9
Merge branch 'master' into bigend.dmh 2019-02-07 14:28:39 -07:00
Ward Fisher
1fde39c8d7
Merge branch 'master' into byterange.dmh 2019-02-07 14:28:23 -07:00
Dennis Heimbigner
e4cb5c89a3 Made some mistakes in handling the PNETCDF case.
So, fixed the following:
1. Forgot to check for NC_FORMATX_PNETCDF case
   in one of the switches in NC_infermodel.
2. Accidentally turned on both the NC_64BIT_OFFSET
   and the NC_64BIT_DATA mode flags.
2019-02-01 14:31:44 -07:00
Dennis Heimbigner
8714066b18 Fix errors when building on big-endian machine
re: issue https://github.com/Unidata/netcdf-c/issues/1278
re: issue https://github.com/Unidata/netcdf-c/issues/876
re: issue https://github.com/Unidata/netcdf-c/issues/806

* Major change to the handling of 8-byte parameters for nc_def_var_filter.
  The old code was not well thought out.
  * The new algorithm is documented in docs/filters.md.
  * Added new utility file plugins/H5Zutil.c to support
  * Modified plugins/H5Zmisc.c to use new algorithm
  the new algorithm.
  * Renamed include/ncfilter.h to include/netcdf_filter.h
    and made it an installed header so clients can access the
    new algorithm utility.
  * Fixed nc_test4/tst_filterparser.c and nc_test4/test_filter_misc.c
    to use the new algorithm
* libdap4/ fixes:
  * d4swap.c has an error in the endian pre-processing such
    that record counts were not being swapped correctly.
  * d4data.c had an error in that checksums were being computed
    after endian swapping rather than before.
* ocinitialize() was never being called, so xxdr bigendian handling
  was never set correctly.
  * Required adding debug statements to occompile
* Found and fixed memory leak in ncdump.c

Not tested:
* HDF4
* Pnetcdf
* parallel HDF5
2019-01-31 21:13:06 -07:00
Ward Fisher
c49f4256ad Corrected a logic error when compiling with parallel enabled. 2019-01-28 14:05:19 -07:00
Ward Fisher
b27c7d899d Merge branch 'master' into byterange.dmh 2019-01-25 14:50:23 -07:00
Ward Fisher
688c06d50c
Merge branch 'master' into fix-warnings 2019-01-23 15:12:20 -07:00
Ben Boeckel
82d72dfa47 nctime: expand basetime's size
It ends up being `basetime_1 + basetime_2` with a space in between. Make
enough room to ensure that it is not truncated.
2019-01-16 15:55:33 -05:00
Ben Boeckel
8c331222ec warnings: store sizes in size_t 2019-01-16 15:55:33 -05:00
Ben Boeckel
94a0259f0e NC_mktmp: pass the remaining space to strncat
This could overflow if `tmp` only had a few bytes left in its space
given its current contents.
2019-01-16 15:55:33 -05:00
Ben Boeckel
b3f34432a3 warnings: mark unused parameters 2019-01-16 15:55:33 -05:00
Ben Boeckel
eb0b9b8bbd ncuri: check the right preprocessor definition 2019-01-16 15:53:26 -05:00
Ben Boeckel
a747216c33 warnings: mark conditionally used parameters 2019-01-16 15:53:25 -05:00
Ward Fisher
2285e1dfa1 Merge branch 'ejh_test_null_vars_stride' of https://github.com/NetCDF-World-Domination-Council/netcdf-c into pr-aggregation.wif 2019-01-15 15:10:40 -07:00
Ed Hartnett
c278109c9f
Merge branch 'master' into ejh_test_null_vars_stride 2019-01-03 05:18:25 -07:00
Dennis Heimbigner
a7fa2d8d95 It turns out the the type H5FD_class_t was changed
between HDF5 versions 1.8 and 1.10.
So modify H5FDhttp.c to be conditional on the
HDF5 major+minor version from H5public.h
2019-01-02 14:37:23 -07:00
Dennis Heimbigner
b2e24ea2b1 Ignore lgtm alerts 2019-01-01 19:34:12 -07:00
Dennis Heimbigner
bf2746b8ea Provide byte-range reading of remote datasets
re: issue https://github.com/Unidata/netcdf-c/issues/1251

Assume that you have the URL to a remote dataset
which is a normal netcdf-3 or netcdf-4 file.

This PR allows the netcdf-c to read that dataset's
contents as a netcdf file using HTTP byte ranges
if the remote server supports byte-range access.

Originally, this PR was set up to access Amazon S3 objects,
but it can also access other remote datasets such as those
provided by a Thredds server via the HTTPServer access protocol.
It may also work for other kinds of servers.

Note that this is not intended as a true production
capability because, as is known, this kind of access to
can be quite slow. In addition, the byte-range IO drivers
do not currently do any sort of optimization or caching.

An additional goal here is to gain some experience with
the Amazon S3 REST protocol.

This architecture and its use documented in
the file docs/byterange.dox.

There are currently two test cases:

1. nc_test/tst_s3raw.c - this does a simple open, check format, close cycle
   for a remote netcdf-3 file and a remote netcdf-4 file.
2. nc_test/test_s3raw.sh - this uses ncdump to investigate some remote
   datasets.

This PR also incorporates significantly changed model inference code
(see the superceded PR https://github.com/Unidata/netcdf-c/pull/1259).

1. It centralizes the code that infers the dispatcher.
2. It adds support for byte-range URLs

Other changes:

1. NC_HDF5_finalize was not being properly called by nc_finalize().
2. Fix minor bug in ncgen3.l
3. fix memory leak in nc4info.c
4. add code to walk the .daprc triples and to replace protocol=
   fragment tag with a more general mode= tag.

Final Note:
Th inference code is still way too complicated. We need to move
to the validfile() model used by netcdf Java, where each
dispatcher is asked if it can process the file. This decentralizes
the inference code. This will be done after all the major new
dispatchers (PIO, Zarr, etc) have been implemented.
2019-01-01 18:27:36 -07:00
Ed Hartnett
091880fd4d fixed null stride problem for vars calls 2018-12-31 07:36:39 -07:00
Dennis Heimbigner
75759ca957 Separate out the --ansi comment fixes.
re: pull request https://github.com/Unidata/netcdf-c/pull/1242

This pr should be applied before https://github.com/Unidata/netcdf-c/pull/1242.
It fixes only the -ansi '//' comment problems. There may be some
slight conflicts with that other pr when it is applied, since in some
cases I converted #if 0...#endif to /*...*/
2018-12-12 13:23:09 -07:00
Dennis Heimbigner
735ae80928 merge master and fix conflicts 2018-12-12 11:47:54 -07:00
Dennis Heimbigner
643b2159ce
Remove the unused strdup definition from dstring.c
Actually was never needed
2018-12-12 11:32:31 -07:00
Ward Fisher
30ea33435c Merge remote-tracking branch 'origin/license_update.wif' into pr-aggregation.wif 2018-12-11 17:08:21 -05:00
Ward Fisher
25417880f7 Updated libdispatch/ files with copyright notice. 2018-12-06 14:29:57 -07:00