Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Batch EJH Pull requests #844

Merged
merged 26 commits into from
Feb 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
333b802
fix dim bad paramter issues
edhartnett Jan 30, 2018
06c1a02
doc changes only
edhartnett Jan 30, 2018
88a35bb
Merge branch 'master' into ejh_var_docs_only_unidata_2
WardF Jan 30, 2018
94c2371
extra tests, plus fill value fixes for string type
edhartnett Jan 30, 2018
dff3472
comment change to trigger travis testing
edhartnett Jan 31, 2018
7c936a7
brought in changes from ejh_att
edhartnett Jan 31, 2018
2afe401
another rename fix
edhartnett Feb 1, 2018
69c899a
removed results of other merges from nc4var.c
edhartnett Feb 1, 2018
fc6a8ca
Merge pull request #2 from Unidata/master
edhartnett Feb 1, 2018
383a191
fixed warnings
edhartnett Feb 1, 2018
23af1a9
Makefile.am cleanup
edhartnett Feb 2, 2018
3ba04ac
updated year
edhartnett Feb 2, 2018
9b4b230
Merge branch 'ejh_warnings' of https://github.com/NetCDF-World-Domina…
WardF Feb 3, 2018
7d59cf7
Merge branch 'ejh_makefile_cleanup_unidata' of https://github.com/Net…
WardF Feb 3, 2018
c12fca4
Merge branch 'ejh_rename2_unidata' of https://github.com/NetCDF-World…
WardF Feb 3, 2018
c1d54b0
Added check for genlib.h
WardF Feb 3, 2018
0fee3b9
Added a missing line in config.h.cmake.in
WardF Feb 3, 2018
d02a905
Updated typo.
WardF Feb 3, 2018
f428660
Corrected typo in libnetcdf.settings.in when using autoconf.
WardF Feb 3, 2018
0d96ead
Merge branch 'master' into ejh_dims_unidata
edhartnett Feb 5, 2018
b268f26
Merge branch 'ejh_dims_unidata' of https://github.com/NetCDF-World-Do…
WardF Feb 5, 2018
9276fda
Merge branch 'ejh_var_docs_only_unidata_2' of https://github.com/NetC…
WardF Feb 5, 2018
e0577cb
Merge branch 'ejh_fill_value_string_unidata' of https://github.com/Ne…
WardF Feb 5, 2018
a640c03
Merge branch 'ejh_atts_unidata' of https://github.com/NetCDF-World-Do…
WardF Feb 5, 2018
39465fe
Added include to config.h
WardF Feb 6, 2018
5107655
Accomodate Visual Studio
WardF Feb 6, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1265,6 +1265,7 @@ CHECK_INCLUDE_FILE("memory.h" HAVE_MEMORY_H)
CHECK_INCLUDE_FILE("string.h" HAVE_STRING_H)
CHECK_INCLUDE_FILE("winsock2.h" HAVE_WINSOCK2_H)
CHECK_INCLUDE_FILE("ftw.h" HAVE_FTW_H)
CHECK_INCLUDE_FILE("libgen.h" HAVE_LIBGEN_H)

CHECK_INCLUDE_FILES("time.h;sys/time.h" TIME_WITH_SYS_TIME)

Expand Down
29 changes: 5 additions & 24 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
## This is a automake file, part of Unidata's netCDF package.
# Copyright 2005-2013, see the COPYRIGHT file for more information.
# Copyright 2005-2018, see the COPYRIGHT file for more information.

# This is the main automake file for netCDF. It builds the different
# netcdf directories. Not all directories are built, depending on the
# options selected during configure.

# Ed Hartnett, Ward Fisher

# This directory stores libtool macros, put there by aclocal.
Expand All @@ -17,14 +18,9 @@ RELEASE_NOTES.md CTestCustom.cmake CTestConfig.cmake.in \
libnetcdf.settings.in netCDFConfig.cmake.in CMakeInstallation.cmake \
test-driver-verbose test_common.in

pkgconfigdir=$(libdir)/pkgconfig
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = netcdf.pc

# We need a way to automatically generate INSTALL from
# docs/install.doc, now that we've switched from texinfo to doxygen.
# INSTALL:
# non-existent-doxygen-to-text-utility < docs/install.doc > INSTALL

# Does the user want to build the V2 API?
if BUILD_V2
V2_TEST = nctest
Expand Down Expand Up @@ -68,7 +64,8 @@ endif

# Define Test directories
if BUILD_TESTSETS
TESTDIRS = $(V2_TEST) nc_test $(NC_TEST4) $(NCDAP2TESTDIR) $(NCDAP4TESTDIR)
TESTDIRS = $(V2_TEST) nc_test $(NC_TEST4) $(NCDAP2TESTDIR) \
$(NCDAP4TESTDIR)
endif

# This is the list of subdirs for which Makefiles will be constructed
Expand All @@ -85,21 +82,6 @@ test_common.sh
# The nc-config script helps the user build programs with netCDF.
bin_SCRIPTS = nc-config

# What needs to go in the binrary dist?
BINFILES = README_BINARIES.txt
BINFILES += include/netcdf.h share/man/man3/netcdf.3 lib/libnetcdf.a
BINFILES += libnetcdf.settings
ZIPBINFILES = ${prefix}/include/netcdf.h \
${prefix}/share/man/man3/netcdf.3 ${prefix}/lib/libnetcdf.a

if BUILD_UTILITIES
BINFILES += bin/ncgen3$(EXEEXT) bin/ncgen$(EXEEXT) bin/ncdump$(EXEEXT) \
share/man/man1/ncgen.1 share/man/man1/ncdump.1
ZIPBINFILES += ${prefix}/bin/ncgen3$(EXEEXT) \
${prefix}/bin/ncgen$(EXEEXT) ${prefix}/bin/ncdump$(EXEEXT) \
${prefix}/share/man/man1/ncgen.1 ${prefix}/share/man/man1/ncdump.1
endif

# install libnetcdf.settings in lib directory.
settingsdir = $(libdir)
settings_DATA = libnetcdf.settings
Expand All @@ -118,7 +100,6 @@ mm4::
b=`basename $$m` ; d=`dirname $$m`;\
pushd $$d; m4 -s $${b}.m4 > $${b}.c ; popd; done


#####
# If ENABLE_FORTRAN was turned on,
# we have new make targets, build-netcdf-fortran and
Expand Down
3 changes: 3 additions & 0 deletions config.h.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,9 @@ are set when opening a binary file on Windows. */
/* Define to 1 if you have the <ftw.h> header file. */
#cmakedefine HAVE_FTW_H 1

/* Define to 1 if you have the <libgen.h> header file. */
#cmakedefine HAVE_LIBGEN_H 1

/* Define to 1 if you have the `strlcat' function. */
#cmakedefine HAVE_STRLCAT 1

Expand Down
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,7 @@ AC_CHECK_HEADER(stdlib.h, ,AC_DEFINE([NO_STDLIB_H], [], [no stdlib.h]))
AC_CHECK_HEADER(sys/types.h, ,AC_DEFINE([NO_SYS_TYPES_H], [], [no sys_types.h]))
AC_CHECK_HEADERS([sys/dir.h])
AC_CHECK_HEADERS([sys/param.h])
AC_CHECK_HEADERS([libgen.h])
#AC_CHECK_HEADERS([locale.h])
AC_HEADER_DIRENT
AC_HEADER_STDC
Expand Down
2 changes: 1 addition & 1 deletion examples/C/filter_example.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ test_bzip2(void)
/* Show chunking */
printf("show chunks:");
for(i=0;i<actualdims;i++)
printf("%s%d",(i==0?" chunks=":","),chunks[i]);
printf("%s%ld",(i==0?" chunks=":","),chunks[i]);
printf("\n");

/* prepare to write */
Expand Down
1 change: 1 addition & 0 deletions include/nc_tests.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#define ONE_TWENTY_EIGHT_MEG (SIXTEEN_MEG * 8)
#define TEST_VAL_42 42
#define BAD_NAME "dd//d/ "
#define NUM_CLASSIC_TYPES 6
#define NUM_NETCDF_TYPES 12
/** \} */

Expand Down
54 changes: 40 additions & 14 deletions libdispatch/dvar.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*! \file
Functions for defining and inquiring about variables.

Copyright 2010 University Corporation for Atmospheric
Research/Unidata. See COPYRIGHT file for more info.
/* Copyright 2010-2018 University Corporation for Atmospheric
Research/Unidata. See COPYRIGHT file for more info. */
/**
* @file
* Functions for defining and inquiring about variables.
*/

#include "ncdispatch.h"
Expand Down Expand Up @@ -239,6 +239,10 @@ For classic format, 64-bit offset format, and netCDF-4/HDF5 with
classic mode, if the new name is longer than the old name, the netCDF
dataset must be in define mode.

For netCDF-4/HDF5 files, renaming the variable changes the order of
the variables in the file. The renamed variable becomes the last
variable in the file.

@param ncid NetCDF or group ID, from a previous call to nc_open(),
nc_create(), nc_def_grp(), or associated inquiry functions such as
nc_inq_ncid().
Expand Down Expand Up @@ -279,7 +283,7 @@ rel_hum in an existing netCDF dataset named foo.nc:
status = nc_enddef(ncid);
if (status != NC_NOERR) handle_error(status);
@endcode

@author Glenn Davis, Ed Hartnett, Dennis Heimbigner
*/
int
nc_rename_var(int ncid, int varid, const char *name)
Expand Down Expand Up @@ -416,13 +420,16 @@ NC_inq_recvar(int ncid, int varid, int* nrecdimsp, int *is_recdim)
entirely.
*/

/** \internal
\ingroup variables
Find the length of a type. This is how much space is required by the user, as in
\code
vals = malloc(nel * nctypelen(var.type));
ncvarget(cdfid, varid, cor, edg, vals);
\endcode
/**
* @internal
* @ingroup variables
* Find the length of a type. This is how much space is required by
* the in memory to hold one element of this type.
*
* @parm type A netCDF atomic type.
*
* @return Length of the type in bytes, or -1 if type not found.
* @author Ed Hartnett
*/
int
nctypelen(nc_type type)
Expand Down Expand Up @@ -761,11 +768,22 @@ nc_free_string(size_t len, char **data)
* This function must be called after nc_def_var and before nc_enddef
* or any functions which writes data to the file.
*
* Deflation and shuffline require chunked data. If this function is
* called on a variable with contigious data, then the data is changed
* to chunked data, with default chunksizes. Use nc_def_var_chunking()
* to tune performance with user-defined chunksizes.
*
* If this function is called on a scalar variable, it is ignored.
*
* @param ncid NetCDF or group ID, from a previous call to nc_open(),
* nc_create(), nc_def_grp(), or associated inquiry functions such as
* nc_inq_ncid().
* @param varid Variable ID
* @param shuffle True to turn on the shuffle filter.
* @param shuffle True to turn on the shuffle filter. The shuffle
* filter can assist with the compression of integer data by changing
* the byte order in the data stream. It makes no sense to use the
* shuffle filter without setting a deflate level, or to use shuffle
* on non-integer data.
* @param deflate True to turn on deflation for this variable.
* @param deflate_level A number between 0 (no compression) and 9
* (maximum compression).
Expand Down Expand Up @@ -833,6 +851,7 @@ filter and compression.
ERR(retval);
...
@endcode
* @author Ed Hartnett, Dennis Heimbigner
*/
int
nc_def_var_deflate(int ncid, int varid, int shuffle, int deflate, int deflate_level)
Expand All @@ -851,6 +870,11 @@ nc_def_var_deflate(int ncid, int varid, int shuffle, int deflate, int deflate_le
* This function must be called after nc_def_var and before nc_enddef
* or any functions which writes data to the file.
*
* Checksums require chunked data. If this function is called on a
* variable with contigious data, then the data is changed to chunked
* data, with default chunksizes. Use nc_def_var_chunking() to tune
* performance with user-defined chunksizes.
*
* @param ncid NetCDF or group ID, from a previous call to nc_open(),
* nc_create(), nc_def_grp(), or associated inquiry functions such as
* nc_inq_ncid().
Expand All @@ -867,6 +891,7 @@ not netCDF-4/HDF5.
netcdf-4 file.
* @returns ::NC_ELATEDEF Too late to change settings for this variable.
* @returns ::NC_EINVAL Invalid input
* @author Ed Hartnett, Dennis Heimbigner
*/
int
nc_def_var_fletcher32(int ncid, int varid, int fletcher32)
Expand Down Expand Up @@ -1066,6 +1091,7 @@ nc_def_var_endian(int ncid, int varid, int endian)
* @param parms Filter parameters.
*
* @return ::NC_NOERR No error.
* @return ::NC_EBADID Bad ID.
* @author Dennis Heimbigner
*/
int
Expand Down
Loading