Commit Graph

248 Commits

Author SHA1 Message Date
Russ Rew
d774e23bc1 Fix -d0 option to not do unwanted chunking or associated shuffle.
Add -c '/' option to specify changing layout for all variables from chunked to contiguous.
Fix logic for chunking and compression depending on input and output formats.
2014-03-21 12:34:19 -06:00
Ward Fisher
8d5d592a18 Added tst_bom.sh to EXTRA_DIST, fixing a failure in 'make dist'. 2014-03-13 10:33:03 -06:00
dmh
a1f8d0a761 turn on tst_auth 2014-03-10 16:40:52 -06:00
dmh
1b941d342d 1. Attempted to reduce the number of conversion errors
when -Wconversion is set. Fixed libdispatch, but
   rest of netcdf remains to be done.
2014-03-09 15:51:45 -06:00
dmh
2bc36f2bc1 conflict resolution 2014-03-08 20:43:18 -07:00
dmh
a189b98b0b 1. Any test that references nctestserver/NC_findtestserver
should be under ENABLE_DAP_REMOTE_TESTS.
   Fixed to make sure that this is so.
   Also attempted to fix ncdap_test/CMakeLists.txt,
   but probably got it wrong.
   HT to Nico Schlomer.
2. Attempted to reduce the number of conversion errors
   when -Wconversion is set. Fixed oc2, but
   rest of netcdf remains to be done.
   HT to Nico Schlomer.
3. When doing #2, I discovered an error in ncgen.y
   that has remained hidden. This required some other
   test case fixes.
2014-03-08 20:41:30 -07:00
Russ Rew
cfae3cb196 Merge branch 'master' of https://github.com/Unidata/netcdf-c 2014-03-08 16:37:21 -07:00
Russ Rew
8bcd127084 Added execute bit to ncdump/tst_bom.sh script. 2014-03-08 16:35:43 -07:00
Ward Fisher
8f524289f8 Fixed issue in CMakeLists.txt related to how the 'bom' test executable was being built. 2014-03-08 16:06:13 -07:00
dmh
baade3e4fc [NCF-293]
Allow .cdl files to have a leading utf-8 BOM.
Also add test.
2014-03-07 22:52:40 -07:00
dmh
e3545bf88d 1. Allow files to be opened by name multiple
times, but returning the same ncid.
2. Separate out the dap auth tests
   and make them disabled by default.
3. turn of ncdap_test/test_varm3 until
   we can find a copy of coads_climatology.nc
2014-03-07 12:04:38 -07:00
Russ Rew
cb1e4471b5 Removed doxygen man page, since it now is in the User Guide. 2014-03-06 21:15:00 -07:00
Russ Rew
8e59dc3ce8 Merge branch 'master' of https://github.com/Unidata/netcdf-c
Conflicts:
	ncdump/nccopy.c
2014-03-06 21:12:48 -07:00
Russ Rew
dac98c89b5 Typo fixes in install doc. Document nccopy chunk threshold. 2014-03-04 15:03:49 -07:00
Ward Fisher
805a6f5b58 Removed a stray character that caused the build to fail. 2014-03-03 12:24:36 -07:00
Ward Fisher
700a0bf848 Reorganizing NetCDF User's guide document. 2014-03-03 11:29:46 -07:00
Ward Fisher
f6a969cfd5 Updated and consolidated some redundant documentation. 2014-02-25 17:08:04 -07:00
Quincey Koziol
4bfd9b27a0 Merge remote-tracking branch 'upstream/master'
Conflicts:
	libdap2/common34.c
	oc2/ocutil.c
2014-02-11 17:26:09 -06:00
Quincey Koziol
b2dfacbcfa Big clean up to type handling in libsrc4, which makes fill-values work
correctly for variables with string datatype, plus a few other minor changes.
2014-02-11 17:12:08 -06:00
Ward Fisher
9b0a98383a Added CMakeLists.txt to missing Makefile.am files, so that CMake-based builds can be used on source packages generated by make dist 2014-02-06 11:32:32 -07:00
dmh
0f4b72c53b [NCF-286]/e-support:JVN-123940
using cygwin64 causes a couple of bugs during make check.
Fixes are as follows:
1. in ncdump.c and nccopy.c change all occurrences of
   'return EXIT_FAILURE'
   and
   'return EXIT_SUCCESS'
   with
   exit(EXIT_FAILURE)
   and
   exit(EXIT_SUCCESS)
   respectively.
   I have no idea why this works.
2. in libdap2/ncdap3a.c#freeNCDAPCOMMON,
   remove the call to nc_abort, it is
   causing a loop; not sure why this
   is not caught under other operating systems.
2014-02-04 16:26:52 -07:00
Ward Fisher
0032af978b Added INQ_FORMAT_EXTENDED-related tests to the cmake build system (based on inclusion in autotools-based builds). 2014-01-16 13:14:49 -07:00
Quincey Koziol
cd71eb525c Corrected "BAIL" macros to avoid infinite loop when logging is disabled and an
error occurs after an "exit:" label.

Corrected a dozen Coverity errors (mainly allocation issues, along with a few
    other things):
        711711, 711802, 711803, 711905, 970825, 996123, 996124, 1025787,
        1047274, 1130013, 1130014, 1139538

Refactored internal fill-value code to correctly handle string types, and
    especially to allow NULL pointers and null strings (ie. "") to be
    distinguished.  The code now avoids partially aliasing the two together
    (which only happened on the 'write' side of things and wasn't reflected on
    the 'read' side, adding to the previous confusion).

    Probably still weak on handling fill-values of variable-length and compound
    datatypes.

Refactored the recursive metadata reads a bit more, to process HDF5 named
    datatypes and datasets immediately, avoiding chewing up memory for those
    types of objects, etc.

Finished uncommenting and updating the nc_test4/tst_fills2.c code (as I'm
    proceeding alphabetically through the nc_test4 code files).
2013-12-29 01:12:43 -06:00
dmh
582410a407 [NCF-273]/HZY-708311
Add a new function called nc_inq_format_extended that
returns more detailed format information (vis-a-vis
nc_inq_format) about an open dataset.

Note that the netcdf API will present the file as if it had
the format specified by nc_inq_format.  The true file
format, however, may not even be a netcdf file; it might be
DAP, HDF4, or PNETCDF, for example. This function returns
that true file type.  It also returns the effective mode for
the file.

signature: nc_inq_format_extended(int ncid, int* formatp, int* modep)
where
* ncid is the NetCDF ID from a previous call to nc_open() or
  nc_create().
* formatp is a pointer to a location for returned true format.
* modep is a pointer to a location for returned mode flags.

Refer to the actual list in the file netcdf.h to see the
currently defined set.

Also added test cases (tst_formatx*).
2013-12-22 12:53:20 -07:00
dmh
ea7c0fc91b [NCF-280]/TLO-836022
Fix bug where leading backslash digit
in name was not being properly handled.
The reason was that I accidentally attemped to allow \x... and \0...
escapes in identifiers. This make identifiers
with leading escaped digits not work any more.
Also added test case.
2013-11-19 21:58:56 -07:00
dmh
cc95bd3d47 1. [NCF-276]/XXI-796914
Columbia server does not serve up proper
   opendap DDS replies. The Dataset {...} name
   changes depending on if the request has certain
   kinds of constraints.
   Code for a hack was not being used, so restore it.
   The fix is to effectively ignore differences in
   Dataset node names if the code is coming from
   columbia.edu.

2. [NCF-278]
   The ncgen code is improperly typing int64 integer constants
   as uint64.

3. [NCF-279]
   Empty string constants were not being properly
   filled when their target array is length 1 or more.
2013-11-17 14:26:14 -07:00
Russ Rew
3327a3c2c9 Add reference file for ncdump -bc test 2013-11-13 13:45:20 -07:00
Russ Rew
90933c7070 Add ncdump brief annotation test using -bc option 2013-11-13 13:44:03 -07:00
Russ Rew
911bdab962 Fix for bug NCF-275, ncdump -b annotation 2013-11-13 11:03:18 -07:00
Russ Rew
8e18ede2fe Fix full annotation bug described in NCF-275 2013-11-12 06:40:03 -07:00
dmh
850af2d435 [NCF-271]
Fix bug introduced by [NCF-267].
The bug was that octal constants that had
the highest bit set (e.g. '\200')
were not recognized as proper octal
constants. Fix was to keep as integer
until it was needed as an 8-bit byte.
2013-09-26 10:10:26 -06:00
dmh
10b0ac536f [NCF-267]/SAI-630695
Add support for embedded NUL characters
in character arrays and added some test cases.

Note that embedded NULs in netcdf-4
string constants are still illegal. This is
because strings are not counted in the netcdf
API, so they are implicitly NUL terminated.
2013-09-23 17:11:59 -06:00
dmh
a4d3f8306c add test cases 2013-09-23 17:11:24 -06:00
dmh
e7414e16d0 [NCF-265] again.
1. Updated the ncgen manual (ncgen.1)
   to discuss handling of ambiguous
   enumeration constant references.
2. Fixed the test case. It is currently
   XFAIL'd until such time as ncdump
   is modified to output properly
   disambiguated enumeration constant
   references.
2013-09-22 12:08:27 -06:00
dmh
06d91c3084 [NCF-265] again.
Added code to verify that enum constants
(and other constants) are consistent
with the type of the variable or
attribute to which they are assigned.
This addresses the ncdump failure.
2013-09-21 16:19:06 -06:00
dmh
c99058741a [NCF-265]
Ncgen is unable to resolve
ambiguous references to an enum
constant when two different enums
have same econstant name.

Solved by allowing more specific
forms for econstant references.
1. /.../enumname.enumconstname
2. enumname.enumconstname
3. enumconstname

Case 1 is resolved by using the econstant
in the specific enum definition. If none is
found, an error is reported.

Case 2 is resolved by
1. finding an enclosing group with an
   enum definition with the specified name
   and containing the specified econstant.
   If there are more than one, then an error is reported
2. finding all enum definitions in the dataset that have
   the specified enum name and contain the specified
   econstant. If more than one is found, then an error is reported.
If the above two methods fail, then report an error.

Case 3 is similar to case 2, but all enums, irrespective
of name are used if they contains the specified enum constant.

The ref_tst_econst.cdl test in ncdump is causing ncdump
to fail. So there may be yet some problem.
2013-09-20 20:43:09 -06:00
Ward Fisher
6a0978594c Updating CMakeLists.txt to address RPATH problem on OSX. 2013-08-22 11:15:12 -06:00
Ward Fisher
a3ff1206f5 Modified Makefile.am to not remove ctest.c, ctest64.c. This may be reverted by for now leaving ctest.c, ctest64.c in source repository. 2013-08-07 16:31:13 -06:00
Ward Fisher
7f8453c8f4 Updating generate documentation to reference GitHub. 2013-08-07 16:13:18 -06:00
Ward Fisher
a90b386e0a Refactored 'Constant' to 'NCConstant' in ncgen/ to avoid
reserved word collision on Windows.

Added tst_ncgen4_classic.sh to CMake-based builds.
2013-07-16 20:22:48 +00:00
Ward Fisher
07247f44b0 Fixed a couple of CMake related testing issues. 2013-07-11 16:50:51 +00:00
Russ Rew
f9dff9cee3 Fix make distcheck by getting right 2013-07-10 22:09:46 +00:00
Dennis Heimbigner
aa5e822273 added tst_h_scalar test 2013-07-10 21:19:05 +00:00
Russ Rew
758858e8b7 Forgot to add and commit yet another test program. 2013-07-10 21:07:53 +00:00
Russ Rew
e737bf33cb Forgot to add and commit new test program. 2013-07-10 21:06:12 +00:00
Russ Rew
0fd1f0dde1 Define macro for NIL string value in ncdump/dumplib.h 2013-07-10 20:56:24 +00:00
Dennis Heimbigner
98a469b17a Added NIL tests 2013-07-10 20:53:50 +00:00
Russ Rew
e4f9350c23 Quincey's fixes for NCF-56, "netcdf-4 can't read HDF5 scalar atts".
Also added ability capability for netCDF-4 to write and read NIL
values for string type attributes and variables, so these can be read
if used in HDF5 files.

Include are additions to CMakeLists files to reflect new tests.
2013-07-10 20:09:31 +00:00
Dennis Heimbigner
628aed80d9 1. synch changes with oc2.0
2. Fix a bug in ncgen to
   catch a special case of a malformed
   datalist.
2013-06-26 18:55:30 +00:00
Ward Fisher
33d3d06971 Added initial 'make dist', 'make distcheck' support to
CMake-based builds.
2013-06-03 16:42:04 +00:00