Merge branch 'master' into open_check_vlens

This commit is contained in:
Ward Fisher 2017-05-05 17:02:36 -06:00 committed by GitHub
commit 051bd3b81a
800 changed files with 46000 additions and 14630 deletions

2
.gitignore vendored
View File

@ -10,6 +10,8 @@ ctest.c
ctest64.c
nc_test/test_get.c
nc_test/test_put.c
nc_test/test_read.c
nc_test/test_write.c
#####
# End ignored generated files.

View File

@ -7,7 +7,7 @@
##################################
#Minimum required CMake Version
cmake_minimum_required(VERSION 2.8.11)
cmake_minimum_required(VERSION 3.6.1)
#Project Name
project(netCDF C)
@ -101,10 +101,10 @@ INCLUDE(${CMAKE_ROOT}/Modules/GetPrerequisites.cmake)
INCLUDE(CheckCCompilerFlag)
FIND_PACKAGE(PkgConfig QUIET)
# Check for Big Endian
# A check to see if the system is big endian
TEST_BIG_ENDIAN(BIGENDIAN)
IF(${BIGENDIAN})
SET(WORDS_BIGENDIAN "1")
SET(WORDS_BIGENDIAN "1")
ENDIF(${BIGENDIAN})
# A macro to check if a C linker supports a particular flag.
@ -627,6 +627,7 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4)
SET(HDF5_C_LIBRARY ${HDF5_C_${NC_HDF5_LINK_TYPE_UPPER}_LIBRARY})
SET(HDF5_C_LIBRARY_hdf5 ${HDF5_C_${NC_HDF5_LINK_TYPE_UPPER}_LIBRARY})
SET(HDF5_HL_LIBRARY ${HDF5_HL_${NC_HDF5_LINK_TYPE_UPPER}_LIBRARY})
SET(HDF5_LIBRARIES ${HDF5_C_${NC_HDF5_LINK_TYPE_UPPER}_LIBRARY} ${HDF5_HL_${NC_HDF5_LINK_TYPE_UPPER}_LIBRARY})
ENDIF()
ENDIF(${HDF5_VERSION} VERSION_GREATER "1.8.15")
@ -644,14 +645,20 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4)
SET(HDF5_C_LIBRARY hdf5)
ENDIF()
ENDIF(HDF5_C_LIBRARY AND HDF5_HL_LIBRARY AND HDF5_INCLUDE_DIR)
# There is a missing case in the above code so default it
IF("${HDF5_C_LIBRARY_hdf5}" STREQUAL "" )
SET(HDF5_C_LIBRARY_hdf5 "${HDF5_C_LIBRARY}")
ENDIF()
###
# The following options are not used in Windows.
# The following options are not used in Windows currently.
###
IF(NOT MSVC)
# Find out if HDF5 was built with parallel support.
# Do that by checking for the targets H5Pget_fapl_mpiposx and
# H5Pget_fapl_mpio in ${HDF5_LIB}.
CHECK_LIBRARY_EXISTS(${HDF5_C_LIBRARY_hdf5} H5Pget_fapl_mpiposix "" HDF5_IS_PARALLEL_MPIPOSIX)
CHECK_LIBRARY_EXISTS(${HDF5_C_LIBRARY_hdf5} H5Pget_fapl_mpio "" HDF5_IS_PARALLEL_MPIO)
IF(HDF5_IS_PARALLEL_MPIPOSIX OR HDF5_IS_PARALLEL_MPIO)
@ -751,10 +758,15 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4)
ENDIF(USE_HDF5 OR ENABLE_NETCDF_4)
# Option to Build DAP Client
OPTION(ENABLE_DAP "Enable DAP Client." ON)
# Option to Build DAP2+DAP4 Clients
OPTION(ENABLE_DAP "Enable DAP2 and DAP4 Client." ON)
IF(ENABLE_DAP)
SET(USE_DAP ON)
SET(ENABLE_DAP2 ON)
SET(ENABLE_DAP4 ON)
IF(NOT ENABLE_NETCDF_4)
SET(ENABLE_DAP4 OFF)
ENDIF()
FIND_PACKAGE(CURL)
IF(NOT CURL_LIBRARY)
MESSAGE(FATAL_ERROR "DAP Support specified, CURL libraries are not found.")
@ -793,8 +805,9 @@ IF(ENABLE_DAP)
#include <curl/curl.h>
int main() {int x = CURLOPT_CHUNK_BGN_FUNCTION;}" HAVE_CURLOPT_CHUNK_BGN_FUNCTION)
ELSE()
SET(ENABLE_DAP2 OFF)
SET(ENABLE_DAP4 OFF)
ENDIF()
# Check to see if libtool supports
@ -811,14 +824,10 @@ ENDIF()
# Option to Enable DAP long tests, remote tests.
OPTION(ENABLE_DAP_LONG_TESTS "Enable DAP long tests." OFF)
OPTION(ENABLE_DAP_REMOTE_TESTS "Enable DAP remote tests." ON)
IF(ENABLE_DAP_REMOTE_TESTS)
OPTION(ENABLE_DAP_AUTH_TESTS "Enable DAP remote authorization tests." OFF)
ENDIF()
SET(REMOTETESTSERVERS "remotetest.unidata.ucar.edu,jetstream.unidata.ucar.edu" CACHE STRING "test servers to use for remote test")
# If netCDF4 and DAP, Option for DAP groups.
IF(ENABLE_NETCDF_4 AND USE_DAP)
IF(ENABLE_NETCDF_4 AND ENABLE_DAP2)
OPTION(ENABLE_DAP_GROUPS "Whether netcdf4 group names should be enabled." ON)
ELSE()
SET(ENABLE_DAP_GROUPS OFF CACHE BOOL "Whether netcdf4 group names should be enabled.")
@ -984,14 +993,14 @@ IF(ENABLE_PNETCDF)
FIND_LIBRARY(PNETCDF NAMES pnetcdf)
FIND_PATH(PNETCDF_INCLUDE_DIR pnetcdf.h)
IF(NOT PNETCDF)
MESSAGE(STATUS "Cannot find PNetCDF library. Disabling PNetCDF support.")
MESSAGE(STATUS "Cannot find PnetCDF library. Disabling PnetCDF support.")
SET(USE_PNETCDF OFF CACHE BOOL "")
ELSE(NOT PNETCDF)
SET(USE_PARALLEL ON CACHE BOOL "")
# Check PNetCDF version. Must be >= 1.6.0
# Check PnetCDF version. Must be >= 1.6.0
set(pnetcdf_h "${PNETCDF_INCLUDE_DIR}/pnetcdf.h" )
message(STATUS "PNetCDF include file ${pnetcdf_h} will be searched for version")
message(STATUS "PnetCDF include file ${pnetcdf_h} will be searched for version")
file(STRINGS "${pnetcdf_h}" pnetcdf_major_string REGEX "^#define PNETCDF_VERSION_MAJOR")
string(REGEX REPLACE "[^0-9]" "" pnetcdf_major "${pnetcdf_major_string}")
file(STRINGS "${pnetcdf_h}" pnetcdf_minor_string REGEX "^#define PNETCDF_VERSION_MINOR")
@ -999,7 +1008,7 @@ IF(ENABLE_PNETCDF)
file(STRINGS "${pnetcdf_h}" pnetcdf_sub_string REGEX "^#define PNETCDF_VERSION_SUB")
string(REGEX REPLACE "[^0-9]" "" pnetcdf_sub "${pnetcdf_sub_string}")
set(pnetcdf_version "${pnetcdf_major}.${pnetcdf_minor}.${pnetcdf_sub}")
message(STATUS "Found PNetCDF version ${pnetcdf_version}")
message(STATUS "Found PnetCDF version ${pnetcdf_version}")
if(${pnetcdf_version} VERSION_GREATER "1.6.0")
SET(STATUS_PNETCDF "ON")
@ -1008,13 +1017,66 @@ IF(ENABLE_PNETCDF)
# pnetcdf => parallel
SET(STATUS_PARALLEL ON)
SET(USE_PARALLEL ON)
MESSAGE(STATUS "Using PNetCDF Library: ${PNETCDF}")
MESSAGE(STATUS "Using PnetCDF Library: ${PNETCDF}")
ELSE()
MESSAGE(WARNING "ENABLE_PNETCDF requires version 1.6.1 or later; found version ${pnetcdf_version}. PNetCDF is disabled")
MESSAGE(WARNING "ENABLE_PNETCDF requires version 1.6.1 or later; found version ${pnetcdf_version}. PnetCDF is disabled")
ENDIF()
ENDIF(NOT PNETCDF)
ENDIF()
# Options to enable use of fill values for elements casuing NC_ERANGE
SET(STATUS_ERANGE_FILL "OFF")
OPTION(ENABLE_ERANGE_FILL "Enable use of fill value when out-of-range type conversion causes NC_ERANGE error." OF)
IF(ENABLE_ERANGE_FILL)
SET(STATUS_ERANGE_FILL "ON")
ENDIF()
# Options to use a more relaxed coordinate argument boundary check
SET(STATUS_RELAX_COORD_BOUND "OFF")
OPTION(ENABLE_ZERO_LENGTH_COORD_BOUND "Enable a more relaxed boundary error check NC_EINVALCOORDS to allow coordinate start argument equal to dimension size when argument count is zero." OFF)
IF(ENABLE_ZERO_LENGTH_COORD_BOUND)
SET(STATUS_RELAX_COORD_BOUND "ON")
ENDIF()
# check and conform with PnetCDF settings on ERANGE_FILL and RELAX_COORD_BOUND
IF(STATUS_PNETCDF)
file(STRINGS "${pnetcdf_h}" enable_erange_fill_pnetcdf REGEX "^#define PNETCDF_ERANGE_FILL")
string(REGEX REPLACE "[^0-9]" "" erange_fill_pnetcdf "${enable_erange_fill_pnetcdf}")
IF("x${erange_fill_pnetcdf}" STREQUAL "x1")
IF(NOT STATUS_ERANGE_FILL)
MESSAGE(WARNING "Enable erange-fill to conform with PnetCDF setting")
SET(STATUS_ERANGE_FILL "ON")
ENDIF()
ELSE()
IF(STATUS_ERANGE_FILL)
MESSAGE(WARNING "Disable erange-fill to conform with PnetCDF setting")
SET(STATUS_ERANGE_FILL "OFF")
ENDIF()
ENDIF()
file(STRINGS "${pnetcdf_h}" relax_coord_bound_pnetcdf REGEX "^#define PNETCDF_RELAX_COORD_BOUND")
string(REGEX REPLACE "[^0-9]" "" relax_coord_bound "${relax_coord_bound_pnetcdf}")
IF("x${relax_coord_bound}" STREQUAL "x1")
IF(NOT STATUS_RELAX_COORD_BOUND)
MESSAGE(WARNING "Enable relax-coord-bound to conform with PnetCDF setting")
SET(STATUS_RELAX_COORD_BOUND "ON")
ENDIF()
ELSE()
IF(STATUS_RELAX_COORD_BOUND)
MESSAGE(WARNING "Disable relax-coord-bound to conform with PnetCDF setting")
SET(STATUS_RELAX_COORD_BOUND "OFF")
ENDIF()
ENDIF()
ENDIF()
IF(STATUS_ERANGE_FILL)
SET(M4FLAGS "-DERANGE_FILL" CACHE STRING "")
ENDIF()
IF(STATUS_RELAX_COORD_BOUND)
MESSAGE(STATUS "Enabling a more relatexed check for NC_EINVALCOORDS")
ADD_DEFINITIONS(-DRELAX_COORD_BOUND)
ENDIF()
# Enable Parallel Tests.
OPTION(ENABLE_PARALLEL_TESTS "Enable Parallel IO Tests. Ignored if netCDF4 is not enabled, or if there is no parallel I/O Support." ${USE_PARALLEL})
IF(ENABLE_PARALLEL_TESTS AND USE_PARALLEL)
@ -1148,6 +1210,9 @@ CHECK_INCLUDE_FILE("stdbool.h" HAVE_STDBOOL_H)
CHECK_INCLUDE_FILE("locale.h" HAVE_LOCALE_H)
CHECK_INCLUDE_FILE("stdint.h" HAVE_STDINT_H)
CHECK_INCLUDE_FILE("stdio.h" HAVE_STDIO_H)
IF(MSVC)
CHECK_INCLUDE_FILE("io.h" HAVE_IO_H)
ENDIF(MSVC)
CHECK_INCLUDE_FILE("stdlib.h" HAVE_STDLIB_H)
CHECK_INCLUDE_FILE("stdarg.h" HAVE_STDARG_H)
CHECK_INCLUDE_FILE("strings.h" HAVE_STRINGS_H)
@ -1195,7 +1260,9 @@ CHECK_SYMBOL_EXISTS(vprintf "stdio.h" HAVE_VPRINTF)
SET(HAVE_ST_BLKSIZE ${HAVE_STRUCT_STAT_ST_BLKSIZE})
# Type checks
CHECK_TYPE_SIZE("void*" SIZEOF_VOIDSTAR)
# Aliases for automake consistency
SET(SIZEOF_VOIDSTAR ${CMAKE_SIZEOF_VOID_P})
SET(SIZEOF_VOIDP ${SIZEOF_VOIDSTAR})
CHECK_TYPE_SIZE("char" SIZEOF_CHAR)
CHECK_TYPE_SIZE("double" SIZEOF_DOUBLE)
CHECK_TYPE_SIZE("float" SIZEOF_FLOAT)
@ -1242,9 +1309,13 @@ ENDIF(SIZEOF_PTRDIFF_T)
# __int64 is used on Windows for large file support.
CHECK_TYPE_SIZE("__int64" SIZEOF___INT_64)
CHECK_TYPE_SIZE("uchar" SIZEOF_UCHAR)
CHECK_TYPE_SIZE("int64_t" SIZEOF_INT64_T)
CHECK_TYPE_SIZE("uint64_t" SIZEOF_UINT64_T)
CHECK_TYPE_SIZE("unsigned char" SIZEOF_UCHAR)
CHECK_TYPE_SIZE("unsigned short int" SIZEOF_UNSIGNED_SHORT_INT)
CHECK_TYPE_SIZE("unsigned int" SIZEOF_UNSIGNED_INT)
CHECK_TYPE_SIZE("long long" SIZEOF_LONGLONG)
CHECK_TYPE_SIZE("unsigned long long" SIZEOF_ULONGLONG)
# On windows systems, we redefine off_t as __int64
# to enable LFS. This is true on 32 and 64 bit system.s
@ -1313,6 +1384,7 @@ ENDIF(ENABLE_MMAP)
################################
# Macro to append files to the EXTRA_DIST files.
# Note: can only be used in subdirectories because of the use of PARENT_SCOPE
SET(EXTRA_DIST "")
MACRO(ADD_EXTRA_DIST files)
FOREACH(F ${files})
@ -1338,7 +1410,7 @@ IF(HAVE_M4)
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/${filename}.c
COMMAND ${NC_M4}
ARGS ${CMAKE_CURRENT_SOURCE_DIR}/${filename}.m4 > ${CMAKE_CURRENT_SOURCE_DIR}/${filename}.c
ARGS ${M4FLAGS} ${CMAKE_CURRENT_SOURCE_DIR}/${filename}.m4 > ${CMAKE_CURRENT_SOURCE_DIR}/${filename}.c
VERBATIM
)
ENDIF(HAVE_M4)
@ -1442,7 +1514,9 @@ MACRO(add_bin_test prefix F)
PROPERTIES LINK_FLAGS_DEBUG " /NODEFAULTLIB:MSVCRT"
)
ENDIF()
ADD_TEST(${prefix}_${F} ${EXECUTABLE_OUTPUT_PATH}/${prefix}_${F})
ADD_TEST(${prefix}_${F}
${EXECUTABLE_OUTPUT_PATH}/${prefix}_${F}
)
IF(MSVC)
SET_PROPERTY(TEST ${prefix}_${F} PROPERTY FOLDER "tests/")
SET_TARGET_PROPERTIES(${prefix}_${F} PROPERTIES RUNTIME_OUTPUT_DIRECTORY
@ -1462,7 +1536,8 @@ MACRO(print_conf_summary)
MESSAGE("")
MESSAGE(STATUS "Building Shared Libraries: ${BUILD_SHARED_LIBS}")
MESSAGE(STATUS "Building netCDF-4: ${ENABLE_NETCDF_4}")
MESSAGE(STATUS "Building DAP Support: ${ENABLE_DAP}")
MESSAGE(STATUS "Building DAP2 Support: ${ENABLE_DAP2}")
MESSAGE(STATUS "Building DAP4 Support: ${ENABLE_DAP4}")
MESSAGE(STATUS "Building Utilities: ${BUILD_UTILITIES}")
IF(CMAKE_PREFIX_PATH)
MESSAGE(STATUS "CMake Prefix Path: ${CMAKE_PREFIX_PATH}")
@ -1479,7 +1554,6 @@ MACRO(print_conf_summary)
MESSAGE("Tests Enabled: ${ENABLE_TESTS}")
IF(ENABLE_TESTS)
MESSAGE(STATUS "DAP Remote Tests: ${ENABLE_DAP_REMOTE_TESTS}")
MESSAGE(STATUS "DAP AUTH Tests: ${ENABLE_DAP_AUTH_TESTS}")
MESSAGE(STATUS "Extra Tests: ${ENABLE_EXTRA_TESTS}")
MESSAGE(STATUS "Coverage Tests: ${ENABLE_COVERAGE_TESTS}")
MESSAGE(STATUS "Parallel Tests: ${ENABLE_PARALLEL_TESTS}")
@ -1615,11 +1689,15 @@ IF(USE_HDF5)
add_subdirectory(libsrc4)
ENDIF(USE_HDF5)
IF(USE_DAP)
IF(ENABLE_DAP2)
ADD_SUBDIRECTORY(oc2)
ADD_SUBDIRECTORY(libdap2)
ENDIF()
IF(ENABLE_DAP4)
ADD_SUBDIRECTORY(libdap4)
ENDIF()
add_subdirectory(liblib)
# For tests and utilities, we are no longer
@ -1647,10 +1725,12 @@ IF(ENABLE_TESTS)
ADD_SUBDIRECTORY(nc_test4)
ADD_SUBDIRECTORY(h5_test)
ENDIF()
IF(USE_DAP AND ENABLE_DAP_REMOTE_TESTS)
IF(ENABLE_DAP2)
ADD_SUBDIRECTORY(ncdap_test)
ENDIF()
IF(ENABLE_DAP4)
ADD_SUBDIRECTORY(dap4_test)
ENDIF()
IF(ENABLE_EXAMPLES)
ADD_SUBDIRECTORY(examples)
ENDIF()
@ -1742,7 +1822,8 @@ configure_file(
FILE(MAKE_DIRECTORY ${netCDF_BINARY_DIR}/tmp)
configure_file("${netCDF_SOURCE_DIR}/nc-config.cmake.in"
"${netCDF_BINARY_DIR}/tmp/nc-config" @ONLY)
"${netCDF_BINARY_DIR}/tmp/nc-config" @ONLY
NEWLINE_STYLE LF)
FILE(COPY "${netCDF_BINARY_DIR}/tmp/nc-config"
DESTINATION ${netCDF_BINARY_DIR}/
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
@ -1802,10 +1883,12 @@ is_enabled(USE_SZIP HAS_SZIP)
is_enabled(STATUS_PNETCDF HAS_PNETCDF)
is_enabled(STATUS_PARALLEL HAS_PARALLEL)
is_enabled(ENABLE_PARALLEL4 HAS_PARALLEL4)
is_enabled(USE_DAP HAS_DAP)
is_enabled(ENABLE_DAP HAS_DAP)
is_enabled(ENABLE_DAP4 HAS_DAP4)
is_enabled(USE_DISKLESS HAS_DISKLESS)
is_enabled(USE_MMAP HAS_MMAP)
is_enabled(JNA HAS_JNA)
is_enabled(STATUS_RELAX_COORD_BOUND RELAX_COORD_BOUND)
# Generate file from template.
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/libnetcdf.settings.in"
@ -1839,6 +1922,14 @@ configure_file(
FILE(COPY ${netCDF_SOURCE_DIR}/include/netcdf_meta.h
DESTINATION ${netCDF_BINARY_DIR}/include/)
#####
# Build test_common.sh
#####
SET(EXTRA_DIST ${EXTRA_DIST} ${CMAKE_SOURCE_DIR}/test_common.in)
SET(TOPSRCDIR "${CMAKE_SOURCE_DIR}")
SET(TOPBUILDDIR "${CMAKE_BINARY_DIR}")
configure_file(${CMAKE_SOURCE_DIR}/test_common.in ${CMAKE_BINARY_DIR}/test_common.sh @ONLY NEWLINE_STYLE LF)
####
# Export files
####

View File

@ -2,6 +2,7 @@ The NetCDF Copyright.
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014,
2015, 2016
University Corporation for Atmospheric Research/Unidata.
Portions of this software were developed by the Unidata Program at the

13
Make0
View File

@ -1,6 +1,7 @@
T=t
T=t_dap3a
NCLIB=./liblib/.libs/libnetcdf.a
D4LIB=./libdap4/.libs/libdap4.a
LFLAG=-L/usr/local/lib
@ -10,7 +11,7 @@ LFLAG=-L/usr/local/lib
OTHERLIBS=-lm
LIBS=${NCLIB} ${LFLAG} ${CURLLIB} ${HDF5LIB} ${ZLIB} ${OTHERLIBS}
LIBS=${D4LIB} ${NCLIB} ${LFLAG} ${CURLLIB} ${HDF5LIB} ${ZLIB} ${OTHERLIBS}
INCL=-I. -I./include
RPATH=-Wl,-rpath,${LFLAG}
@ -29,3 +30,11 @@ all::
clean:
rm -f ${T}.o ${T}.exe
EZXML=ezxml-0.8.6.tar.gz
ezxml::
rm -fr ./ezxml ./ezxml.[ch]
tar -zxf ./${EZXML}
sed -e 's|//\(.*\)|/*\1*/|' <ezxml/ezxml.c >./ezxml.c
sed -e 's|//\(.*\)|/*\1*/|' <ezxml/ezxml.h >./ezxml.h

View File

@ -15,7 +15,7 @@ EXTRA_DIST = README.md COPYRIGHT INSTALL.md test_prog.c \
FixBundle.cmake.in \
nc-config.cmake.in RELEASE_NOTES.md CTestCustom.cmake \
CTestConfig.cmake.in libnetcdf.settings.in netCDFConfig.cmake.in \
CMakeInstallation.cmake
CMakeInstallation.cmake test-driver-verbose test_common.in
# Doxygen doesn't build nicely in vpath builds.
# Don't do this; it wipes out any exported values
@ -53,15 +53,18 @@ LIBSRC4_DIR = libsrc4
NC_TEST4 = nc_test4
endif
# Build the opendap client?
if BUILD_DAP
# Build the dap2 client
if ENABLE_DAP
OCLIB = oc2
DAP2 = libdap2
#if BUILD_UTILITIES
NCDAPTESTDIR = ncdap_test
#endif # BUILD_UTILITIES
NCDAP2TESTDIR = ncdap_test
endif
if ENABLE_DAP4
DAP4 = libdap4
NCDAP4TESTDIR = dap4_test
endif #DAP4
# Build pnetcdf
if USE_PNETCDF
LIBSRCP = libsrcp
@ -79,21 +82,21 @@ endif
# Define Test directories
if BUILD_TESTSETS
TESTDIRS = $(V2_TEST) nc_test $(NC_TEST4) $(NCDAPTESTDIR)
TESTDIRS = $(V2_TEST) nc_test $(NC_TEST4) $(NCDAP2TESTDIR) $(NCDAP4TESTDIR)
endif
# This is the list of subdirs for which Makefiles will be constructed
# and run. ncgen must come before ncdump, because their tests
# depend on it.
SUBDIRS = include $(OCLIB) $(H5_TEST_DIR) libdispatch libsrc \
$(LIBSRC4_DIR) $(DAP2) $(LIBCDMR) $(LIBSRCP) liblib \
SUBDIRS = include $(H5_TEST_DIR) libdispatch libsrc \
$(LIBSRC4_DIR) $(LIBSRCP) $(OCLIB) $(DAP2) ${DAP4} liblib \
$(NCGEN3) $(NCGEN) $(NCDUMP) \
$(TESTDIRS) \
docs $(EXAMPLES) \
$(UDUNITS) $(LIBCF)
# Remove these generated files, for a distclean.
DISTCLEANFILES = VERSION comps.txt test_prog libnetcdf.settings
DISTCLEANFILES = VERSION comps.txt test_prog libnetcdf.settings test_common.sh
# The nc-config script helps the user build programs with netCDF.
bin_SCRIPTS = nc-config
@ -128,6 +131,7 @@ settings_DATA=libnetcdf.settings
####
MM4= ./nc_test/test_put ./nc_test/test_get \
./nc_test/test_write ./nc_test/test_read \
./libsrc/netcdf ./libsrc/putget ./libsrc/ncx \
./libsrc/t_ncxx ./libsrc/attr
@ -182,6 +186,14 @@ check_nc_config:
$(CC) `./nc-config --cflags` test_prog.c -o test_prog `./nc-config --libs`
./test_prog
# Build nc_test/test_common.sh
# Complicated by need to create during distcheck
# which uses a read-only source tree
#all-local:
# rm -f ${top_builddir}/nc_test/test_common.sh
# cat /dev/null > ${top_builddir}/nc_test/test_common.sh
# chmod a+x ${top_builddir}/nc_test/test_common.sh
# sed -e "s|@TOPSRCDIR@|${abs_top_srcdir}|" -e "s|@TOPBUILDDIR@|${abs_top_builddir}|" <${top_srcdir}/test_common.in >>${top_builddir}/test_common.sh
install-data-hook:

11
RELEASE_NOTES.md Executable file → Normal file
View File

@ -7,6 +7,17 @@ This file contains a high-level description of this package's evolution. Release
## 4.4.2 - TBD
* [Bug Fix] Corrected an issue with diskless file access, see [Pull Request #400](https://github.com/Unidata/netcdf-c/issues/400) and [Pull Request #403](https://github.com/Unidata/netcdf-c/issues/403) for more information.
* [Enhancement] DAP4 is now included. Since dap2 is the default for urls, dap4 must be specified by
(1) using "dap4:" as the url protocol, or
(2) appending "#protocol=dap4" to the end of the url, or
(3) appending "#dap4" to the end of the url
Note that dap4 is enabled by default but remote-testing is
disbled until the testserver situation is resolved.
* [Enhancement] The remote testing server can now be specified with the '--with-testserver" option to ./configure.
* [Upgrade] The bash based test scripts have been upgraded to use a common test_common.sh include file that isolates build specific information.
* [Upgrade] The bash based test scripts have been upgraded to use a common test_common.sh include file that isolates build specific information.
* [Refactor] the oc2 library is no longer independent of the main netcdf-c library. For example, it now uses ncuri, nclist, and ncbytes instead of its homegrown equivalents.
* [Bug Fix] `NC_EGLOBAL` is now properly returned when attempting to set a global `_FillValue` attribute. See [GitHub #388](https://github.com/Unidata/netcdf-c/issues/388) and [GitHub #389](https://github.com/Unidata/netcdf-c/issues/389) for more information.
* [Bug Fix] Corrected an issue where data loss would occur when `_FillValue` was mistakenly allowed to be redefined. See [Github #390](https://github.com/Unidata/netcdf-c/issues/390), [GitHub #387](https://github.com/Unidata/netcdf-c/pull/387) for more information.
* [Enhancement] Modified netCDF4 to use ASCII for NC_CHAR. See [Github Pull request #316](https://github.com/Unidata/netcdf-c/pull/316) for more information.

View File

@ -749,3 +749,25 @@ esac
])# AX_C_FLOAT_WORDS_BIGENDIAN
dnl Find the full path of a header file
dnl
dnl UD_CHECK_HEADER_PATH(file, [action-if-found], [action-if-not-found])
dnl Example:
dnl UD_CHECK_HEADER_PATH([math.h])
dnl AC_MSG_NOTICE([ac_cv_header_path_math_h=$ac_cv_header_path_math_h])
dnl
dnl
AC_DEFUN([UD_CHECK_HEADER_PATH],
[
AS_VAR_PUSHDEF([ac_Path], [ac_cv_header_path_$1])dnl
AC_CACHE_CHECK(
[for full path of header file $1], [ac_Path],
[AC_PREPROC_IFELSE(
[AC_LANG_PROGRAM([[#include <$1>]])],
[AS_VAR_SET([ac_Path], [`sed -n '/\.h"/s/.*"\(.*\)".*/\1/p' conftest.i | grep -m 1 $1`])],
[AC_MSG_RESULT([not found])]
)])
AS_VAR_SET_IF([ac_Path], [$2], [$3])
AS_VAR_POPDEF([ac_Path])dnl
])

35
cf
View File

@ -2,7 +2,7 @@
#NB=1
DB=1
#X=-x
#FAST=1
FAST=1
HDF5=1
DAP=1
@ -54,24 +54,8 @@ MALLOC_CHECK=""
CPPFLAGS=""
LDFLAGS=""
CFLAGS="-g -O0 $CFLAGS"
case "$HOST" in
mort)
CFLAGS="-std=c99 $CFLAGS"
;;
yakov)
CFLAGS="-std=c99 $CFLAGS"
;;
spock)
CFLAGS="-Wdeclaration-after-statement -Wall $CFLAGS"
;;
spike)
CFLAGS="-Wall $CFLAGS"
;;
*)
;;
esac
#CFLAGS="-g -O0 $CFLAGS"
CFLAGS="-g $CFLAGS"
MAKE=make
IGNORE="test 0 = 1"
@ -86,7 +70,8 @@ if test "x$HDF4" = "x1" ; then
LDFLAGS="$LDFLAGS -ljpeg"
fi
if test "x$DAP" = "x1" -o "x$CDMR" = "x1" -o "x$RPC" = "x1" ; then
export PKG_CONFIG_PATH=/usr/lib/pkgconfig
if test "x$DAP" = "x1" ; then
if curl-config --version >/dev/null ; then
TMP=`curl-config --cflags`
CPPFLAGS="$TMP $CPPFLAGS"
@ -95,8 +80,7 @@ LDFLAGS="$TMP $LDFLAGS"
TMP=`curl-config --prefix`
LD_LIBRARY_PATH="$TMP/lib:$LD_LIBRARY_PATH"
else
echo "Cannot find curl-config"
exit 1
LDFLAGS="${LDFLAGS} -lcurl"
fi
fi
@ -111,11 +95,12 @@ FLAGS="$FLAGS --disable-examples"
#FLAGS="$FLAGS --enable-dap-long-tests"
#FLAGS="$FLAGS --enable-ffio"
#FLAGS="$FLAGS --enable-benchmarks"
#FLAGS="$FLAGS --enable-extra-tests"
FLAGS="$FLAGS --enable-extreme-numbers"
FLAGS="$FLAGS --enable-extra-tests"
#FLAGS="$FLAGS --enable-large-file-tests"
#FLAGS="$FLAGS --disable-testsets"
#FLAGS="$FLAGS --disable-dap-remote-tests"
FLAGS="$FLAGS --enable-dap-auth-tests"
#FLAGS="$FLAGS --enable-dap-auth-tests" -- requires a new remotetest server
#FLAGS="$FLAGS --enable-doxygen"
FLAGS="$FLAGS --enable-logging"
#FLAGS="$FLAGS --disable-diskless"
@ -127,6 +112,8 @@ FLAGS="$FLAGS --enable-logging"
#FLAGS="$FLAGS --enable-jna"
#FLAGS="$FLAGS --disable-properties-attribute"
#FLAGS="$FLAGS --disable-silent-rules"
#FLAGS="$FLAGS --enable-dap4"
#FLAGS="$FLAGS --with-testservers=remotestserver.localhost:8083"
if test "x$PAR4" != x1 ; then
FLAGS="$FLAGS --disable-parallel4"

51
cf.cmake Normal file
View File

@ -0,0 +1,51 @@
# Visual Studio
#VS=1
# Is netcdf-4 and/or DAP enabled?
NC4=1
DAP=1
if test "x$VS" != x ; then
FLAGS="-DCMAKE_PREFIX_PATH=c:/tools/nccmake"
fi
FLAGS="$FLAGS -DCMAKE_INSTALL_PREFIX=d:/ignore"
if test "x$DAP" = x ; then
FLAGS="$FLAGS -DENABLE_DAP=false"
else
FLAGS="$FLAGS -DENABLE_DAP=true"
fi
if test "x$NC4" = x ; then
FLAGS="$FLAGS -DENABLE_NETCDF_4=false"
fi
FLAGS="$FLAGS -DENABLE_CONVERSION_WARNINGS=false"
FLAGS="$FLAGS -DENABLE_DAP_REMOTE_TESTS=true"
FLAGS="$FLAGS -DENABLE_TESTS=true"
FLAGS="$FLAGS -DENABLE_EXAMPLES=false"
#FLAGS="$FLAGS -DENABLE_HDF4=true"
FLAGS="$FLAGS -DENABLE_DYNAMIC_LOADING=false"
rm -fr build
mkdir build
cd build
NCLIB=`pwd`
if test "x$VS" != x ; then
# Visual Studio
#CFG="RelWithDebInfo"
CFG="Release"
NCLIB="${NCLIB}/build/liblib/$CFG"
export PATH="${NCLIB}:${PATH}"
cmake $FLAGS ..
cmake --build . --config ${CFG}
cmake --build . --config ${CFG} --target RUN_TESTS
else
# GCC
NCLIB="${NCLIB}/build/liblib"
G="-GUnix Makefiles"
cmake "${G}" $FLAGS ..
make all
make test
fi
exit

View File

@ -45,7 +45,9 @@ are set when opening a binary file on Windows. */
#define fdopen _fdopen
#define write _write
#define strtoll _strtoi64
#endif
#endif /*_MSC_VER */
#cmakedefine const
/* Define if building universal (internal helper macro) */
#cmakedefine AC_APPLE_UNIVERSAL_BUILD 1
@ -82,15 +84,24 @@ are set when opening a binary file on Windows. */
/* set this only when building a DLL under MinGW */
#cmakedefine DLL_NETCDF 1
/* if true, build DAP Client */
/* if true, build DAP2 and DAP4 Client */
#cmakedefine ENABLE_DAP 1
/* if true, build DAP4 Client */
#cmakedefine ENABLE_DAP4 1
/* if true, build DAP4 Client */
#cmakedefine ENABLE_DAP4 1
/* if true, enable DAP group names */
#cmakedefine ENABLE_DAP_GROUPS 1
/* if true, do remote tests */
#cmakedefine ENABLE_DAP_REMOTE_TESTS 1
/* define the possible sources for remote test servers */
#cmakedefine REMOTETESTSERVERS "${REMOTETESTSERVERS}"
/* if true, run extra tests which may not work yet */
#cmakedefine EXTRA_TESTS 1
@ -447,6 +458,27 @@ are set when opening a binary file on Windows. */
/* Define to the version of this package. */
#cmakedefine PACKAGE_VERSION "${netCDF_VERSION}"
/* The size of `ulonglong` as computed by sizeof. */
#cmakedefine SIZEOF_ULONGLONG @SIZEOF_ULONGLONG@
/* The size of `longlong` as computed by sizeof. */
#cmakedefine SIZEOF_LONGLONG @SIZEOF_LONGLONG@
/* The size of `uchar` as computed by sizeof. */
#cmakedefine SIZEOF_UCHAR @SIZEOF_UCHAR@
/* The size of `ssize_t` as computed by sizeof. */
#cmakedefine SIZEOF_SSIZE_T @SIZEOF_SSIZE_T@
/* The size of `__int64` found on Windows systems. */
#cmakedefine SIZEOF___INT64 ${SIZEOF___INT64}
/* The size of `void*` as computed by sizeof. */
#cmakedefine SIZEOF_VOIDSTAR ${SIZEOF_VOIDSTAR}
/* The size of `short` as computed by sizeof. */
#cmakedefine SIZEOF_OFF64_T ${SIZEOF_OFF64_T}
/* The size of `double', as computed by sizeof. */
#cmakedefine SIZEOF_DOUBLE ${SIZEOF_DOUBLE}
@ -489,6 +521,9 @@ are set when opening a binary file on Windows. */
/* The size of `ushort', as computed by sizeof. */
#cmakedefine SIZEOF_USHORT ${SIZEOF_USHORT}
/* The size of `void*', as computed by sizeof. */
#cmakedefine SIZEOF_VOIDP ${SIZEOF_VOIDP}
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at runtime.
@ -595,9 +630,6 @@ are set when opening a binary file on Windows. */
#cmakedefine __CHAR_UNSIGNED__
#endif
/* Define to empty if `const' does not conform to ANSI C. */
#cmakedefine const
/* Define to `long int' if <sys/types.h> does not define. */
#cmakedefine off_t long int

View File

@ -320,14 +320,17 @@ AC_ARG_ENABLE([logging],
test "x$enable_logging" = xyes || enable_logging=no
AC_MSG_RESULT([$enable_logging])
## Capture the state of the --enable-dap flag
AC_MSG_CHECKING([whether DAP client is to be built])
## Capture the state of the --enable-dap flag => enable dap2+dap4
AC_MSG_CHECKING([whether DAP client(s) are to be built])
AC_ARG_ENABLE([dap],
[AS_HELP_STRING([--disable-dap],
[build without DAP client support.])])
test "x$enable_dap" = xno || enable_dap=yes
AC_MSG_RESULT($enable_dap)
# --enable-dap => enable-dap4
enable_dap4=$enable_dap
# Curl support is required if and only if any of these flags are set:
# 1. --enable-dap
@ -385,20 +388,34 @@ fi
AC_MSG_RESULT($enable_dap_auth_tests)
# Control if groups are supported in [netcdf4]dap2 code
AC_MSG_CHECKING([whether [netcdf4] group names should be enabled (default on)])
AC_MSG_CHECKING([whether [netcdf4] group names for DAP2 hould be enabled (default on)])
AC_ARG_ENABLE([dap-groups],
[AS_HELP_STRING([--disable-dap-groups],
[disable [netcdf4] dap group names])])
test "x$enable_groups" = xno || enable_dap_groups=yes
if test "x$enable_dap" = "xno" -o "x$enable_enable_netcdf_4" = "xno" ; then
AC_MSG_NOTICE([dap groups disabled because dap disabled or netcdf-4 disabled])
[disable [netcdf4] DAP2 group names])])
test "x$enable_dap_groups" = xno || enable_dap_groups=yes
AC_MSG_RESULT($enable_dap_groups)
if test "x$enable_dap" = "xno" ; then
AC_MSG_NOTICE([DAP2 groups is being disabled because DAP2 support is disabled or netcdf-4 disabled])
enable_dap_groups=no
fi
AC_MSG_RESULT($enable_dap_groups)
if test "x$enable_dap_groups" = xyes; then
AC_DEFINE([ENABLE_DAP_GROUPS], [1], [if true, enable DAP group names])
fi
# Did the user specify a list of test servers to try for remote tests?
AC_MSG_CHECKING([which remote test server(s) to use])
AC_ARG_WITH([testservers],
[AS_HELP_STRING([--with-testservers=<host+port>,<host+port>...],
[Specify the testserver(s) to try for remote tests.])],
[REMOTETESTSERVERS=$with_testservers], [REMOTETESTSERVERS=no])
msg="$REMOTETESTSERVERS"
if test "x$REMOTETESTSERVERS" = xno ; then
msg="remotetest.unidata.ucar.edu,jetstream.unidata.ucar.edu (defaults)"
REMOTETESTSERVERS=remotetest.unidata.ucar.edu,jetstream.unidata.ucar.edu
fi
AC_MSG_RESULT([$msg])
AC_DEFINE_UNQUOTED([REMOTETESTSERVERS], ["$REMOTETESTSERVERS"], [the testservers for remote tests.])
# Set the config.h flags
if test "x$enable_dap" = xyes; then
AC_DEFINE([USE_DAP], [1], [if true, build DAP Client])
@ -788,6 +805,17 @@ AC_MSG_RESULT($enable_diskless)
if test "x$enable_dap" = "xyes" -a "xenable_diskless" = xno ; then
AC_MSG_NOTICE([--enable-dap requires --enable-diskless])
AC_MSG_NOTICE([dap support disabled])
enable_dap=no
fi
# disable dap4 if netcdf-4 is disabled
if test "x$enable_netcdf_4" = "xno" ; then
AC_MSG_WARN([netcdf-4 not enabled; disabling DAP4])
enable_dap4=no
fi
if test "x$enable_dap4" = xyes; then
AC_DEFINE([ENABLE_DAP4], [1], [if true, build DAP4 Client])
fi
# check for useful, but not essential, memio support
@ -822,9 +850,9 @@ AC_FUNC_ALLOCA
AC_CHECK_DECLS([isnan, isinf, isfinite, signbit],,,[#include <math.h>])
AC_STRUCT_ST_BLKSIZE
UD_CHECK_IEEE
AC_CHECK_TYPES([size_t, ssize_t, ptrdiff_t, uchar, longlong, ushort, uint, int64, uint64 off_t])
AC_TYPE_SIZE_T
AC_TYPE_OFF_T
AC_CHECK_TYPES([size_t, ssize_t, ptrdiff_t, uchar, longlong, ushort, uint, int64, uint64])
AC_C_CHAR_UNSIGNED
AC_C_BIGENDIAN
@ -835,9 +863,11 @@ AC_C_BIGENDIAN
SLEEPCMD=""
PLTFORMOUT="$(uname | cut -d '_' -f 1)"
if test "$PLTFORMOUT" = "CYGWIN"; then
ISCYGWIN=yes
SLEEPCMD="sleep 5"
AC_MSG_NOTICE([Pausing between sizeof() checks to mitigate a Cygwin issue.])
fi
AM_CONDITIONAL(ISCYGWIN, [test "x$ISCYGWIN" = xyes])
$SLEEPCMD
AC_CHECK_SIZEOF(short)
@ -857,6 +887,15 @@ $SLEEPCMD
AC_CHECK_SIZEOF(size_t)
$SLEEPCMD
AC_CHECK_SIZEOF(unsigned long long)
$SLEEPCMD
AC_CHECK_SIZEOF(unsigned long long)
$SLEEPCMD
if test "$ac_cv_type_uchar" = yes ; then
AC_CHECK_SIZEOF(uchar)
else
AC_CHECK_SIZEOF(unsigned char)
fi
$SLEEPCMD
if test "$ac_cv_type_ushort" = yes ; then
@ -871,10 +910,6 @@ if test "$ac_cv_type_uint" = yes ; then
else
AC_CHECK_SIZEOF(unsigned int)
fi
$SLEEPCMD
AC_CHECK_SIZEOF(unsigned long long)
$SLEEPCMD
if test "$ac_cv_type_ushort" = yes ; then
AC_CHECK_SIZEOF(ushort)
@ -889,12 +924,15 @@ else
fi
$SLEEPCMD
AC_CHECK_SIZEOF(ptrdiff_t)
$SLEEPCDM
AC_CHECK_SIZEOF(ssize_t)
$SLEEPCMD
AC_CHECK_SIZEOF([void*])
if test "x$enable_netcdf_4" = xyes || test "x$enable_dap" = xyes; then
AC_SEARCH_LIBS([deflate], [zlibwapi zlibstat zlib zlib1 z], [], [
AC_MSG_ERROR([Can't find or link to the z library. Turn off netCDF-4 and \
opendap with --disable-netcdf-4 --disable-dap, or see config.log for errors.])])
DAP clients with --disable-netcdf-4 --disable-dap, or see config.log for errors.])])
fi
# We need the math library
@ -1079,6 +1117,83 @@ if test "x$enable_parallel" = xyes; then
AC_DEFINE([USE_PARALLEL], [1], [if true, pnetcdf or parallel netcdf-4 is in use])
fi
AC_ARG_ENABLE([erange_fill],
[AS_HELP_STRING([--enable-erange-fill],
[Enable use of fill value when out-of-range type
conversion causes NC_ERANGE error. @<:@default: disabled@:>@])],
[enable_erange_fill=${enableval}], [enable_erange_fill=no]
)
AC_ARG_ENABLE([zero-length-coord-bound],
[AS_HELP_STRING([--enable-zero-length-coord-bound],
[Enable a more relaxed boundary error check NC_EINVALCOORDS
to allow coordinate start argument equal to dimension size
when argument count is zero. @<:@default: disabled@:>@])],
[enable_zero_length_coord_bound=${enableval}], [enable_zero_length_coord_bound=no]
)
# check PnetCDF's settings on enable_erange_fill and relax_coord_bound
if test "x$enable_pnetcdf" = xyes; then
UD_CHECK_HEADER_PATH([pnetcdf.h])
AC_MSG_CHECKING([if erange-fill is enabled in PnetCDF])
erange_fill_pnetcdf=`grep PNETCDF_ERANGE_FILL ${ac_cv_header_path_pnetcdf_h}`
if test "x$erange_fill_pnetcdf" = x; then
erange_fill_pnetcdf=no
else
erange_fill_pnetcdf=`echo ${erange_fill_pnetcdf} | cut -d' ' -f3`
if test "x$coord_bound_pnetcdf" = x0; then
enable_erange_fill_pnetcdf=no
else
enable_erange_fill_pnetcdf=yes
fi
fi
AC_MSG_NOTICE([$enable_erange_fill_pnetcdf])
if test "$enable_erange_fill" != "$enable_erange_fill_pnetcdf"; then
if test "$enable_erange_fill_pnetcdf" = yes; then
AC_MSG_WARN([Enable erange-fill to conform with PnetCDF setting])
else
AC_MSG_WARN([Disable erange-fill to conform with PnetCDF setting])
fi
enable_erange_fill=$enable_erange_fill_pnetcdf
fi
AC_MSG_CHECKING([if relax-coord-bound is enabled in PnetCDF])
relax_coord_bound_pnetcdf=`grep PNETCDF_RELAX_COORD_BOUND ${ac_cv_header_path_pnetcdf_h}`
if test "x$relax_coord_bound_pnetcdf" = x; then
elax_coord_bound_pnetcdf=no
else
coord_bound_pnetcdf=`echo ${relax_coord_bound_pnetcdf} | cut -d' ' -f3`
if test "x$coord_bound_pnetcdf" = x0; then
relax_coord_bound_pnetcdf=no
else
relax_coord_bound_pnetcdf=yes
fi
fi
AC_MSG_NOTICE([$relax_coord_bound_pnetcdf])
if test "$enable_zero_length_coord_bound" != "$relax_coord_bound_pnetcdf"; then
if test "$relax_coord_bound_pnetcdf" = yes; then
AC_MSG_WARN([Enable relax-coord-bound to conform with PnetCDF setting])
else
AC_MSG_WARN([Disable relax-coord-bound to conform with PnetCDF setting])
fi
enable_zero_length_coord_bound=$relax_coord_bound_pnetcdf
fi
fi
if test "x$enable_erange_fill" = xyes ; then
if test "x$M4FLAGS" = x ; then
M4FLAGS="-DERANGE_FILL"
else
M4FLAGS="$M4FLAGS -DERANGE_FILL"
fi
fi
AC_SUBST(M4FLAGS)
if test "x$enable_zero_length_coord_bound" = xyes; then
AC_DEFINE([RELAX_COORD_BOUND], [1], [if true, NC_EINVALCOORDS check is more relaxed])
fi
# Check for downloading/building fortran via postinstall script.
if test "x$enable_remote_fortran_bootstrap" = xyes; then
AC_DEFINE([BUILD_FORTRAN], 1, [If true, will attempt to download and build netcdf-fortran.])
@ -1125,6 +1240,10 @@ AM_CONDITIONAL(BUILD_PARALLEL, [test x$enable_parallel = xyes])
AM_CONDITIONAL(TEST_PARALLEL4, [test "x$enable_parallel4" = xyes -a "x$enable_parallel_tests" = xyes])
AM_CONDITIONAL(BUILD_DAP, [test "x$enable_dap" = xyes])
AM_CONDITIONAL(USE_DAP, [test "x$enable_dap" = xyes]) # Alias
# Provide protocol specific flags
AM_CONDITIONAL(ENABLE_DAP, [test "x$enable_dap" = xyes])
AM_CONDITIONAL(ENABLE_DAP4, [test "x$enable_dap4" = xyes])
AM_CONDITIONAL(ENABLE_DAP_REMOTE_TESTS, [test "x$enable_dap_remote_tests" = xyes])
AM_CONDITIONAL(ENABLE_DAP_AUTH_TESTS, [test "x$enable_dap_auth_tests" = xyes])
AM_CONDITIONAL(ENABLE_DAP_LONG_TESTS, [test "x$enable_dap_long_tests" = xyes])
@ -1234,6 +1353,7 @@ fi
AC_SUBST(NC_LIBS,[$NC_LIBS])
AC_SUBST(HAS_DAP,[$enable_dap])
AC_SUBST(HAS_DAP4,[$enable_dap4])
AC_SUBST(HAS_NC2,[$nc_build_v2])
AC_SUBST(HAS_NC4,[$enable_netcdf_4])
AC_SUBST(HAS_HDF4,[$enable_hdf4])
@ -1246,6 +1366,7 @@ AC_SUBST(HAS_PARALLEL4,[$enable_parallel4])
AC_SUBST(HAS_DISKLESS,[$enable_diskless])
AC_SUBST(HAS_MMAP,[$enable_mmap])
AC_SUBST(HAS_JNA,[$enable_jna])
AC_SUBST(RELAX_COORD_BOUND,[$enable_relax_coord_bound])
# Include some specifics for netcdf on windows.
#AH_VERBATIM([_WIN32_STRICMP],
@ -1304,6 +1425,7 @@ AX_SET_META([NC_HAS_HDF4],[$enable_hdf4],[yes])
AX_SET_META([NC_HAS_HDF5],[$enable_netcdf_4],[yes])
AX_SET_META([NC_HAS_SZIP],[$ac_cv_func_H5Z_SZIP],[yes])
AX_SET_META([NC_HAS_DAP],[$enable_dap],[yes])
AX_SET_META([NC_HAS_DAP4],[$enable_dap4],[yes])
AX_SET_META([NC_HAS_DISKLESS],[$enable_diskless],[yes])
AX_SET_META([NC_HAS_MMAP],[$enable_mmap],[yes])
AX_SET_META([NC_HAS_JNA],[$enable_jna],[yes])
@ -1311,6 +1433,15 @@ AX_SET_META([NC_HAS_PNETCDF],[$enable_pnetcdf],[yes])
AX_SET_META([NC_HAS_PARALLEL],[$enable_parallel],[yes])
AX_SET_META([NC_HAS_PARALLEL4],[$enable_parallel4],[yes])
# Automake says that this is always run in top_builddir
# and that srcdir is defined (== top_srcdir)
abs_top_builddir=`pwd`
cd $srcdir
abs_top_srcdir=`pwd`
cd $abs_top_builddir
rm -f ${abs_top_builddir}/test_common.sh
sed -e "s|@TOPSRCDIR@|${abs_top_srcdir}|" -e "s|@TOPBUILDDIR@|${abs_top_builddir}|" <${abs_top_srcdir}/test_common.in >${abs_top_builddir}/test_common.sh
#####
# End netcdf_meta.h definitions.
#####
@ -1324,14 +1455,9 @@ AC_CONFIG_FILES([Makefile
include/netcdf_meta.h
include/Makefile
h5_test/Makefile
docs/Makefile
docs/images/Makefile
libsrc/Makefile
libsrc4/Makefile
libsrcp/Makefile
nctest/Makefile
nc_test4/Makefile
nc_test/Makefile
ncdump/Makefile
ncgen3/Makefile
ncgen/Makefile
@ -1340,14 +1466,21 @@ AC_CONFIG_FILES([Makefile
examples/CDL/Makefile
oc2/Makefile
libdap2/Makefile
libdap4/Makefile
libdispatch/Makefile
liblib/Makefile
ncdump/cdl/Makefile
ncdump/expected/Makefile
docs/Makefile
docs/images/Makefile
nctest/Makefile
nc_test4/Makefile
nc_test/Makefile
ncdap_test/Makefile
ncdap_test/testdata3/Makefile
ncdap_test/expected3/Makefile
ncdap_test/expectremote3/Makefile
dap4_test/Makefile
],
[test -f nc-config && chmod 755 nc-config])
AC_OUTPUT()

56
dap4_test/CMakeLists.txt Normal file
View File

@ -0,0 +1,56 @@
SET(abs_top_srcdir ${CMAKE_CURRENT_SOURCE_DIR})
remove_definitions(-DDLL_EXPORT)
ADD_SUBDIRECTORY(baseline)
ADD_SUBDIRECTORY(baselineraw)
ADD_SUBDIRECTORY(baselineremote)
ADD_SUBDIRECTORY(cdltestfiles)
ADD_SUBDIRECTORY(daptestfiles)
ADD_SUBDIRECTORY(dmrtestfiles)
ADD_SUBDIRECTORY(nctestfiles)
FILE(GLOB COPY_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.sh)
FILE(COPY ${COPY_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/ FILE_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE)
IF(ENABLE_TESTS)
# Base tests
# The tests are set up as a combination of shell scripts and executables that
# must be run in a particular order. It is painful but will use macros to help
# keep it from being too bad.
IF(BUILD_UTILITIES)
add_sh_test(dap4_test test_raw)
ENDIF(BUILD_UTILITIES)
IF(ENABLE_DAP_REMOTE_TESTS)
# Change name (add '4') to avoid cmake
# complaint about duplicate targets.
BUILD_BIN_TEST(findtestserver4)
IF(BUILD_UTILITIES)
# disable for now add_sh_test(dap4_test test_remote)
ENDIF(BUILD_UTILITIES)
ENDIF(ENABLE_DAP_REMOTE_TESTS)
ENDIF(ENABLE_TESTS)
FILE(COPY ./baselineraw DESTINATION ${CMAKE_CURRENT_SOURCE_DIR})
#FILE(COPY ./baseline DESTINATION ${CMAKE_CURRENT_SOURCE_DIR})
#FILE(COPY ./cdltestfiles DESTINATION ${CMAKE_CURRENT_SOURCE_DIR})
#FILE(COPY ./daptestfiles DESTINATION ${CMAKE_CURRENT_SOURCE_DIR})
#FILE(COPY ./dmrtestfiles DESTINATION ${CMAKE_CURRENT_SOURCE_DIR})
## Specify files to be distributed by 'make dist'
FILE(GLOB CUR_EXTRA_DIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.c ${CMAKE_CURRENT_SOURCE_DIR}/*.h ${CMAKE_CURRENT_SOURCE_DIR}/*.sh
#${CMAKE_CURRENT_SOURCE_DIR}/daptestfiles
#${CMAKE_CURRENT_SOURCE_DIR}/dmrtestfiles
#${CMAKE_CURRENT_SOURCE_DIR}/cdltestfiles
#${CMAKE_CURRENT_SOURCE_DIR}/baseline
${CMAKE_CURRENT_SOURCE_DIR}/baselineraw
)
SET(CUR_EXTRA_DIST ${CUR_EXTRA_DIST} CMakeLists.txt Makefile.am)
ADD_EXTRA_DIST("${CUR_EXTRA_DIST}")

70
dap4_test/Make0 Normal file
View File

@ -0,0 +1,70 @@
# Test c output
T=test_parse
#ARGS=../dap4_test/testfiles/test_atomic_types.nc.dmr
#ARGS=./tat.nc.dmr
ARGS=./tat.dmr
#G=gdb --args
#c:/path/to/my/app args to my app
V=drmemory.exe --
#V=valgrind --leak-check=full
CFLAGS=-Wall -g -O0 -I.. -I../include -I../libdap4
SHELL=/bin/bash
CC=gcc
LDFLAGS=../liblib/.libs/libnetcdf.a -L/usr/local/lib -lhdf5_hl -lhdf5 -lz -ldl -lm -lcurl
LLP=/usr/local/lib:${LD_LIBRARY_PATH}
all:: t.exe
sh ./test_parse.sh
g::
export LD_LIBRARY_PATH=${LLP}; export CFLAGS; export LDFLAGS; \
${G} ./t ${ARGS}
v::
export LD_LIBRARY_PATH=${LLP}; export CFLAGS; export LDFLAGS; \
${V} ./t ${ARGS}
diff:: t.exe
rm -fr ./j
./t ${ARGS} >& ./j
t.exe: ${T}.c ../liblib/.libs/libnetcdf.a
${CC} -o t ${CFLAGS} ${T}.c ${SRC} ${LDFLAGS}
# export LD_LIBRARY_PATH=${LLP}; export CFLAGS; export LDFLAGS;
clean::
rm -fr t.exe ${T}.o
cpp::
${CC} -E ${CFLAGS} ${T}.c > ${T}.txt
tmp.sh::
rm -f tmp.sh
echo 'P=d:/git/thredds/dap4/d4tests/src/test/data/resources/TestCDMClient/testinput' >>tmp.sh
echo 'F="test_atomic_array.nc test_atomic_array.nc test_atomic_types.nc test_enum.nc test_enum_2.nc test_enum_array.nc test_fill.nc test_groups1.nc test_one_var.nc test_one_vararray.nc test_opaque.nc test_opaque_array.nc test_struct_type.nc test_utf8.nc"' >>tmp.sh
echo 'for f in $$F ; do' >>tmp.sh
echo 'R="$${P}/$$f" ; L="./testfiles/$$f"' >>tmp.sh
echo 'rm $${L}.dap ; cp $${R}.raw $${L}.dap' >>tmp.sh
echo 'done' >>tmp.sh
echo 'cp $${P}/test_sequence_1.syn.raw ./testfiles/test_sequence_1.nc.dap' >>tmp.sh
echo 'cp $${P}/test_sequence_2.syn.raw ./testfiles/test_sequence_2.nc.dap' >>tmp.sh
testfiles:: tmp.sh
sh -x ./tmp.sh
#U=test_ncuri.c ${LDFLAGS}
U=test_ncuri.c ../libdispatch/ncuri.c ../libdispatch/nclist.c ../libdispatch/ncbytes.c
x:
pushd .. ; ${MAKE} ; popd
uri::
${CC} -o test_ncuri ${CFLAGS} ${U}
gdb --args ./test_ncuri

78
dap4_test/Makefile.am Normal file
View File

@ -0,0 +1,78 @@
## This is a automake file, part of Unidata's netCDF package.
# Copyright 2011, see the COPYRIGHT file for more information.
# This file builds and runs DAP4 tests.
# Put together AM_CPPFLAGS and AM_LDFLAGS.
include $(top_srcdir)/lib_flags.am
#LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver-verbose
#TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver-verbose
LDADD = ${top_builddir}/liblib/libnetcdf.la
AM_CPPFLAGS += -I$(top_srcdir)/libdap4
# Set up the tests; do the .sh first, then .c
check_PROGRAMS =
TESTS =
if ENABLE_DAP4
# WARNING: these are unit tests, so they will not
# appear in CMakeLists.txt
check_PROGRAMS += test_parse test_meta test_data
test_parse_SOURCES = test_parse.c test_common.h
test_meta_SOURCES = test_meta.c test_common.h
test_data_SOURCES = test_data.c test_common.h
TESTS += test_parse.sh
TESTS += test_meta.sh
TESTS += test_data.sh
if BUILD_UTILITIES
# These rely on ncdump
TESTS += test_raw.sh
endif
if ENABLE_DAP_REMOTE_TESTS
# Note: This program name was changed to findtestserver4
# to avoid cmake complaint about duplicate targets.
check_PROGRAMS += findtestserver4
findtestserver4_SOURCES = findtestserver4.c
if BUILD_UTILITIES
# relies on ncdump
# Disabled until the testserver is stable
#TESTS += test_remote.sh
endif
endif
endif #ENABLE_DAP4
EXTRA_DIST = test_parse.sh test_meta.sh test_data.sh \
test_raw.sh test_remote.sh test_hyrax.sh \
d4test_common.sh \
daptestfiles dmrtestfiles cdltestfiles nctestfiles \
baseline baselineraw baselineremote
CLEANFILES = *.exe
# One last thing
BUILT_SOURCES = .daprc
.daprc:
echo "#DAPRC" >.daprc
clean-local: clean-local-check
.PHONY: clean-local-check
clean-local-check:
-rm -rf results
-rm -f .dodsrc .daprc
# The shell file maketests.sh is used to build the testdata
# for dap4 testing. It creates and fills the directories
# daptestfiles, dmrtestfiles, and cdltestfiles
# As a rule, this will only be invoked if there was a change
# in the GenerateRaw.java program in the thredds tree.
maketests::
bash ./maketests.sh

View File

@ -0,0 +1,6 @@
FILE(GLOB COPY_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*)
FILE(COPY ${COPY_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/ FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE)
FILE(GLOB CUR_EXTRA_DIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*)
SET(CUR_EXTRA_DIST ${CUR_EXTRA_DIST} CMakeLists.txt Makefile.am)
ADD_EXTRA_DIST("${CUR_EXTRA_DIST}")

View File

@ -0,0 +1,13 @@
netcdf test_anon_dim.2.syn {
dimensions:
_Anonymous4 = 4 ;
variables:
int vu32(_Anonymous4) ;
// global attributes:
string :_dap4.ce = "/vu32[0:3]" ;
:_DAP4_Little_Endian = 1UB ;
data:
vu32 = -1169720286, -920699049, -2088732436, 1060190036 ;
}

View File

@ -0,0 +1,10 @@
netcdf test_anon_dim.2 {
dimensions:
_Anonymous4 = 4 ;
variables:
int vu32(_Anonymous4) ;
// global attributes:
string :_dap4.ce = "/vu32[0:3]" ;
:_DAP4_Little_Endian = 1UB ;
}

View File

@ -0,0 +1,21 @@
<Dataset
name="test_anon_dim.syn"
dapVersion="4.0"
dmrVersion="1.0"
xmlns="http://xml.opendap.org/ns/DAP/4.0#"
xmlns:dap="http://xml.opendap.org/ns/DAP/4.0#">
<Dimensions>
<Dimension name="_Anonymous4" size="4"/>
</Dimensions>
<Variables>
<Int32 name="vu32">
<Dim name="/_Anonymous4"/>
</Int32>
</Variables>
<Attribute name="_dap4.ce" type="String">
<Value value="/vu32[0:3]"/>
</Attribute>
<Attribute name="_DAP4_Little_Endian" type="UInt8">
<Value value="1"/>
</Attribute>
</Dataset>

View File

@ -0,0 +1,13 @@
netcdf test_anon_dim.syn {
dimensions:
_Anonymous6 = 6 ;
variables:
int vu32(_Anonymous6) ;
// global attributes:
:_DAP4_Little_Endian = 1UB ;
data:
vu32 = -1169720286, -920699049, -2088732436, 1060190036, -1123468835,
922940053 ;
}

View File

@ -0,0 +1,9 @@
netcdf test_anon_dim {
dimensions:
_Anonymous6 = 6 ;
variables:
int vu32(_Anonymous6) ;
// global attributes:
:_DAP4_Little_Endian = 1UB ;
}

View File

@ -0,0 +1,18 @@
<Dataset
name="test_anon_dim.syn"
dapVersion="4.0"
dmrVersion="1.0"
xmlns="http://xml.opendap.org/ns/DAP/4.0#"
xmlns:dap="http://xml.opendap.org/ns/DAP/4.0#">
<Dimensions>
<Dimension name="_Anonymous6" size="6"/>
</Dimensions>
<Variables>
<Int32 name="vu32">
<Dim name="/_Anonymous6"/>
</Int32>
</Variables>
<Attribute name="_DAP4_Little_Endian" type="UInt8">
<Value value="1"/>
</Attribute>
</Dataset>

View File

@ -0,0 +1,28 @@
netcdf test_atomic_array.5.nc {
types:
ubyte(*) _bytestring ;
dimensions:
_Anonymous1 = 1 ;
_Anonymous2 = 2 ;
variables:
ubyte vu8(_Anonymous1, _Anonymous2) ;
double vd(_Anonymous1) ;
string vs(_Anonymous1, _Anonymous1) ;
_bytestring vo(_Anonymous1, _Anonymous1) ;
// global attributes:
string :_dap4.ce = "/vu8[1][0:2:2];/vd[1];/vs[1][0];/vo[0][1]" ;
:_DAP4_Little_Endian = 1UB ;
data:
vu8 =
3, 5 ;
vd = 1024.8 ;
vs =
"Καλημέα" ;
vo =
{171, 205, 239, 0, 0, 0, 0, 0} ;
}

View File

@ -0,0 +1,16 @@
netcdf test_atomic_array.5 {
types:
opaque(8) opaque8_t ;
dimensions:
_Anonymous1 = 1 ;
_Anonymous2 = 2 ;
variables:
ubyte vu8(_Anonymous1, _Anonymous2) ;
double vd(_Anonymous1) ;
string vs(_Anonymous1, _Anonymous1) ;
opaque8_t vo(_Anonymous1, _Anonymous1) ;
// global attributes:
string :_dap4.ce = "/vu8[1][0:2:2];/vd[1];/vs[1][0];/vo[0][1]" ;
:_DAP4_Little_Endian = 1UB ;
}

View File

@ -0,0 +1,34 @@
<Dataset
name="test_atomic_array.nc"
dapVersion="4.0"
dmrVersion="1.0"
xmlns="http://xml.opendap.org/ns/DAP/4.0#"
xmlns:dap="http://xml.opendap.org/ns/DAP/4.0#">
<Dimensions>
<Dimension name="_Anonymous1" size="1"/>
<Dimension name="_Anonymous2" size="2"/>
</Dimensions>
<Variables>
<UInt8 name="vu8">
<Dim name="/_Anonymous1"/>
<Dim name="/_Anonymous2"/>
</UInt8>
<Float64 name="vd">
<Dim name="/_Anonymous1"/>
</Float64>
<String name="vs">
<Dim name="/_Anonymous1"/>
<Dim name="/_Anonymous1"/>
</String>
<Opaque name="vo" type="/opaque8_t">
<Dim name="/_Anonymous1"/>
<Dim name="/_Anonymous1"/>
</Opaque>
</Variables>
<Attribute name="_dap4.ce" type="String">
<Value value="/vu8[1][0:2:2];/vd[1];/vs[1][0];/vo[0][1]"/>
</Attribute>
<Attribute name="_DAP4_Little_Endian" type="UInt8">
<Value value="1"/>
</Attribute>
</Dataset>

View File

@ -0,0 +1,13 @@
netcdf test_atomic_array.8.nc {
dimensions:
_Anonymous3 = 3 ;
variables:
short v16(_Anonymous3) ;
// global attributes:
string :_dap4.ce = "/v16[0:1,3]" ;
:_DAP4_Little_Endian = 1UB ;
data:
v16 = 1, 2, 4 ;
}

View File

@ -0,0 +1,10 @@
netcdf test_atomic_array.8 {
dimensions:
_Anonymous3 = 3 ;
variables:
short v16(_Anonymous3) ;
// global attributes:
string :_dap4.ce = "/v16[0:1,3]" ;
:_DAP4_Little_Endian = 1UB ;
}

View File

@ -0,0 +1,21 @@
<Dataset
name="test_atomic_array.nc"
dapVersion="4.0"
dmrVersion="1.0"
xmlns="http://xml.opendap.org/ns/DAP/4.0#"
xmlns:dap="http://xml.opendap.org/ns/DAP/4.0#">
<Dimensions>
<Dimension name="_Anonymous3" size="3"/>
</Dimensions>
<Variables>
<Int16 name="v16">
<Dim name="/_Anonymous3"/>
</Int16>
</Variables>
<Attribute name="_dap4.ce" type="String">
<Value value="/v16[0:1,3]"/>
</Attribute>
<Attribute name="_DAP4_Little_Endian" type="UInt8">
<Value value="1"/>
</Attribute>
</Dataset>

View File

@ -0,0 +1,13 @@
netcdf test_atomic_array.9.nc {
dimensions:
_Anonymous3 = 3 ;
variables:
short v16(_Anonymous3) ;
// global attributes:
string :_dap4.ce = "/v16[3,0:1]" ;
:_DAP4_Little_Endian = 1UB ;
data:
v16 = 4, 1, 2 ;
}

View File

@ -0,0 +1,10 @@
netcdf test_atomic_array.9 {
dimensions:
_Anonymous3 = 3 ;
variables:
short v16(_Anonymous3) ;
// global attributes:
string :_dap4.ce = "/v16[3,0:1]" ;
:_DAP4_Little_Endian = 1UB ;
}

View File

@ -0,0 +1,21 @@
<Dataset
name="test_atomic_array.nc"
dapVersion="4.0"
dmrVersion="1.0"
xmlns="http://xml.opendap.org/ns/DAP/4.0#"
xmlns:dap="http://xml.opendap.org/ns/DAP/4.0#">
<Dimensions>
<Dimension name="_Anonymous3" size="3"/>
</Dimensions>
<Variables>
<Int16 name="v16">
<Dim name="/_Anonymous3"/>
</Int16>
</Variables>
<Attribute name="_dap4.ce" type="String">
<Value value="/v16[3,0:1]"/>
</Attribute>
<Attribute name="_DAP4_Little_Endian" type="UInt8">
<Value value="1"/>
</Attribute>
</Dataset>

View File

@ -0,0 +1,51 @@
netcdf test_atomic_array.nc {
types:
byte enum cloud_class_t {Clear = 0, Cumulonimbus = 1, Stratus = 2,
Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6,
Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10,
Missing = 127} ;
ubyte(*) _bytestring ;
dimensions:
d1 = 1 ;
d2 = 2 ;
d3 = 3 ;
d4 = 4 ;
d5 = 5 ;
variables:
ubyte vu8(d2, d3) ;
short v16(d4) ;
uint vu32(d2, d3) ;
double vd(d2) ;
char vc(d2) ;
string vs(d2, d2) ;
_bytestring vo(d1, d2) ;
cloud_class_t primary_cloud(d5) ;
cloud_class_t primary_cloud:_FillValue = Missing ;
// global attributes:
:_DAP4_Little_Endian = 1UB ;
data:
vu8 =
255, 1, 2,
3, 4, 5 ;
v16 = 1, 2, 3, 4 ;
vu32 =
5, 4, 3,
2, 1, 0 ;
vd = 17.9, 1024.8 ;
vc = "@&" ;
vs =
"hello\tworld", "\r\n",
"Καλημέα", "abc" ;
vo =
{1, 35, 69, 103, 137, 171, 205, 239}, {171, 205, 239, 0, 0, 0, 0, 0} ;
primary_cloud = Clear, Stratus, Clear, Cumulonimbus, _ ;
}

View File

@ -0,0 +1,27 @@
netcdf test_atomic_array {
types:
byte enum cloud_class_t {Clear = 0, Cumulonimbus = 1, Stratus = 2,
Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6,
Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10,
Missing = 127} ;
opaque(8) opaque8_t ;
dimensions:
d1 = 1 ;
d2 = 2 ;
d3 = 3 ;
d4 = 4 ;
d5 = 5 ;
variables:
ubyte vu8(d2, d3) ;
short v16(d4) ;
uint vu32(d2, d3) ;
double vd(d2) ;
char vc(d2) ;
string vs(d2, d2) ;
opaque8_t vo(d1, d2) ;
cloud_class_t primary_cloud(d5) ;
cloud_class_t primary_cloud:_FillValue = Missing ;
// global attributes:
:_DAP4_Little_Endian = 1UB ;
}

View File

@ -0,0 +1,66 @@
<Dataset
name="test_atomic_array.nc"
dapVersion="4.0"
dmrVersion="1.0"
xmlns="http://xml.opendap.org/ns/DAP/4.0#"
xmlns:dap="http://xml.opendap.org/ns/DAP/4.0#">
<Dimensions>
<Dimension name="d1" size="1"/>
<Dimension name="d2" size="2"/>
<Dimension name="d3" size="3"/>
<Dimension name="d4" size="4"/>
<Dimension name="d5" size="5"/>
</Dimensions>
<Types>
<Enumeration name="cloud_class_t" basetype="Int8">
<EnumConst name="Clear" value="0"/>
<EnumConst name="Cumulonimbus" value="1"/>
<EnumConst name="Stratus" value="2"/>
<EnumConst name="Stratocumulus" value="3"/>
<EnumConst name="Cumulus" value="4"/>
<EnumConst name="Altostratus" value="5"/>
<EnumConst name="Nimbostratus" value="6"/>
<EnumConst name="Altocumulus" value="7"/>
<EnumConst name="Cirrostratus" value="8"/>
<EnumConst name="Cirrocumulus" value="9"/>
<EnumConst name="Cirrus" value="10"/>
<EnumConst name="Missing" value="127"/>
</Enumeration>
</Types>
<Variables>
<UInt8 name="vu8">
<Dim name="/d2"/>
<Dim name="/d3"/>
</UInt8>
<Int16 name="v16">
<Dim name="/d4"/>
</Int16>
<UInt32 name="vu32">
<Dim name="/d2"/>
<Dim name="/d3"/>
</UInt32>
<Float64 name="vd">
<Dim name="/d2"/>
</Float64>
<Char name="vc">
<Dim name="/d2"/>
</Char>
<String name="vs">
<Dim name="/d2"/>
<Dim name="/d2"/>
</String>
<Opaque name="vo" type="/opaque8_t">
<Dim name="/d1"/>
<Dim name="/d2"/>
</Opaque>
<Enum name="primary_cloud" enum="/cloud_class_t">
<Dim name="/d5"/>
<Attribute name="_FillValue" type="/cloud_class_t">
<Value value="Missing"/>
</Attribute>
</Enum>
</Variables>
<Attribute name="_DAP4_Little_Endian" type="UInt8">
<Value value="1"/>
</Attribute>
</Dataset>

View File

@ -0,0 +1,54 @@
netcdf test_atomic_array.syn {
types:
byte enum cloud_class_t {Clear = 0, Cumulonimbus = 1, Stratus = 2,
Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6,
Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10,
Missing = 127} ;
ubyte(*) _bytestring ;
dimensions:
d1 = 1 ;
d2 = 2 ;
d3 = 3 ;
d4 = 4 ;
d5 = 5 ;
variables:
ubyte vu8(d2, d3) ;
short v16(d4) ;
uint vu32(d2, d3) ;
double vd(d2) ;
char vc(d2) ;
string vs(d2, d2) ;
_bytestring vo(d1, d2) ;
cloud_class_t primary_cloud(d5) ;
cloud_class_t primary_cloud:_FillValue = Missing ;
// global attributes:
:_DAP4_Little_Endian = 1UB ;
data:
vu8 =
186, 201, 131,
63, 189, 55 ;
v16 = -341, -21899, -13413, -22144 ;
vu32 =
2367803413, 3586730583, 511843988,
3754752863, 2950934681, 2366232135 ;
vd = 0.217870081192792, 0.602450791996768 ;
vc = "CO" ;
vs =
"{S", "gb8^OE$",
"4a/q%n9;5Y", "{fIl?T\"\\A[" ;
vo =
{162, 23, 122, 167, 40, 124, 4, 250, 139, 181, 123, 205, 247, 110, 200, 15},
{52, 250, 71, 42, 169, 64, 77, 213, 67, 20, 60, 173, 237, 48, 58, 117} ;
primary_cloud = Stratus, Cirrocumulus, Nimbostratus, Cirrostratus,
Stratocumulus ;
}

View File

@ -0,0 +1,27 @@
netcdf test_atomic_array {
types:
byte enum cloud_class_t {Clear = 0, Cumulonimbus = 1, Stratus = 2,
Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6,
Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10,
Missing = 127} ;
ubyte(*) _bytestring ;
dimensions:
d1 = 1 ;
d2 = 2 ;
d3 = 3 ;
d4 = 4 ;
d5 = 5 ;
variables:
ubyte vu8(d2, d3) ;
short v16(d4) ;
uint vu32(d2, d3) ;
double vd(d2) ;
char vc(d2) ;
string vs(d2, d2) ;
_bytestring vo(d1, d2) ;
cloud_class_t primary_cloud(d5) ;
cloud_class_t primary_cloud:_FillValue = Missing ;
// global attributes:
:_DAP4_Little_Endian = 1UB ;
}

View File

@ -0,0 +1,67 @@
<Dataset
name="test_atomic_array.syn"
dapVersion="4.0"
dmrVersion="1.0"
xmlns="http://xml.opendap.org/ns/DAP/4.0#"
xmlns:dap="http://xml.opendap.org/ns/DAP/4.0#">
<Dimensions>
<Dimension name="d1" size="1"/>
<Dimension name="d2" size="2"/>
<Dimension name="d3" size="3"/>
<Dimension name="d4" size="4"/>
<Dimension name="d5" size="5"/>
</Dimensions>
<Types>
<Enumeration name="cloud_class_t" basetype="Int8">
<EnumConst name="Clear" value="0"/>
<EnumConst name="Cumulonimbus" value="1"/>
<EnumConst name="Stratus" value="2"/>
<EnumConst name="Stratocumulus" value="3"/>
<EnumConst name="Cumulus" value="4"/>
<EnumConst name="Altostratus" value="5"/>
<EnumConst name="Nimbostratus" value="6"/>
<EnumConst name="Altocumulus" value="7"/>
<EnumConst name="Cirrostratus" value="8"/>
<EnumConst name="Cirrocumulus" value="9"/>
<EnumConst name="Cirrus" value="10"/>
<EnumConst name="Missing" value="127"/>
</Enumeration>
<Opaque name="_bytestring"/>
</Types>
<Variables>
<UInt8 name="vu8">
<Dim name="/d2"/>
<Dim name="/d3"/>
</UInt8>
<Int16 name="v16">
<Dim name="/d4"/>
</Int16>
<UInt32 name="vu32">
<Dim name="/d2"/>
<Dim name="/d3"/>
</UInt32>
<Float64 name="vd">
<Dim name="/d2"/>
</Float64>
<Char name="vc">
<Dim name="/d2"/>
</Char>
<String name="vs">
<Dim name="/d2"/>
<Dim name="/d2"/>
</String>
<Opaque name="vo" type="/_bytestring">
<Dim name="/d1"/>
<Dim name="/d2"/>
</Opaque>
<Enum name="primary_cloud" enum="/cloud_class_t">
<Dim name="/d5"/>
<Attribute name="_FillValue" type="/cloud_class_t">
<Value value="Missing"/>
</Attribute>
</Enum>
</Variables>
<Attribute name="_DAP4_Little_Endian" type="UInt8">
<Value value="1"/>
</Attribute>
</Dataset>

View File

@ -0,0 +1,60 @@
netcdf test_atomic_types.nc {
types:
byte enum cloud_class_t {Clear = 0, Cumulonimbus = 1, Stratus = 2,
Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6,
Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10,
Missing = 127} ;
ubyte(*) _bytestring ;
variables:
byte v8 ;
ubyte vu8 ;
short v16 ;
ushort vu16 ;
int v32 ;
uint vu32 ;
int64 v64 ;
uint64 vu64 ;
float vf ;
double vd ;
char vc ;
string vs ;
_bytestring vo ;
cloud_class_t primary_cloud ;
cloud_class_t primary_cloud:_FillValue = Missing ;
cloud_class_t secondary_cloud ;
cloud_class_t secondary_cloud:_FillValue = Missing ;
// global attributes:
:_DAP4_Little_Endian = 1UB ;
data:
v8 = -128 ;
vu8 = 255 ;
v16 = -32768 ;
vu16 = _ ;
v32 = 2147483647 ;
vu32 = _ ;
v64 = 9223372036854775807 ;
vu64 = 18446744073709551615 ;
vf = 3.141593 ;
vd = 3.14159265358979 ;
vc = "@" ;
vs = "hello\tworld" ;
vo = {1, 35, 69, 103, 137, 171, 205, 239} ;
primary_cloud = Stratus ;
secondary_cloud = _ ;
}

View File

@ -0,0 +1,29 @@
netcdf test_atomic_types {
types:
byte enum cloud_class_t {Clear = 0, Cumulonimbus = 1, Stratus = 2,
Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6,
Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10,
Missing = 127} ;
opaque(8) opaque8_t ;
variables:
byte v8 ;
ubyte vu8 ;
short v16 ;
ushort vu16 ;
int v32 ;
uint vu32 ;
int64 v64 ;
uint64 vu64 ;
float vf ;
double vd ;
char vc ;
string vs ;
opaque8_t vo ;
cloud_class_t primary_cloud ;
cloud_class_t primary_cloud:_FillValue = Missing ;
cloud_class_t secondary_cloud ;
cloud_class_t secondary_cloud:_FillValue = Missing ;
// global attributes:
:_DAP4_Little_Endian = 1UB ;
}

View File

@ -0,0 +1,51 @@
<Dataset
name="test_atomic_types.nc"
dapVersion="4.0"
dmrVersion="1.0"
xmlns="http://xml.opendap.org/ns/DAP/4.0#"
xmlns:dap="http://xml.opendap.org/ns/DAP/4.0#">
<Types>
<Enumeration name="cloud_class_t" basetype="Int8">
<EnumConst name="Clear" value="0"/>
<EnumConst name="Cumulonimbus" value="1"/>
<EnumConst name="Stratus" value="2"/>
<EnumConst name="Stratocumulus" value="3"/>
<EnumConst name="Cumulus" value="4"/>
<EnumConst name="Altostratus" value="5"/>
<EnumConst name="Nimbostratus" value="6"/>
<EnumConst name="Altocumulus" value="7"/>
<EnumConst name="Cirrostratus" value="8"/>
<EnumConst name="Cirrocumulus" value="9"/>
<EnumConst name="Cirrus" value="10"/>
<EnumConst name="Missing" value="127"/>
</Enumeration>
</Types>
<Variables>
<Int8 name="v8"/>
<UInt8 name="vu8"/>
<Int16 name="v16"/>
<UInt16 name="vu16"/>
<Int32 name="v32"/>
<UInt32 name="vu32"/>
<Int64 name="v64"/>
<UInt64 name="vu64"/>
<Float32 name="vf"/>
<Float64 name="vd"/>
<Char name="vc"/>
<String name="vs"/>
<Opaque name="vo" type="/opaque8_t"/>
<Enum name="primary_cloud" enum="/cloud_class_t">
<Attribute name="_FillValue" type="/cloud_class_t">
<Value value="Missing"/>
</Attribute>
</Enum>
<Enum name="secondary_cloud" enum="/cloud_class_t">
<Attribute name="_FillValue" type="/cloud_class_t">
<Value value="Missing"/>
</Attribute>
</Enum>
</Variables>
<Attribute name="_DAP4_Little_Endian" type="UInt8">
<Value value="1"/>
</Attribute>
</Dataset>

View File

@ -0,0 +1,61 @@
netcdf test_atomic_types.syn {
types:
byte enum cloud_class_t {Clear = 0, Cumulonimbus = 1, Stratus = 2,
Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6,
Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10,
Missing = 127} ;
ubyte(*) _bytestring ;
variables:
byte v8 ;
ubyte vu8 ;
short v16 ;
ushort vu16 ;
int v32 ;
uint vu32 ;
int64 v64 ;
uint64 vu64 ;
float vf ;
double vd ;
char vc ;
string vs ;
_bytestring vo ;
cloud_class_t primary_cloud ;
cloud_class_t primary_cloud:_FillValue = Missing ;
cloud_class_t secondary_cloud ;
cloud_class_t secondary_cloud:_FillValue = Missing ;
// global attributes:
:_DAP4_Little_Endian = 1UB ;
data:
v8 = 58 ;
vu8 = 201 ;
v16 = 896 ;
vu16 = 16177 ;
v32 = -1123468835 ;
vu32 = 2125143125 ;
v64 = 3059391736915381031 ;
vu64 = 11577488182652895291 ;
vf = 0.5512972 ;
vd = 0.790267301128816 ;
vc = "*" ;
vs = "O,L?c8A%V" ;
vo =
{70, 241, 105, 239, 35, 203, 175, 155, 31, 235, 217, 158, 78, 22, 206, 201} ;
primary_cloud = Altocumulus ;
secondary_cloud = Stratocumulus ;
}

View File

@ -0,0 +1,29 @@
netcdf test_atomic_types {
types:
byte enum cloud_class_t {Clear = 0, Cumulonimbus = 1, Stratus = 2,
Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6,
Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10,
Missing = 127} ;
ubyte(*) _bytestring ;
variables:
byte v8 ;
ubyte vu8 ;
short v16 ;
ushort vu16 ;
int v32 ;
uint vu32 ;
int64 v64 ;
uint64 vu64 ;
float vf ;
double vd ;
char vc ;
string vs ;
_bytestring vo ;
cloud_class_t primary_cloud ;
cloud_class_t primary_cloud:_FillValue = Missing ;
cloud_class_t secondary_cloud ;
cloud_class_t secondary_cloud:_FillValue = Missing ;
// global attributes:
:_DAP4_Little_Endian = 1UB ;
}

View File

@ -0,0 +1,52 @@
<Dataset
name="test_atomic_types.syn"
dapVersion="4.0"
dmrVersion="1.0"
xmlns="http://xml.opendap.org/ns/DAP/4.0#"
xmlns:dap="http://xml.opendap.org/ns/DAP/4.0#">
<Types>
<Enumeration name="cloud_class_t" basetype="Int8">
<EnumConst name="Clear" value="0"/>
<EnumConst name="Cumulonimbus" value="1"/>
<EnumConst name="Stratus" value="2"/>
<EnumConst name="Stratocumulus" value="3"/>
<EnumConst name="Cumulus" value="4"/>
<EnumConst name="Altostratus" value="5"/>
<EnumConst name="Nimbostratus" value="6"/>
<EnumConst name="Altocumulus" value="7"/>
<EnumConst name="Cirrostratus" value="8"/>
<EnumConst name="Cirrocumulus" value="9"/>
<EnumConst name="Cirrus" value="10"/>
<EnumConst name="Missing" value="127"/>
</Enumeration>
<Opaque name="_bytestring"/>
</Types>
<Variables>
<Int8 name="v8"/>
<UInt8 name="vu8"/>
<Int16 name="v16"/>
<UInt16 name="vu16"/>
<Int32 name="v32"/>
<UInt32 name="vu32"/>
<Int64 name="v64"/>
<UInt64 name="vu64"/>
<Float32 name="vf"/>
<Float64 name="vd"/>
<Char name="vc"/>
<String name="vs"/>
<Opaque name="vo" type="/_bytestring"/>
<Enum name="primary_cloud" enum="/cloud_class_t">
<Attribute name="_FillValue" type="/cloud_class_t">
<Value value="Missing"/>
</Attribute>
</Enum>
<Enum name="secondary_cloud" enum="/cloud_class_t">
<Attribute name="_FillValue" type="/cloud_class_t">
<Value value="Missing"/>
</Attribute>
</Enum>
</Variables>
<Attribute name="_DAP4_Little_Endian" type="UInt8">
<Value value="1"/>
</Attribute>
</Dataset>

View File

@ -0,0 +1,16 @@
netcdf test_enum.nc {
types:
byte enum cloud_class_t {Clear = 0, Cumulonimbus = 1, Stratus = 2,
Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6,
Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10,
Missing = 127} ;
variables:
cloud_class_t primary_cloud ;
cloud_class_t primary_cloud:_FillValue = Missing ;
// global attributes:
:_DAP4_Little_Endian = 1UB ;
data:
primary_cloud = Stratus ;
}

View File

@ -0,0 +1,13 @@
netcdf test_enum {
types:
byte enum cloud_class_t {Clear = 0, Cumulonimbus = 1, Stratus = 2,
Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6,
Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10,
Missing = 127} ;
variables:
cloud_class_t primary_cloud ;
cloud_class_t primary_cloud:_FillValue = Missing ;
// global attributes:
:_DAP4_Little_Endian = 1UB ;
}

View File

@ -0,0 +1,33 @@
<Dataset
name="test_enum.nc"
dapVersion="4.0"
dmrVersion="1.0"
xmlns="http://xml.opendap.org/ns/DAP/4.0#"
xmlns:dap="http://xml.opendap.org/ns/DAP/4.0#">
<Types>
<Enumeration name="cloud_class_t" basetype="Int8">
<EnumConst name="Clear" value="0"/>
<EnumConst name="Cumulonimbus" value="1"/>
<EnumConst name="Stratus" value="2"/>
<EnumConst name="Stratocumulus" value="3"/>
<EnumConst name="Cumulus" value="4"/>
<EnumConst name="Altostratus" value="5"/>
<EnumConst name="Nimbostratus" value="6"/>
<EnumConst name="Altocumulus" value="7"/>
<EnumConst name="Cirrostratus" value="8"/>
<EnumConst name="Cirrocumulus" value="9"/>
<EnumConst name="Cirrus" value="10"/>
<EnumConst name="Missing" value="127"/>
</Enumeration>
</Types>
<Variables>
<Enum name="primary_cloud" enum="/cloud_class_t">
<Attribute name="_FillValue" type="/cloud_class_t">
<Value value="Missing"/>
</Attribute>
</Enum>
</Variables>
<Attribute name="_DAP4_Little_Endian" type="UInt8">
<Value value="1"/>
</Attribute>
</Dataset>

View File

@ -0,0 +1,19 @@
netcdf test_enum_2.nc {
types:
byte enum cloud_class_t {Clear = 0, Cumulonimbus = 1, Stratus = 2,
Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6,
Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10,
Missing = 127} ;
// global attributes:
:_DAP4_Little_Endian = 1UB ;
group: h {
variables:
cloud_class_t primary_cloud ;
cloud_class_t primary_cloud:_FillValue = Missing ;
data:
primary_cloud = Stratus ;
} // group h
}

View File

@ -0,0 +1,16 @@
netcdf test_enum_2 {
types:
byte enum cloud_class_t {Clear = 0, Cumulonimbus = 1, Stratus = 2,
Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6,
Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10,
Missing = 127} ;
// global attributes:
:_DAP4_Little_Endian = 1UB ;
group: h {
variables:
cloud_class_t primary_cloud ;
cloud_class_t primary_cloud:_FillValue = Missing ;
} // group h
}

View File

@ -0,0 +1,37 @@
<Dataset
name="test_enum_2.nc"
dapVersion="4.0"
dmrVersion="1.0"
xmlns="http://xml.opendap.org/ns/DAP/4.0#"
xmlns:dap="http://xml.opendap.org/ns/DAP/4.0#">
<Types>
<Enumeration name="cloud_class_t" basetype="Int8">
<EnumConst name="Clear" value="0"/>
<EnumConst name="Cumulonimbus" value="1"/>
<EnumConst name="Stratus" value="2"/>
<EnumConst name="Stratocumulus" value="3"/>
<EnumConst name="Cumulus" value="4"/>
<EnumConst name="Altostratus" value="5"/>
<EnumConst name="Nimbostratus" value="6"/>
<EnumConst name="Altocumulus" value="7"/>
<EnumConst name="Cirrostratus" value="8"/>
<EnumConst name="Cirrocumulus" value="9"/>
<EnumConst name="Cirrus" value="10"/>
<EnumConst name="Missing" value="127"/>
</Enumeration>
</Types>
<Attribute name="_DAP4_Little_Endian" type="UInt8">
<Value value="1"/>
</Attribute>
<Groups>
<Group name="h">
<Variables>
<Enum name="primary_cloud" enum="/cloud_class_t">
<Attribute name="_FillValue" type="/cloud_class_t">
<Value value="Missing"/>
</Attribute>
</Enum>
</Variables>
</Group>
</Groups>
</Dataset>

View File

@ -0,0 +1,19 @@
netcdf test_enum_array.4.nc {
types:
byte enum cloud_class_t {Clear = 0, Cumulonimbus = 1, Stratus = 2,
Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6,
Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10,
Missing = 127} ;
dimensions:
_Anonymous2 = 2 ;
variables:
cloud_class_t primary_cloud(_Anonymous2) ;
cloud_class_t primary_cloud:_FillValue = Missing ;
// global attributes:
string :_dap4.ce = "/primary_cloud[1:2:4]" ;
:_DAP4_Little_Endian = 1UB ;
data:
primary_cloud = Stratus, Cumulonimbus ;
}

View File

@ -0,0 +1,16 @@
netcdf test_enum_array.4 {
types:
byte enum cloud_class_t {Clear = 0, Cumulonimbus = 1, Stratus = 2,
Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6,
Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10,
Missing = 127} ;
dimensions:
_Anonymous2 = 2 ;
variables:
cloud_class_t primary_cloud(_Anonymous2) ;
cloud_class_t primary_cloud:_FillValue = Missing ;
// global attributes:
string :_dap4.ce = "/primary_cloud[1:2:4]" ;
:_DAP4_Little_Endian = 1UB ;
}

View File

@ -0,0 +1,40 @@
<Dataset
name="test_enum_array.nc"
dapVersion="4.0"
dmrVersion="1.0"
xmlns="http://xml.opendap.org/ns/DAP/4.0#"
xmlns:dap="http://xml.opendap.org/ns/DAP/4.0#">
<Dimensions>
<Dimension name="_Anonymous2" size="2"/>
</Dimensions>
<Types>
<Enumeration name="cloud_class_t" basetype="Int8">
<EnumConst name="Clear" value="0"/>
<EnumConst name="Cumulonimbus" value="1"/>
<EnumConst name="Stratus" value="2"/>
<EnumConst name="Stratocumulus" value="3"/>
<EnumConst name="Cumulus" value="4"/>
<EnumConst name="Altostratus" value="5"/>
<EnumConst name="Nimbostratus" value="6"/>
<EnumConst name="Altocumulus" value="7"/>
<EnumConst name="Cirrostratus" value="8"/>
<EnumConst name="Cirrocumulus" value="9"/>
<EnumConst name="Cirrus" value="10"/>
<EnumConst name="Missing" value="127"/>
</Enumeration>
</Types>
<Variables>
<Enum name="primary_cloud" enum="/cloud_class_t">
<Dim name="/_Anonymous2"/>
<Attribute name="_FillValue" type="/cloud_class_t">
<Value value="Missing"/>
</Attribute>
</Enum>
</Variables>
<Attribute name="_dap4.ce" type="String">
<Value value="/primary_cloud[1:2:4]"/>
</Attribute>
<Attribute name="_DAP4_Little_Endian" type="UInt8">
<Value value="1"/>
</Attribute>
</Dataset>

View File

@ -0,0 +1,18 @@
netcdf test_enum_array.nc {
types:
byte enum cloud_class_t {Clear = 0, Cumulonimbus = 1, Stratus = 2,
Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6,
Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10,
Missing = 127} ;
dimensions:
d5 = 5 ;
variables:
cloud_class_t primary_cloud(d5) ;
cloud_class_t primary_cloud:_FillValue = Missing ;
// global attributes:
:_DAP4_Little_Endian = 1UB ;
data:
primary_cloud = Clear, Stratus, Clear, Cumulonimbus, _ ;
}

View File

@ -0,0 +1,15 @@
netcdf test_enum_array {
types:
byte enum cloud_class_t {Clear = 0, Cumulonimbus = 1, Stratus = 2,
Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6,
Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10,
Missing = 127} ;
dimensions:
d5 = 5 ;
variables:
cloud_class_t primary_cloud(d5) ;
cloud_class_t primary_cloud:_FillValue = Missing ;
// global attributes:
:_DAP4_Little_Endian = 1UB ;
}

View File

@ -0,0 +1,37 @@
<Dataset
name="test_enum_array.nc"
dapVersion="4.0"
dmrVersion="1.0"
xmlns="http://xml.opendap.org/ns/DAP/4.0#"
xmlns:dap="http://xml.opendap.org/ns/DAP/4.0#">
<Dimensions>
<Dimension name="d5" size="5"/>
</Dimensions>
<Types>
<Enumeration name="cloud_class_t" basetype="Int8">
<EnumConst name="Clear" value="0"/>
<EnumConst name="Cumulonimbus" value="1"/>
<EnumConst name="Stratus" value="2"/>
<EnumConst name="Stratocumulus" value="3"/>
<EnumConst name="Cumulus" value="4"/>
<EnumConst name="Altostratus" value="5"/>
<EnumConst name="Nimbostratus" value="6"/>
<EnumConst name="Altocumulus" value="7"/>
<EnumConst name="Cirrostratus" value="8"/>
<EnumConst name="Cirrocumulus" value="9"/>
<EnumConst name="Cirrus" value="10"/>
<EnumConst name="Missing" value="127"/>
</Enumeration>
</Types>
<Variables>
<Enum name="primary_cloud" enum="/cloud_class_t">
<Dim name="/d5"/>
<Attribute name="_FillValue" type="/cloud_class_t">
<Value value="Missing"/>
</Attribute>
</Enum>
</Variables>
<Attribute name="_DAP4_Little_Endian" type="UInt8">
<Value value="1"/>
</Attribute>
</Dataset>

View File

@ -0,0 +1,17 @@
netcdf test_fill.nc {
variables:
ubyte uv8 ;
short v16 ;
uint uv32 ;
uv32:_FillValue = 17U ;
// global attributes:
:_DAP4_Little_Endian = 1UB ;
data:
uv8 = 240 ;
v16 = 32700 ;
uv32 = 111000 ;
}

View File

@ -0,0 +1,10 @@
netcdf test_fill {
variables:
ubyte uv8 ;
short v16 ;
uint uv32 ;
uv32:_FillValue = 17U ;
// global attributes:
:_DAP4_Little_Endian = 1UB ;
}

View File

@ -0,0 +1,19 @@
<Dataset
name="test_fill.nc"
dapVersion="4.0"
dmrVersion="1.0"
xmlns="http://xml.opendap.org/ns/DAP/4.0#"
xmlns:dap="http://xml.opendap.org/ns/DAP/4.0#">
<Variables>
<UInt8 name="uv8"/>
<Int16 name="v16"/>
<UInt32 name="uv32">
<Attribute name="_FillValue" type="UInt32">
<Value value="17"/>
</Attribute>
</UInt32>
</Variables>
<Attribute name="_DAP4_Little_Endian" type="UInt8">
<Value value="1"/>
</Attribute>
</Dataset>

View File

@ -0,0 +1,38 @@
netcdf test_groups1.nc {
dimensions:
dim1 = 5 ;
// global attributes:
:_DAP4_Little_Endian = 1UB ;
group: g {
dimensions:
dim2 = 3 ;
group: h {
dimensions:
dim3 = 7 ;
variables:
int v1(dim1) ;
float v2(dim2) ;
data:
v1 = -876354855, -1761252264, 1723477387, -46827465, 1475147969 ;
v2 = 12, -100, _ ;
} // group h
group: i {
dimensions:
dim3 = 7 ;
variables:
int v1(dim1) ;
float v3(dim3) ;
data:
v1 = 2, 3, 5, 7, 11 ;
v3 = 23, 29, 19, 31, 17, 37, 13 ;
} // group i
} // group g
}

View File

@ -0,0 +1,28 @@
netcdf test_groups1 {
dimensions:
dim1 = 5 ;
// global attributes:
:_DAP4_Little_Endian = 1UB ;
group: g {
dimensions:
dim2 = 3 ;
group: h {
dimensions:
dim3 = 7 ;
variables:
int v1(dim1) ;
float v2(dim2) ;
} // group h
group: i {
dimensions:
dim3 = 7 ;
variables:
int v1(dim1) ;
float v3(dim3) ;
} // group i
} // group g
}

View File

@ -0,0 +1,48 @@
<Dataset
name="test_groups1.nc"
dapVersion="4.0"
dmrVersion="1.0"
xmlns="http://xml.opendap.org/ns/DAP/4.0#"
xmlns:dap="http://xml.opendap.org/ns/DAP/4.0#">
<Dimensions>
<Dimension name="dim1" size="5"/>
</Dimensions>
<Attribute name="_DAP4_Little_Endian" type="UInt8">
<Value value="1"/>
</Attribute>
<Groups>
<Group name="g">
<Dimensions>
<Dimension name="dim2" size="3"/>
</Dimensions>
<Groups>
<Group name="h">
<Dimensions>
<Dimension name="dim3" size="7"/>
</Dimensions>
<Variables>
<Int32 name="v1">
<Dim name="/dim1"/>
</Int32>
<Float32 name="v2">
<Dim name="/g/dim2"/>
</Float32>
</Variables>
</Group>
<Group name="i">
<Dimensions>
<Dimension name="dim3" size="7"/>
</Dimensions>
<Variables>
<Int32 name="v1">
<Dim name="/dim1"/>
</Int32>
<Float32 name="v3">
<Dim name="/g/i/dim3"/>
</Float32>
</Variables>
</Group>
</Groups>
</Group>
</Groups>
</Dataset>

View File

@ -0,0 +1,10 @@
netcdf test_one_var.nc {
variables:
int t ;
// global attributes:
:_DAP4_Little_Endian = 1UB ;
data:
t = 17 ;
}

View File

@ -0,0 +1,7 @@
netcdf test_one_var {
variables:
int t ;
// global attributes:
:_DAP4_Little_Endian = 1UB ;
}

View File

@ -0,0 +1,13 @@
<Dataset
name="test_one_var.nc"
dapVersion="4.0"
dmrVersion="1.0"
xmlns="http://xml.opendap.org/ns/DAP/4.0#"
xmlns:dap="http://xml.opendap.org/ns/DAP/4.0#">
<Variables>
<Int32 name="t"/>
</Variables>
<Attribute name="_DAP4_Little_Endian" type="UInt8">
<Value value="1"/>
</Attribute>
</Dataset>

View File

@ -0,0 +1,13 @@
netcdf test_one_vararray.1.nc {
dimensions:
_Anonymous1 = 1 ;
variables:
int t(_Anonymous1) ;
// global attributes:
string :_dap4.ce = "/t[1]" ;
:_DAP4_Little_Endian = 1UB ;
data:
t = 37 ;
}

View File

@ -0,0 +1,10 @@
netcdf test_one_vararray.1 {
dimensions:
_Anonymous1 = 1 ;
variables:
int t(_Anonymous1) ;
// global attributes:
string :_dap4.ce = "/t[1]" ;
:_DAP4_Little_Endian = 1UB ;
}

View File

@ -0,0 +1,21 @@
<Dataset
name="test_one_vararray.nc"
dapVersion="4.0"
dmrVersion="1.0"
xmlns="http://xml.opendap.org/ns/DAP/4.0#"
xmlns:dap="http://xml.opendap.org/ns/DAP/4.0#">
<Dimensions>
<Dimension name="_Anonymous1" size="1"/>
</Dimensions>
<Variables>
<Int32 name="t">
<Dim name="/_Anonymous1"/>
</Int32>
</Variables>
<Attribute name="_dap4.ce" type="String">
<Value value="/t[1]"/>
</Attribute>
<Attribute name="_DAP4_Little_Endian" type="UInt8">
<Value value="1"/>
</Attribute>
</Dataset>

View File

@ -0,0 +1,13 @@
netcdf test_one_vararray.3.nc {
dimensions:
d2 = 2 ;
variables:
int t(d2) ;
// global attributes:
string :_dap4.ce = "/t[0:1]" ;
:_DAP4_Little_Endian = 1UB ;
data:
t = 17, 37 ;
}

View File

@ -0,0 +1,10 @@
netcdf test_one_vararray.3 {
dimensions:
d2 = 2 ;
variables:
int t(d2) ;
// global attributes:
string :_dap4.ce = "/t[0:1]" ;
:_DAP4_Little_Endian = 1UB ;
}

View File

@ -0,0 +1,21 @@
<Dataset
name="test_one_vararray.nc"
dapVersion="4.0"
dmrVersion="1.0"
xmlns="http://xml.opendap.org/ns/DAP/4.0#"
xmlns:dap="http://xml.opendap.org/ns/DAP/4.0#">
<Dimensions>
<Dimension name="d2" size="2"/>
</Dimensions>
<Variables>
<Int32 name="t">
<Dim name="/d2"/>
</Int32>
</Variables>
<Attribute name="_dap4.ce" type="String">
<Value value="/t[0:1]"/>
</Attribute>
<Attribute name="_DAP4_Little_Endian" type="UInt8">
<Value value="1"/>
</Attribute>
</Dataset>

View File

@ -0,0 +1,12 @@
netcdf test_one_vararray.nc {
dimensions:
d2 = 2 ;
variables:
int t(d2) ;
// global attributes:
:_DAP4_Little_Endian = 1UB ;
data:
t = 17, 37 ;
}

View File

@ -0,0 +1,9 @@
netcdf test_one_vararray {
dimensions:
d2 = 2 ;
variables:
int t(d2) ;
// global attributes:
:_DAP4_Little_Endian = 1UB ;
}

View File

@ -0,0 +1,18 @@
<Dataset
name="test_one_vararray.nc"
dapVersion="4.0"
dmrVersion="1.0"
xmlns="http://xml.opendap.org/ns/DAP/4.0#"
xmlns:dap="http://xml.opendap.org/ns/DAP/4.0#">
<Dimensions>
<Dimension name="d2" size="2"/>
</Dimensions>
<Variables>
<Int32 name="t">
<Dim name="/d2"/>
</Int32>
</Variables>
<Attribute name="_DAP4_Little_Endian" type="UInt8">
<Value value="1"/>
</Attribute>
</Dataset>

View File

@ -0,0 +1,12 @@
netcdf test_opaque.nc {
types:
ubyte(*) _bytestring ;
variables:
_bytestring vo1 ;
// global attributes:
:_DAP4_Little_Endian = 1UB ;
data:
vo1 = {1, 35, 69, 103, 137, 171, 205, 239} ;
}

View File

@ -0,0 +1,9 @@
netcdf test_opaque {
types:
opaque(8) opaque8_t ;
variables:
opaque8_t vo1 ;
// global attributes:
:_DAP4_Little_Endian = 1UB ;
}

View File

@ -0,0 +1,13 @@
<Dataset
name="test_opaque.nc"
dapVersion="4.0"
dmrVersion="1.0"
xmlns="http://xml.opendap.org/ns/DAP/4.0#"
xmlns:dap="http://xml.opendap.org/ns/DAP/4.0#">
<Variables>
<Opaque name="vo1" type="/opaque8_t"/>
</Variables>
<Attribute name="_DAP4_Little_Endian" type="UInt8">
<Value value="1"/>
</Attribute>
</Dataset>

View File

@ -0,0 +1,18 @@
netcdf test_opaque_array.7.nc {
types:
ubyte(*) _bytestring ;
dimensions:
_Anonymous1 = 1 ;
_Anonymous2 = 2 ;
variables:
_bytestring vo2(_Anonymous1, _Anonymous2) ;
// global attributes:
string :_dap4.ce = "/vo2[1][0:1]" ;
:_DAP4_Little_Endian = 1UB ;
data:
vo2 =
{254, 220, 186, 152, 118, 84, 50, 16},
{254, 220, 186, 153, 153, 153, 153, 153} ;
}

View File

@ -0,0 +1,13 @@
netcdf test_opaque_array.7 {
types:
opaque(8) opaque8_t ;
dimensions:
_Anonymous1 = 1 ;
_Anonymous2 = 2 ;
variables:
opaque8_t vo2(_Anonymous1, _Anonymous2) ;
// global attributes:
string :_dap4.ce = "/vo2[1][0:1]" ;
:_DAP4_Little_Endian = 1UB ;
}

View File

@ -0,0 +1,23 @@
<Dataset
name="test_opaque_array.nc"
dapVersion="4.0"
dmrVersion="1.0"
xmlns="http://xml.opendap.org/ns/DAP/4.0#"
xmlns:dap="http://xml.opendap.org/ns/DAP/4.0#">
<Dimensions>
<Dimension name="_Anonymous1" size="1"/>
<Dimension name="_Anonymous2" size="2"/>
</Dimensions>
<Variables>
<Opaque name="vo2" type="/opaque8_t">
<Dim name="/_Anonymous1"/>
<Dim name="/_Anonymous2"/>
</Opaque>
</Variables>
<Attribute name="_dap4.ce" type="String">
<Value value="/vo2[1][0:1]"/>
</Attribute>
<Attribute name="_DAP4_Little_Endian" type="UInt8">
<Value value="1"/>
</Attribute>
</Dataset>

View File

@ -0,0 +1,17 @@
netcdf test_opaque_array.nc {
types:
ubyte(*) _bytestring ;
dimensions:
d2 = 2 ;
variables:
_bytestring vo2(d2, d2) ;
// global attributes:
:_DAP4_Little_Endian = 1UB ;
data:
vo2 =
{1, 35, 69, 103, 137, 171, 205, 239}, {171, 205, 239, 0, 0, 0, 0, 0},
{254, 220, 186, 152, 118, 84, 50, 16},
{254, 220, 186, 153, 153, 153, 153, 153} ;
}

View File

@ -0,0 +1,11 @@
netcdf test_opaque_array {
types:
opaque(8) opaque8_t ;
dimensions:
d2 = 2 ;
variables:
opaque8_t vo2(d2, d2) ;
// global attributes:
:_DAP4_Little_Endian = 1UB ;
}

View File

@ -0,0 +1,19 @@
<Dataset
name="test_opaque_array.nc"
dapVersion="4.0"
dmrVersion="1.0"
xmlns="http://xml.opendap.org/ns/DAP/4.0#"
xmlns:dap="http://xml.opendap.org/ns/DAP/4.0#">
<Dimensions>
<Dimension name="d2" size="2"/>
</Dimensions>
<Variables>
<Opaque name="vo2" type="/opaque8_t">
<Dim name="/d2"/>
<Dim name="/d2"/>
</Opaque>
</Variables>
<Attribute name="_DAP4_Little_Endian" type="UInt8">
<Value value="1"/>
</Attribute>
</Dataset>

View File

@ -0,0 +1,16 @@
netcdf test_sequence_1.syn {
types:
compound s_base_t {
int i1 ;
short sh1 ;
}; // s_base_t
s_base_t(*) s_t ;
variables:
s_t s ;
// global attributes:
:_DAP4_Little_Endian = 1UB ;
data:
s = {{-920699049, 896}} ;
}

View File

@ -0,0 +1,13 @@
netcdf test_sequence_1 {
types:
compound s_base_t {
int i1 ;
short sh1 ;
}; // s_base_t
s_base_t(*) s_t ;
variables:
s_t s ;
// global attributes:
:_DAP4_Little_Endian = 1UB ;
}

View File

@ -0,0 +1,20 @@
<Dataset
name="test_sequence_1.syn"
dapVersion="4.0"
dmrVersion="1.0"
xmlns="http://xml.opendap.org/ns/DAP/4.0#"
xmlns:dap="http://xml.opendap.org/ns/DAP/4.0#">
<Types>
<Structure name="s_base">
<Int32 name="i1"/>
<Int16 name="sh1"/>
</Structure>
<Vlen name="s_t" type="/s_base"/>
</Types>
<Variables>
<Seq name="s" type="/s_t"/>
</Variables>
<Attribute name="_DAP4_Little_Endian" type="UInt8">
<Value value="1"/>
</Attribute>
</Dataset>

View File

@ -0,0 +1,19 @@
netcdf test_sequence_2.syn {
types:
compound s_base_t {
int i1 ;
short sh1 ;
}; // s_base_t
s_base_t(*) s_t ;
dimensions:
_Anonymous2 = 2 ;
variables:
s_t s(_Anonymous2) ;
// global attributes:
:_DAP4_Little_Endian = 1UB ;
data:
s = {{-920699049, 896}},
{{-1123468835, -18686}, {2125143125, -21899}, {1268468519, -22144}, {989876086, 3361}} ;
}

View File

@ -0,0 +1,15 @@
netcdf test_sequence_2 {
types:
compound s_base_t {
int i1 ;
short sh1 ;
}; // s_base_t
s_base_t(*) s_t ;
dimensions:
_Anonymous2 = 2 ;
variables:
s_t s(_Anonymous2) ;
// global attributes:
:_DAP4_Little_Endian = 1UB ;
}

View File

@ -0,0 +1,25 @@
<Dataset
name="test_sequence_2.syn"
dapVersion="4.0"
dmrVersion="1.0"
xmlns="http://xml.opendap.org/ns/DAP/4.0#"
xmlns:dap="http://xml.opendap.org/ns/DAP/4.0#">
<Dimensions>
<Dimension name="_Anonymous2" size="2"/>
</Dimensions>
<Types>
<Structure name="s_base">
<Int32 name="i1"/>
<Int16 name="sh1"/>
</Structure>
<Vlen name="s_t" type="/s_base"/>
</Types>
<Variables>
<Seq name="s" type="/s_t">
<Dim name="/_Anonymous2"/>
</Sequence>
</Variables>
<Attribute name="_DAP4_Little_Endian" type="UInt8">
<Value value="1"/>
</Attribute>
</Dataset>

View File

@ -0,0 +1,16 @@
netcdf test_struct1.nc {
types:
compound s_t {
int x ;
int y ;
}; // s_t
variables:
s_t s ;
string s:_edu.ucar.maps = "/s.x", "/s.y" ;
// global attributes:
:_DAP4_Little_Endian = 1UB ;
data:
s = {1, -2} ;
}

View File

@ -0,0 +1,13 @@
netcdf test_struct1 {
types:
compound s_t {
int x ;
int y ;
}; // s_t
variables:
s_t s ;
string s:_edu.ucar.maps = "/s.x", "/s.y" ;
// global attributes:
:_DAP4_Little_Endian = 1UB ;
}

View File

@ -0,0 +1,22 @@
<Dataset
name="test_struct1.nc"
dapVersion="4.0"
dmrVersion="1.0"
xmlns="http://xml.opendap.org/ns/DAP/4.0#"
xmlns:dap="http://xml.opendap.org/ns/DAP/4.0#">
<Types>
<Structure name="s">
<Int32 name="x"/>
<Int32 name="y"/>
</Structure>
</Types>
<Variables>
<Struct name="s" type="/s">
<Map name="/s.x"/>
<Map name="/s.y"/>
</Struct>
</Variables>
<Attribute name="_DAP4_Little_Endian" type="UInt8">
<Value value="1"/>
</Attribute>
</Dataset>

View File

@ -0,0 +1,21 @@
netcdf test_struct_array.6.nc {
types:
compound s_t {
int x ;
int y ;
}; // s_t
dimensions:
_Anonymous2 = 2 ;
variables:
s_t s(_Anonymous2, _Anonymous2) ;
string s:_edu.ucar.maps = "/s.x", "/s.y" ;
// global attributes:
string :_dap4.ce = "/s[0:2:3][0:1]" ;
:_DAP4_Little_Endian = 1UB ;
data:
s =
{1, -1}, {17, 37},
{-4, 12}, {-8, 8} ;
}

View File

@ -0,0 +1,16 @@
netcdf test_struct_array.6 {
types:
compound s_t {
int x ;
int y ;
}; // s_t
dimensions:
_Anonymous2 = 2 ;
variables:
s_t s(_Anonymous2, _Anonymous2) ;
string s:_edu.ucar.maps = "/s.x", "/s.y" ;
// global attributes:
string :_dap4.ce = "/s[0:2:3][0:1]" ;
:_DAP4_Little_Endian = 1UB ;
}

View File

@ -0,0 +1,30 @@
<Dataset
name="test_struct_array.nc"
dapVersion="4.0"
dmrVersion="1.0"
xmlns="http://xml.opendap.org/ns/DAP/4.0#"
xmlns:dap="http://xml.opendap.org/ns/DAP/4.0#">
<Dimensions>
<Dimension name="_Anonymous2" size="2"/>
</Dimensions>
<Types>
<Structure name="s">
<Int32 name="x"/>
<Int32 name="y"/>
</Structure>
</Types>
<Variables>
<Struct name="s" type="/s">
<Dim name="/_Anonymous2"/>
<Dim name="/_Anonymous2"/>
<Map name="/s.x"/>
<Map name="/s.y"/>
</Struct>
</Variables>
<Attribute name="_dap4.ce" type="String">
<Value value="/s[0:2:3][0:1]"/>
</Attribute>
<Attribute name="_DAP4_Little_Endian" type="UInt8">
<Value value="1"/>
</Attribute>
</Dataset>

View File

@ -0,0 +1,23 @@
netcdf test_struct_array.nc {
types:
compound s_t {
int x ;
int y ;
}; // s_t
dimensions:
dx = 4 ;
dy = 3 ;
variables:
s_t s(dx, dy) ;
string s:_edu.ucar.maps = "/s.x", "/s.y" ;
// global attributes:
:_DAP4_Little_Endian = 1UB ;
data:
s =
{1, -1}, {17, 37}, {-32767, 32767},
{-1, 3}, {-2, 2}, {-3, 1},
{-4, 12}, {-8, 8}, {-12, 4},
{-5, 15}, {-10, 10}, {-15, 5} ;
}

View File

@ -0,0 +1,16 @@
netcdf test_struct_array {
types:
compound s_t {
int x ;
int y ;
}; // s_t
dimensions:
dx = 4 ;
dy = 3 ;
variables:
s_t s(dx, dy) ;
string s:_edu.ucar.maps = "/s.x", "/s.y" ;
// global attributes:
:_DAP4_Little_Endian = 1UB ;
}

View File

@ -0,0 +1,28 @@
<Dataset
name="test_struct_array.nc"
dapVersion="4.0"
dmrVersion="1.0"
xmlns="http://xml.opendap.org/ns/DAP/4.0#"
xmlns:dap="http://xml.opendap.org/ns/DAP/4.0#">
<Dimensions>
<Dimension name="dx" size="4"/>
<Dimension name="dy" size="3"/>
</Dimensions>
<Types>
<Structure name="s">
<Int32 name="x"/>
<Int32 name="y"/>
</Structure>
</Types>
<Variables>
<Struct name="s" type="/s">
<Dim name="/dx"/>
<Dim name="/dy"/>
<Map name="/s.x"/>
<Map name="/s.y"/>
</Struct>
</Variables>
<Attribute name="_DAP4_Little_Endian" type="UInt8">
<Value value="1"/>
</Attribute>
</Dataset>

View File

@ -0,0 +1,31 @@
netcdf test_struct_array.syn {
types:
compound s_t {
int x ;
int y ;
}; // s_t
dimensions:
dx = 4 ;
dy = 3 ;
variables:
float z(dx) ;
float t(dy) ;
s_t s(dx, dy) ;
string s:_edu.ucar.maps = "/z", "/t" ;
// global attributes:
:_DAP4_Little_Endian = 1UB ;
data:
z = 0.7276533, 0.785633, 0.513679, 0.2468447 ;
t = 0.738422, 0.2148887, 0.4947984 ;
s =
{712320147, 1268468519}, {696298400, 989876086}, {-1927163883, -900795134},
{-708236713, 1377500019}, {511843988, 1699265896}, {-540214433, -914532520},
{-1344032615, -871416961}, {-1928735161, 935744880},
{-1509955773, -1707460853},
{1145911788, -415231529}, {-278269626, -1682978013},
{-1629885665, -909240754} ;
}

View File

@ -0,0 +1,18 @@
netcdf test_struct_array {
types:
compound s_t {
int x ;
int y ;
}; // s_t
dimensions:
dx = 4 ;
dy = 3 ;
variables:
float z(dx) ;
float t(dy) ;
s_t s(dx, dy) ;
string s:_edu.ucar.maps = "/z", "/t" ;
// global attributes:
:_DAP4_Little_Endian = 1UB ;
}

View File

@ -0,0 +1,34 @@
<Dataset
name="test_struct_array.nc"
dapVersion="4.0"
dmrVersion="1.0"
xmlns="http://xml.opendap.org/ns/DAP/4.0#"
xmlns:dap="http://xml.opendap.org/ns/DAP/4.0#">
<Dimensions>
<Dimension name="dx" size="4"/>
<Dimension name="dy" size="3"/>
</Dimensions>
<Types>
<Structure name="s">
<Int32 name="x"/>
<Int32 name="y"/>
</Structure>
</Types>
<Variables>
<Float32 name="z">
<Dim name="/dx"/>
</Float32>
<Float32 name="t">
<Dim name="/dy"/>
</Float32>
<Struct name="s" type="/s">
<Dim name="/dx"/>
<Dim name="/dy"/>
<Map name="/z"/>
<Map name="/t"/>
</Struct>
</Variables>
<Attribute name="_DAP4_Little_Endian" type="UInt8">
<Value value="1"/>
</Attribute>
</Dataset>

View File

@ -0,0 +1,24 @@
netcdf test_struct_nested.nc {
types:
compound x_field1_t {
int x ;
int y ;
}; // x_field1_t
compound x_field2_t {
int x ;
int y ;
}; // x_field2_t
compound x_t {
x_field1_t field1 ;
x_field1_t field2 ;
}; // x_t
variables:
x_t x ;
string x:_edu.ucar.maps = "/x_field1.x", "/x_field1.y" ;
// global attributes:
:_DAP4_Little_Endian = 1UB ;
data:
x = {{1, -2}, {255, 90}} ;
}

Some files were not shown because too many files have changed in this diff Show More