Primary change: add dap4 support

Specific changes:
1. Add dap4 code: libdap4 and dap4_test.
   Note that until the d4ts server problem is solved, dap4 is turned off.
2. Modify various files to support dap4 flags:
	configure.ac, Makefile.am, CMakeLists.txt, etc.
3. Add nc_test/test_common.sh. This centralizes
   the handling of the locations of various
   things in the build tree: e.g. where is
   ncgen.exe located. See nc_test/test_common.sh
   for details.
4. Modify .sh files to use test_common.sh
5. Obsolete separate oc2 by moving it to be part of
   netcdf-c. This means replacing code with netcdf-c
   equivalents.
5. Add --with-testserver to configure.ac to allow
   override of the servers to be used for --enable-dap-remote-tests.
6. There were multiple versions of nctypealignment code. Try to
   centralize in libdispatch/doffset.c and include/ncoffsets.h
7. Add a unit test for the ncuri code because of its complexity.
8. Move the findserver code out of libdispatch and into
   a separate, self contained program in ncdap_test and dap4_test.
9. Move the dispatch header files (nc{3,4}dispatch.h) to
   .../include because they are now shared by modules.
10. Revamp the handling of TOPSRCDIR and TOPBUILDDIR for shell scripts.
11. Make use of MREMAP if available
12. Misc. minor changes e.g.
	- #include <config.h> -> #include "config.h"
	- Add some no-install headers to /include
	- extern -> EXTERNL and vice versa as needed
	- misc header cleanup
	- clean up checking for misc. unix vs microsoft functions
13. Change copyright decls in some files to point to LICENSE file.
14. Add notes to RELEASENOTES.md
This commit is contained in:
Dennis Heimbigner 2017-03-08 17:01:10 -07:00
parent 98f5de4bf7
commit 3db4f013bf
672 changed files with 26553 additions and 7546 deletions

View File

@ -751,10 +751,19 @@ 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)
OPTION(ENABLE_DAP4 "Enable DAP4 Client." OFF) # Temporary
IF(ENABLE_DAP)
SET(USE_DAP ON)
SET(ENABLE_DAP2 ON)
IF(ENABLE_NETCDF_4)
IF(ENABLE_DAP4)
SET(ENABLE_DAP4 ON)
ENDIF()
ELSE()
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 +802,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 +821,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.")
@ -1196,6 +1202,8 @@ SET(HAVE_ST_BLKSIZE ${HAVE_STRUCT_STAT_ST_BLKSIZE})
# Type checks
CHECK_TYPE_SIZE("void*" SIZEOF_VOIDSTAR)
# Alias for automake consistency
SET(SIZEOF_VOIDP ${SIZEOF_VOIDSTAR})
CHECK_TYPE_SIZE("char" SIZEOF_CHAR)
CHECK_TYPE_SIZE("double" SIZEOF_DOUBLE)
CHECK_TYPE_SIZE("float" SIZEOF_FLOAT)
@ -1313,6 +1321,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})
@ -1442,7 +1451,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 +1473,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 +1491,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 +1626,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 +1662,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 +1759,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,7 +1820,8 @@ 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)
@ -1839,6 +1858,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
@ -182,6 +185,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:

View File

@ -11,6 +11,14 @@ This file contains a high-level description of this package's evolution. Release
## 4.4.2 - TBD
* [Upgrade] The bash based test scripts have been upgraded to use a common test_common.sh include file that isolates build specific 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 disabled by default until the testserver situation is resolved.
* [Enhancement] The remote testing server can now be specified with the '--with-testserver" option to ./configure.
* [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.
* [Upgrade] Update utf8proc.[ch] to use the version now maintained by the
Julia Language project (https://github.com/JuliaLang/utf8proc/blob/master/LICENSE.md).
* [Bug] Addressed conversion problem with Windows sscanf. This primarily affected some OPeNDAP URLs on Windows. See [GitHub #365](https://github.com/Unidata/netcdf-c/issues/365) and [GitHub #366](https://github.com/Unidata/netcdf-c/issues/366) for more information.

34
cf
View File

@ -2,9 +2,9 @@
#NB=1
DB=1
#X=-x
#FAST=1
FAST=1
#HDF5=1
HDF5=1
DAP=1
#HDF4=1
#PNETCDF=1
@ -56,23 +56,6 @@ 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
MAKE=make
IGNORE="test 0 = 1"
@ -86,7 +69,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 +79,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 +94,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 +111,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"

44
cf.cmake Normal file
View File

@ -0,0 +1,44 @@
# Is netcdf-4 and/or DAP enabled?
NC4=1
DAP=1
# Is visual studio being used?
VS=yes
#CYGWIN=yes
if test "x$VS" = x ; then
#CC=mpicc
CC=gcc
fi
export CC
FLAGS="-DCMAKE_PREFIX_PATH=c:/tools/nccmake"
FLAGS="$FLAGS -DCMAKE_INSTALL_PREFIX=d:/ignore"
if test "x$DAP" = x ; then
FLAGS="$FLAGS -DENABLE_DAP=false"
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_DAP4=true"
#FLAGS="$FLAGS -DENABLE_HDF4=true"
rm -fr build
mkdir build
cd build
cmake $FLAGS ..
# We must use Release config here because Debug will invoke a runtime dialog box.
# If missing, appears to default to Debug
VSCFG=RelWithDebInfo
CFG="--config $VSCFG"
export PATH="/cygdrive/d/git/dap4/build/liblib/${VSCFG}:$PATH"
cmake --build . ${CFG}
cmake --build . ${CFG} --target RUN_TESTS

View File

@ -82,15 +82,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

View File

@ -320,8 +320,8 @@ 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.])])
@ -385,20 +385,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 +802,27 @@ 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
# Set flags for dap4
## Capture the state of the --enable-dap4 (Temporary)
#enable_dap4=$enable_dap
AC_MSG_CHECKING([whether DAP4 client(s) are to be built])
AC_ARG_ENABLE([dap4],
[AS_HELP_STRING([--enable-dap4],
[build with DAP4 client support (default off).])])
test "x$enable_dap4" = xyes || enable_dap4=no
AC_MSG_RESULT($enable_dap4)
# 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 +857,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
@ -857,6 +892,8 @@ $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_ushort" = yes ; then
@ -871,10 +908,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 +922,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
@ -1125,6 +1161,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 +1274,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])
@ -1304,6 +1345,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 +1353,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 +1375,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 +1386,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()

47
dap4_test/CMakeLists.txt Normal file
View File

@ -0,0 +1,47 @@
SET(abs_top_srcdir ${CMAKE_CURRENT_SOURCE_DIR})
remove_definitions(-DDLL_EXPORT)
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)
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

77
dap4_test/Makefile.am Normal file
View File

@ -0,0 +1,77 @@
## 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
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,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}} ;
}

View File

@ -0,0 +1,21 @@
netcdf test_struct_nested {
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 ;
}

View File

@ -0,0 +1,30 @@
<Dataset
name="test_struct_nested.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="x">
<Struct name="field1" type="/x_field1"/>
<Struct name="field2" type="/x_field2"/>
</Structure>
<Structure name="x_field1">
<Int32 name="x"/>
<Int32 name="y"/>
</Structure>
<Structure name="x_field2">
<Int32 name="x"/>
<Int32 name="y"/>
</Structure>
</Types>
<Variables>
<Struct name="x" type="/x">
<Map name="/x_field1.x"/>
<Map name="/x_field1.y"/>
</Struct>
</Variables>
<Attribute name="_DAP4_Little_Endian" type="UInt8">
<Value value="1"/>
</Attribute>
</Dataset>

View File

@ -0,0 +1,20 @@
netcdf test_struct_nested3.nc {
types:
compound x_field3_field2_t {
int field1 ;
}; // x_field3_field2_t
compound x_field3_t {
x_field3_field2_t field2 ;
}; // x_field3_t
compound x_t {
x_field3_t field3 ;
}; // x_t
variables:
x_t x ;
// global attributes:
:_DAP4_Little_Endian = 1UB ;
data:
x = {{{17}}} ;
}

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