Commit Graph

6913 Commits

Author SHA1 Message Date
Ward Fisher
99b78fb9e5
Merge pull request #1526 from NetCDF-World-Domination-Council/ejh_commented_test
cleaned up test handling of strings
2019-11-14 16:08:31 -07:00
Ward Fisher
505e99a875
Merge pull request #1527 from ckhroulev/NCDISPATCH_initialize_indexing
Fix NC_coord_zero indexing in NCDISPATCH_initialize()
2019-11-14 15:33:32 -07:00
Constantine Khrulev
91d3a89bdd Fix NC_coord_zero indexing in NCDISPATCH_initialize()
Fixes #1518.
2019-11-14 08:26:33 -09:00
edwardhartnett
d0b069cf70 cleaned up test handling of strings 2019-11-14 09:39:10 -07:00
edwardhartnett
73ed8525db updated tutorial 2019-11-14 08:14:53 -07:00
edwardhartnett
af7185295d modified release notes 2019-11-14 07:25:40 -07:00
edwardhartnett
3e45fa1497 another test for two anon dimensions of same size used in same HDF5 var 2019-11-14 07:23:09 -07:00
edwardhartnett
d73611de73 now handle two anon dimensions of same size used in same HDF5 var 2019-11-14 06:54:22 -07:00
edwardhartnett
6b9248cef8 adding test 2019-11-14 06:09:45 -07:00
edwardhartnett
cebe84157b adding test for anonymous dims in HDF5 file 2019-11-13 12:51:34 -07:00
edwardhartnett
b9f57b2b5f now UDF mode flags take priority over NC_NETCDF4 2019-11-13 12:13:33 -07:00
Constantine Khrulev
bb45db457e Add regression tests modifying attributes 2^16 times
This commit adds three new tests:

- a test documenting the limitation originally reported in #350 (in
  general modifying an attribute about 2^16 times makes it impossible
  to modify this file in ways requiring nc_redef() and nc_enddef() calls).
- a test ensuring that a scalar attribute can be modified 2^16 times
  as long as its type and size remain the same
- a test ensuring that a text attribute can be modified 2^16 times as
  long as its size remains the same

This version uses the nc_redef(), nc_put_att_...(), nc_enddef()
sequence. One could also use nc_open(), nc_put_att_...(), nc_close()
but that would make these tests significantly slower.
2019-11-13 10:08:31 -09:00
edwardhartnett
0bbe91e438 udf must take priority in NC_infermodel 2019-11-13 12:07:33 -07:00
Constantine Khrulev
6abbf8d429 Whitespace changes 2019-11-13 10:07:10 -09:00
Constantine Khrulev
098f2c1056 Modify the condition used to check if an attribute can be re-used
This should make the code a bit cleaner.
2019-11-13 08:38:12 -09:00
Constantine Khrulev
dd181deca9 Improve the fix for #350 included in #1119
1) We have to use H5Tequal() to compare HDF5 type IDs.
2) When checking if we can re-use an NC_CHAR attribute it is enough to
   compare data types (H5Tequal() takes care of the size comparison).
3) This commit adds missing code (reuse_att was set but not used).

Now an attribute in a NetCDF-4 file can be modified as many times as
necessary, as long its type and length remain the same.

Modifications changing either type or length of an attribute require
deleting and re-creating an attribute which increments the attribute
order creation index. Once this index reaches 65535 all attribute
modifications (for a particular group or variable) will fail.

For reference:

Issue 350 title: NetCDF-4 limits the number of times an attribute can
be modified

Pull request 1119 title: Fix checking for HDF5 max dims, no longer
re-create atts if not needed, confirm behavior for HDF5 cyclical
files, allow user to set mpiexec
2019-11-12 21:45:47 -09: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
Ward Fisher
108e938b2f
Merge pull request #1514 from turingeret/master
Changes to make it possible to nest this project inside of another CMake project.
2019-11-07 17:30:57 -07:00
Turing Eret
b633ea97fd Reverted changes to C files. Can't change them as that messes with the
other configuration paths. Tweaked CMakeLists.txt to set the TOPSRCDIR
to the netcdf root.
2019-11-07 15:46:50 -07:00
Turing Eret
84a293351e Changes to make it possible to nest this project inside of another CMake
project.
2019-11-07 14:00:53 -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
b5673f58cb
Merge pull request #1506 from DennisHeimbigner/cformat.dmh
ncgen -lc is incorrectly handling _Format
2019-11-06 10:34:42 -07:00
Dennis Heimbigner
30cfd348e6 Remove debug output 2019-11-06 09:33:14 -07:00
Dennis Heimbigner
c28a3517bd Misnamed baseline file 2019-11-05 14:06:15 -07:00
Dennis Heimbigner
5ba4c6a0d6 Forgot to put test in EXTRA_DIST 2019-11-05 13:43:59 -07:00
Ward Fisher
f0dc61a73c
Merge pull request #1508 from Unidata/gh1507.wif
Added EXTERNL definition in netcdf_par.h
2019-11-05 11:31:38 -07:00
Ward Fisher
91dfcd0248 Fixed another instance of netcdf_par.h being included before netcdf.h 2019-11-04 14:13:51 -07:00
Ward Fisher
07d157d016 Whack-a-mole 2019-11-04 14:11:55 -07:00
Ward Fisher
ea51c67baf Removed previous kludgy fix. 2019-11-04 14:09:25 -07:00
Ward Fisher
72d889d15a A better solution to previous fix, in line with documented usage of netcdf.h and other header files. 2019-11-04 14:07:50 -07:00
Ward Fisher
726030dabd Added EXTERNL definition in support of https://github.com/Unidata/netcdf-c/issues/1507 2019-11-04 13:38:14 -07:00
Dennis Heimbigner
9e016b85aa Add test cases 2019-11-03 12:03:13 -07:00
Dennis Heimbigner
aa3a9f033a Add tests 2019-10-31 16:08:57 -06:00
Dennis Heimbigner
af94f09f89 ncgen -lc is incorrectly handling _Format
re: https://github.com/Unidata/netcdf-c/issues/1504 (partial)

The ncgen c-code generator is incorrectly generating an attribute
for _Format.
Soln: remove code.
2019-10-30 12:53:54 -06:00
Ward Fisher
cca9ae64f6
Merge pull request #1505 from DennisHeimbigner/fixincludes.dmh
Fix includes/netcdf_xxx.h files to not include ncexternl.h
2019-10-28 12:34:15 -06:00
Dennis Heimbigner
9062af4697 cleanup netcdf_mem.h and netcdf_dispatch.h 2019-10-28 10:56:24 -06:00
Dennis Heimbigner
5ec10a97e9 CMake: install netcdf_filter.h and netcdf_dispatch.h 2019-10-28 10:52:05 -06:00
Dennis Heimbigner
40cd180957 Fix includes/netcdf_xxx.h files to not include ncexternl.h
re: https://github.com/Unidata/netcdf-c/issues/1502

If you plan to use any of the netcdf_XXX.h files, then it it is assumed
that you first include netcdf.h, followed by any netcdf_XXX.h files
you need. The EXTERNL (and other things) are defined in netcdf.h
so they should be available for use by the netcdf_XXX.h files.

This PR ensures that the above assumption is true.  It also adds
some comments to that effect to the start of the netcdf_xxx.h files.
2019-10-28 10:29:39 -06:00
Ward Fisher
ca4e1ca5cf
Merge pull request #1501 from Unidata/sa_cleanup.wif
Assorted Static Analysis cleanup
2019-10-25 14:25:09 -06: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