Commit Graph

226 Commits

Author SHA1 Message Date
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
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
Russ Rew
920393b891 Update nccopy documentation for -v and -g options 2013-04-25 20:50:59 +00:00
Ward Fisher
67f96188ff Merged latest from netCDF-cmake branch in preparation for 4.3.0 release. 2013-04-23 21:50:07 +00:00
Russ Rew
51ac4014da Add missing documentation for nccopy -v and -g options 2013-04-16 22:18:14 +00:00
Ward Fisher
4a274b9870 Merged latest changes from cmake development branch.
Addressed a number of memory-related problems
reported by Coverity.
2013-04-02 22:09:31 +00:00
Ward Fisher
f26a4a559a Merged latest from netcdf-cmake branch.
Addressed several cmake-related issues, in terms of
building on Windows.  Also added XGetopt.c to 
EXTRA_dist in Makefile.am files.
2013-03-19 22:40:15 +00:00
Ward Fisher
ddf3c31bb0 Corrected a handful of syntax issues in CMake config files,
probably introduced more.  

Added CMake-related files to Makefile.am files for inclusion
when creating a distribution package.
2013-02-20 23:28:28 +00:00
Russ Rew
3ef3b35a94 Refactor to share functions between ncdump and nccopy. Merge nccopy
enhancements, based on contributed code from Martin van Driel, to
support -v, -g, -V, and -G options for selecting groups and variables
in output.  Fix all clang warnings from nccopy and ncdump sources, as
well as a few other cleanup changes to testing code.
2013-01-23 17:45:29 +00:00
Russ Rew
22b411a17c Merged in pnetcdf fixes from Greg Sjardema, to make set_fill_mode work
with parallel-netcdf, to fully implement parallel-netcdf support for
other functions, and to prevent a hang in hdf5 from an eary return in
an nc4_put_vara() call.  Also fixed an nccopy bug when
nc_inq_var_deflate() returns defalate_level of 0, but says the variable
is deflated.
2013-01-15 03:46:46 +00:00
Dennis Heimbigner
c0a7749cf5 1) fix out of date ncgentab/ncgenyy files 2)fix Jira-ncf213 bug and add test case 2013-01-03 20:45:34 +00:00
Ward Fisher
21523c8582 Merged changes from cmake branch. oc2 changes are just
'file property' changes, not sure what exactly.
2012-12-20 21:50:45 +00:00
Russ Rew
d93d40fd5f Fixed bug NCF-211 with nccopy. Minor updates to top-level README. 2012-12-11 17:49:40 +00:00
Ward Fisher
81280c7878 Merge from latest netcdf-cmake branch.
- Fixes for Windows.
- CMake-based changes (functionality, tests).
- Smattering of coverity-informed bug-fixes.
2012-12-05 18:35:42 +00:00
Russ Rew
0eef2f4c87 Add suffix support for nccopy -e option 2012-11-21 20:46:43 +00:00
Russ Rew
7e6ffcb334 Fix ncdump bug on 32-bit platforms 2012-11-20 21:49:28 +00:00
Ward Fisher
ff631c8156 Merged latest changes from cmake branch.
o Improved CMake support.
o Cmake module compatibility (netcdf-config*.cmake.in).
2012-11-19 21:43:12 +00:00
Russ Rew
920e248b61 Stop escaping '%' in CDL names 2012-11-19 21:14:41 +00:00
Russ Rew
8b63afda70 Fix portability bug, no arithmetic on void * pointers 2012-11-19 20:02:22 +00:00
Ward Fisher
109460c42e Added the new test (tst_mud.sh) to the CMake build system. 2012-11-19 16:56:44 +00:00
Russ Rew
8e98e3727d Fixed bug NCF-144 (ncdump of variables with multiple unlimited
dimensions).  Added comprehensive tests that include variables with
lots of combinations of 0 through 4 fixed and unlimited dimensions.
2012-11-16 21:37:43 +00:00
Russ Rew
c34a4e674b - Deleted --has-szlib option for nc-config, since that is controlled
by an HDF5 configure option, not a netCDF-4 configure option.
 - Fixed bug in HDF5 strings test code.
 - Minor fixes to nccopy man page documentation.
 - Minor fixes to Fortran-90 texinfo docs, since we don't have doxygen
   docs for Fortran yet: just using "Fortran" instead of "fortran" or
   "FORTRAN".
2012-10-31 21:31:07 +00:00
Ward Fisher
36ccdd3e67 Corrected for a mix of debug, release libraries for visual studio builds. 2012-10-24 19:46:24 +00:00
Ward Fisher
057701e1fa Added man pages to 'make install' 2012-10-17 21:14:30 +00:00