Commit 5ce15310 authored by Dave DeMarle's avatar Dave DeMarle
Browse files

Update netcdf to support netcdf4 functionality.

restructured into subdirectories so that I can import more of netcdf
to get the netcdf4/hdf5 components
updated to netcdf 4.1.2,
whitespace converted to make our git hooks happy,
cmakeified it all,
updated vtknetcdf mangling
updated the vtknetcdf include path (see corresponding change in VisItBridge)
parent bd1e1150
......@@ -11,7 +11,7 @@ IF(NOT VTK_USE_SYSTEM_HDF5)
SET(HDF5_EXPORTED_TARGETS ${VTK_INSTALL_EXPORT_NAME})
IF(NOT VTK_INSTALL_NO_LIBRARIES)
SET_PROPERTY(GLOBAL APPEND PROPERTY VTK_TARGETS vtkhdf5)
SET_PROPERTY(GLOBAL APPEND PROPERTY VTK_TARGETS vtkhdf5 vtkhdf5_hl)
ENDIF(NOT VTK_INSTALL_NO_LIBRARIES)
# Silence HDF5's warnings. We'll let them get fixed upstream
......
......@@ -16,6 +16,6 @@
#define __vtk_netcdf_h
/* Use the netcdf library configured for VTK. */
#include <vtknetcdf/netcdf.h>
#include <vtknetcdf/include/netcdf.h>
#endif
......@@ -16,6 +16,6 @@
#define __vtk_netcdfcpp_h
/* Use the netcdf library configured for VTK. */
#include <vtknetcdf/netcdfcpp.h>
#include <vtknetcdf/cxx/netcdfcpp.h>
#endif
......@@ -544,7 +544,7 @@ ENDIF(0)
#-----------------------------------------------------------------------------
# Option to build High Level API's
#-----------------------------------------------------------------------------
OPTION (HDF5_BUILD_HL_LIB "Build HIGH Level HDF5 Library" OFF)
OPTION (HDF5_BUILD_HL_LIB "Build HIGH Level HDF5 Library" ON)
IF (HDF5_BUILD_HL_LIB)
SET (H5_INCLUDE_HL 1)
ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/hl ${PROJECT_BINARY_DIR}/hl)
......
......@@ -2,42 +2,9 @@ PROJECT(VTKNETCDF)
INCLUDE_REGULAR_EXPRESSION(".*")
SET(VERSION "4.1.1")
SET(VERSION "4.1.2")
SET(PACKAGE "netcdf")
SET(netcdf_SRCS
attr.c
dim.c
error.c
libvers.c
nc.c
posixio.c
ncx.c
putget.c
string.c
utf8proc.c
v1hpg.c
v2i.c
var.c
)
SET(netcdfcxx_SRCS
netcdf.cpp
ncvalues.cpp
)
IF(APPLE)
SET_SOURCE_FILES_PROPERTIES(
v2i.c
PROPERTIES
COMPILE_FLAGS -fno-common)
ENDIF(APPLE)
INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
)
# Include all the necessary files for macros
INCLUDE (CheckIncludeFiles)
INCLUDE (CheckFunctionExists)
......@@ -257,6 +224,38 @@ ENDIF(NOT HAVE_SIZEOF_PTRDIFF_T)
TEST_BIG_ENDIAN(CMAKE_WORDS_BIGENDIAN)
SET(WORDS_BIGENDIAN ${CMAKE_WORDS_BIGENDIAN})
OPTION(NETCDF_ENABLE_CXX "Build netcdf C++ API" ON)
SET(CXX NETCDF_ENABLE_CXX)
OPTION(NETCDF_ENABLE_NETCDF4 "Build netcdf version 4 API" ON)
IF (NOT HDF5_BUILD_HL_LIB AND NETCDF_ENABLE_NETCDF4)
message("ENABLE_NETCDF4 not allowed because netcdf4 functionality requires HDF5_BUILD_HL_LIB.")
SET(NETCDF_ENABLE_NETCDF4 OFF CACHE BOOL "Build netcdf version 4 API" FORCE)
ENDIF (NOT HDF5_BUILD_HL_LIB AND NETCDF_ENABLE_NETCDF4)
mark_as_advanced(NETCDF_ENABLE_NETCDF4)
SET(USE_NETCDF4 ${NETCDF_ENABLE_NETCDF4} CACHE INTERNAL "" FORCE)
if (NETCDF_ENABLE_NETCDF4)
set(NETCDF4_DEFAULT_CHUNK_SIZE 4194304 CACHE STRING "Specify default size of chunks in bytes.")
mark_as_advanced(NETCDF4_DEFAULT_CHUNK_SIZE)
set(NETCDF4_MAX_DEFAULT_CACHE_SIZE 67108864 CACHE STRING "Specify maximum size (in bytes) for the default per-var chunk cache.")
mark_as_advanced(NETCDF4_MAX_DEFAULT_CACHE_SIZE)
set(NETCDF4_DEFAULT_CHUNKS_IN_CACHE 10 CACHE STRING "Specify the number of chunks to store in default per-variable cache.")
mark_as_advanced(NETCDF4_DEFAULT_CHUNKS_IN_CACHE)
set(NETCDF4_CHUNK_CACHE_SIZE 4194304 CACHE STRING "Specify default file cache chunk size for HDF5 files in bytes.")
mark_as_advanced(NETCDF4_CHUNK_CACHE_SIZE)
set(NETCDF4_CHUNK_CACHE_NELEMS 1009 CACHE STRING "Specify default maximum number of elements in the file chunk cache chunk for HDF5 files (should be prime number).")
mark_as_advanced(NETCDF4_CHUNK_CACHE_NELEMS)
set(NETCDF4_CHUNK_CACHE_PREEMPTION 0.75 CACHE STRING "Specify default file chunk cache preemption policy for HDF5 files (a number between 0 and 1, inclusive).")
mark_as_advanced(NETCDF4_CHUNK_CACHE_PREEMPTION)
endif (NETCDF_ENABLE_NETCDF4)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/ncconfig.h.in
${CMAKE_CURRENT_BINARY_DIR}/ncconfig.h @ONLY IMMEDIATE)
......@@ -286,20 +285,72 @@ IF (NETCDF_DISABLE_COMPILER_WARNINGS)
ENDIF ()
ENDIF (NETCDF_DISABLE_COMPILER_WARNINGS)
VTK_ADD_LIBRARY(vtkNetCDF
${netcdf_SRCS})
VTK_ADD_LIBRARY(vtkNetCDF_cxx ${netcdfcxx_SRCS})
TARGET_LINK_LIBRARIES(vtkNetCDF_cxx vtkNetCDF)
#-----------------------------------------------------------------------------
#configure the various requested parts of netcdf
#-----------------------------------------------------------------------------
# Take care of symbol export/import on Windows
ADD_DEFINITIONS("-DNC_DLL_EXPORT")
INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/include
${CMAKE_CURRENT_SOURCE_DIR}/libdispatch
${CMAKE_CURRENT_SOURCE_DIR}/libsrc
${CMAKE_CURRENT_SOURCE_DIR}/libsrc4
${CMAKE_CURRENT_BINARY_DIR}
${HDF5_INCLUDE_DIR}
)
set(netcdf_liblib_SOURCES "" CACHE INTERNAL "" FORCE)
ADD_SUBDIRECTORY(liblib)
set(netcdf_dispatch_SOURCES "" CACHE INTERNAL "" FORCE)
ADD_SUBDIRECTORY(libdispatch)
set(netcdf_src_SOURCES "" CACHE INTERNAL "" FORCE)
ADD_SUBDIRECTORY(libsrc)
set(netcdf_src4_SOURCES "" CACHE INTERNAL "" FORCE)
IF (NETCDF_ENABLE_NETCDF4)
ADD_SUBDIRECTORY(libsrc4)
ENDIF (NETCDF_ENABLE_NETCDF4)
IF (NETCDF_ENABLE_CXX)
set(netcdf_cxx_SOURCES "" CACHE INTERNAL "" FORCE)
ADD_SUBDIRECTORY(cxx)
ENDIF (NETCDF_ENABLE_CXX)
IF(APPLE)
SET_SOURCE_FILES_PROPERTIES(
v2i.c
PROPERTIES
COMPILE_FLAGS -fno-common)
ENDIF(APPLE)
VTK_ADD_LIBRARY(vtkNetCDF
${netcdf_src_SOURCES}
${netcdf_src4_SOURCES}
${netcdf_dispatch_SOURCES}
${netcdf_liblib_SOURCES})
IF (NETCDF_ENABLE_NETCDF4)
TARGET_LINK_LIBRARIES(vtkNetCDF vtkhdf5 vtkhdf5_hl)
ENDIF (NETCDF_ENABLE_NETCDF4)
VTK_ADD_LIBRARY(vtkNetCDF_cxx ${netcdf_cxx_SOURCES})
TARGET_LINK_LIBRARIES(vtkNetCDF_cxx vtkNetCDF)
# Apply user-defined properties to the library target.
IF(VTK_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(vtkNetCDF PROPERTIES ${VTK_LIBRARY_PROPERTIES})
ENDIF(VTK_LIBRARY_PROPERTIES)
#-----------------------------------------------------------------------------
#package the result
#-----------------------------------------------------------------------------
IF(NOT VTK_INSTALL_NO_LIBRARIES)
IF(NOT VTK_INSTALL_BIN_DIR_CM24)
SET(VTK_INSTALL_BIN_DIR_CM24 ${CMAKE_INSTALL_PREFIX}/bin)
......
## This is a automake file, part of Unidata's netCDF package.
# Copyright 2005, see the COPYRIGHT file for more information.
# This is the main automake file for netCDF. It builds the different
# netcdf directories. Not all directories are built, depending on the
# options selected during configure.
# $Id: Makefile.am,v 1.137 2010/06/01 15:34:49 ed Exp $
# This directory stores libtool macros, put there by aclocal.
ACLOCAL_AMFLAGS = -I m4
# These files get added to the distribution.
EXTRA_DIST = README COPYRIGHT RELEASE_NOTES INSTALL test_prog.c \
test_prog.F test_prog.f90 lib_flags.am
pkgconfigdir=$(libdir)/pkgconfig
pkgconfig_DATA = netcdf.pc
# This will go to the man directory and build, if necessary, the
# netcdf-install.txt file, which will be copied into the main
# directory, renamed "INSTALL".
INSTALL:
cd man4; make netcdf-install.info netcdf-install.txt
cp man4/netcdf-install.txt INSTALL
# If the user wants the F77 API this will cause it to be built and
# tested.
if BUILD_F77
F77_DIR = fortran
F77_TEST = nf_test
endif
# Does the user want C API?
if BUILD_C
LIBSRC_DIR = libsrc
NC_TEST_DIR = nc_test
# Does the user want to build the V2 API?
if BUILD_V2
V2_TEST = nctest
endif
# Does the user want C++ API?
if BUILD_CXX
CXX_DIR = cxx
endif
# Does the user want to build ncgen/ncdump?
if BUILD_UTILITIES
NCGEN3 = ncgen3
NCGEN = ncgen
NCDUMP = ncdump
endif
# Does the user want to build the examples?
if BUILD_EXAMPLES
EXAMPLES = examples
endif
# Is the user building netCDF-4?
if USE_NETCDF4
H5_TEST_DIR = h5_test
LIBSRC4_DIR = libsrc4
NC_TEST4 = nc_test4
endif
DISPATCHDIR = libdispatch
ASSEMBLEDIR = liblib
endif # BUILD_C
# Does the user want F90 API?
if BUILD_F90
F90_DIR = f90
endif
# Build the new netCDF-4 C++ API?
if BUILD_CXX4
CXX4 = cxx4
endif
# Build the opendap client?
if BUILD_DAP
OCLIB=oc
NCDAP3=libncdap3
if BUILD_UTILITIES
NCDAPTESTDIR=ncdap_test
endif # BUILD_UTILITIES
NCDAP4=libncdap4
endif
# Build UDUNITS?
if BUILD_UDUNITS
UDUNITS=udunits
endif
# Build libcf?
if BUILD_LIBCF
LIBCF=libcf
endif
# Build libcdmr
if BUILD_CDMREMOTE
LIBCDMR=libcdmr
endif
# This is the list of subdirs for which Makefiles will be constructed
# and run. ncgen must come before ncdump and cxx, because their tests
# depend on it. nf_test depends upon ncgen as well.
# If not using dispatch then NC3DAPDIR must be
# built right before LIBSRC_DIR and NC4DAPDIR must be
# built right before LIBSRC4_DIR.
# If using dispatch, then the order is different
if BUILD_SEPARATE_FORTRAN
SUBDIRS = include $(UDUNITS) $(H5_TEST_DIR) $(DISPATCHDIR) $(OCLIB) \
$(F90_DIR) $(F77_DIR) $(LIBSRC_DIR) $(LIBSRC4_DIR) $(NCDAP3) $(NCDAP4) \
$(LIBCDMR) ${ASSEMBLEDIR} $(V2_TEST) $(NCGEN3) $(NCGEN) $(NCDUMP) \
$(F77_TEST) ${CXX_DIR} $(CXX4) $(NC_TEST4) $(NC_TEST_DIR) \
$(NCDAPTESTDIR) man4 $(EXAMPLES) $(LIBCF)
else
SUBDIRS = include $(UDUNITS) $(H5_TEST_DIR) $(DISPATCHDIR) $(OCLIB) \
$(F90_DIR) $(F77_DIR) $(LIBSRC_DIR) $(LIBSRC4_DIR) $(NCDAP3) $(NCDAP4) \
$(LIBCDMR) ${ASSEMBLEDIR} $(V2_TEST) $(NCGEN3) $(NCGEN) $(NCDUMP) \
$(F77_TEST) ${CXX_DIR} $(CXX4) $(NC_TEST4) $(NC_TEST_DIR) \
$(NCDAPTESTDIR) man4 $(EXAMPLES) $(LIBCF)
endif
# Remove these generated files, for a distclean.
DISTCLEANFILES = VERSION comps.txt test_prog
# The nc-config script helps the user build programs with netCDF.
bin_SCRIPTS = nc-config
# What needs to go in the binrary dist?
BINFILES = README_BINARIES.txt
if BUILD_C
BINFILES += include/netcdf.h share/man/man3/netcdf.3 lib/libnetcdf.a
endif
if BUILD_UTILITIES
BINFILES += bin/ncgen3$(EXEEXT) bin/ncgen$(EXEEXT) bin/ncdump$(EXEEXT) \
share/man/man1/ncgen.1 share/man/man1/ncdump.1
endif
if BUILD_F77
BINFILES += include/netcdf.inc share/man/man3/netcdf_f77.3
if BUILD_SEPARATE_FORTRAN
BINFILES += lib/libnetcdff.a
endif
endif
if BUILD_F90
if UPPER_CASE_MOD
BINFILES += include/NETCDF.mod include/TYPESIZES.mod
else
BINFILES += include/netcdf.mod include/typesizes.mod
endif
BINFILES += share/man/man3/netcdf_f90.3
endif
if BUILD_CXX
BINFILES += include/netcdf.hh include/ncvalues.h include/netcdfcpp.h lib/libnetcdf_c++.a
endif
if BUILD_DLL
BINFILES += liblib/.libs/cygnetcdf-7.dll liblib/.libs/libnetcdf.dll.a \
liblib/.libs/libnetcdf.a liblib/.libs/libnetcdf.la
if BUILD_F77
BINFILES +=
endif # BUILD_F77
endif # BUILD_DLL
# At Unidata, package up binaries.
ftpbin: install
echo "Getting binaries from ${prefix}"
ls -l ${prefix}
echo "These are the binaries for netCDF @PACKAGE_VERSION@." > ${prefix}/README_BINARIES.txt
echo "For this build: CC=$(CC) CXX=$(CXX) FC=$(FC) F77=$(F77) $F90=$(F90)" >> ${prefix}/README_BINARIES.txt
echo "CFLAGS=$(CFLAGS) CXXFLAGS=$(CXXFLAGS)" >> ${prefix}/README_BINARIES.txt
echo "FCFLAGS=$(FCFLAGS) F77FLAGS=$(F77FLAGS) $F90FLAGS=$(F90FLAGS)" >> ${prefix}/README_BINARIES.txt
which tar
echo "PATH: $(PATH)"
tar cf @BINFILE_NAME@ -C ${prefix} ${BINFILES}
gzip -f @BINFILE_NAME@
check_nc_config:
$(CC) `./nc-config --cflags` test_prog.c -o test_prog `./nc-config --libs`
./test_prog
$(F77) `./nc-config --fflags` test_prog.F -o test_prog `./nc-config --libs`
./test_prog
$(FC) `./nc-config --fflags` test_prog.f90 -o test_prog `./nc-config --libs`
./test_prog
install-data-hook:
@echo ''
@echo '+-------------------------------------------------------------+'
@echo '| Congratulations! You have successfully installed netCDF! |'
@echo '| |'
@echo '| You can use script "nc-config" to find out the relevant |'
@echo '| compiler options to build your application. Enter |'
@echo '| |'
@echo '| nc-config --help |'
@echo '| |'
@echo '| for additional information. |'
@echo '| |'
@echo '| CAUTION: |'
@echo '| |'
@echo '| If you have not already run "make check", then we strongly |'
@echo '| recommend you do so. It does not take very long. |'
@echo '| |'
@echo '| Before using netCDF to store important data, test your |'
@echo '| build with "make check". |'
@echo '| |'
@echo '| NetCDF is tested nightly on many platforms at Unidata |'
@echo '| but your platform is probably different in some ways. |'
@echo '| |'
@echo '| If any tests fail, please see the netCDF web site: |'
@echo '| http://www.unidata.ucar.edu/software/netcdf/ |'
@echo '| |'
@echo '| NetCDF is developed and maintained at the Unidata Program |'
@echo '| Center. Unidata provides a broad array of data and software |'
@echo '| tools for use in geoscience education and research. |'
@echo '| http://www.unidata.ucar.edu |'
@echo '+-------------------------------------------------------------+'
@echo ''
This directory contains a subset of the NetCDF source code.
Specifically, it is the "libsrc" directory of NetCDF, since
VTK only requires the NetCDF library itself and not any
utilities built on top of it.
Specifically, it is the source of the library itself
and not any utilities built on top of it.
The only differences to the vendor's release are:
- The README (as README.netcdf), RELEASE_NOTES, and COPYRIGHT
files from the top level of the NetCDF source code are also
included.
- Tabs aren't allowed by VTK's CVS checkin scripts, so they
- Tabs aren't allowed by VTK's checkin scripts, so they
have been converted to spaces.
- some "index" parameters have been renamed to "index2" to avoid
shadowing "index" BSD function.
The head of the netcdf-release branch corresponds to the
NetCDF 3.6.2 release.
NetCDF 4.1.2 release.
Instructions for updating to a new NetCDF release:
0. Go to a place where you can have some working directories:
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#netcdf cxx
project(netcdf_cxx)
SET(SOURCES
netcdf.cpp
ncvalues.cpp
)
foreach(file ${SOURCES})
set(path_SOURCES ${path_SOURCES} ${PROJECT_SOURCE_DIR}/${file})
endforeach(file ${SOURCES})
set(netcdf_cxx_SOURCES ${path_SOURCES} CACHE INTERNAL "" FORCE)
## This is a automake file, part of Unidata's netCDF package.
# Copyright 2005, see the COPYRIGHT file for more information.
# This file builds the C++ interface.
# $Id: Makefile.am,v 1.54 2010/05/29 18:45:45 dmh Exp $
# Here's what the hand-crafted Makefile did to build cxx:
# c++ -c -g -O2 -I../libsrc -I. -Df2cFortran netcdf.cpp
# c++ -c -g -O2 -I../libsrc -I. -Df2cFortran ncvalues.cpp
# ar cru libnetcdf_c++.a netcdf.o ncvalues.o
# ranlib libnetcdf_c++.a
# c++ -c -g -O2 -I../libsrc -I. -Df2cFortran nctst.cpp
# c++ -o nctst -g -O2 nctst.o libnetcdf_c++.a -L../libsrc -lnetcdf
AM_CPPFLAGS = -I$(top_srcdir)/include
AM_LDFLAGS =
CLEANFILES = nctst_classic.nc nctst_64bit_offset.nc nctst_netcdf4.nc \
nctst_netcdf4_classic.nc nctst_classic.cdl nctst_64bit_offset.cdl \
tst_*.nc
EXTRA_DIST = ref_nctst.cdl ref_nctst_64bit_offset.cdl \
ref_nctst_netcdf4.cdl ref_nctst_netcdf4_classic.cdl run_nc_tests.sh \
run_nc4_tests.sh run_valgrind_tests.sh
# nctst creates a simple data file in each format, then uses ncdump to
# create CDL files, which are compared with some reference files
# shipped with the code. tst_failure is a program that is intended to
# fail.
TESTFILES = nctst$(EXEEXT) tst_failure$(EXEEXT)
tst_many_writes_SOURCES = tst_many_writes.cpp
nctst_SOURCES = nctst.cpp
tst_failure_SOURCES = tst_failure.cpp
XFAIL_TESTS = tst_failure$(EXEEXT)
if USE_NETCDF4
if BUILD_BENCHMARKS
# This is for valgrind script.
TESTS_ENVIRONMENT=USE_NETCDF4=1
# This is a netCDF-4 test.
TESTFILES += tst_many_writes$(EXEEXT)
#tst_many_writes_SOURCES = tst_many_writes.cpp
endif # BUILD_BENCHMARKS
endif # USE_NETCDF4
# Build and run these tests.
check_PROGRAMS = $(TESTFILES)
TESTS = $(TESTFILES)
# This will run a bunch of the test programs with valgrind, the memory
# checking tool. (Valgrind must be present for this to work.)
if USE_VALGRIND_TESTS
TESTS += run_valgrind_tests.sh
endif # USE_VALGRIND_TESTS
# If the utilities have been built, run these extra tests.
if !BUILD_DLL
if BUILD_UTILITIES
TESTS += run_nc_tests.sh
endif
endif
AM_CPPFLAGS += -I${top_srcdir}/liblib
AM_LDFLAGS += ${top_builddir}/liblib/libnetcdf.la @EXTERN_LDFLAGS@
LDADD = $(top_builddir)/cxx/libnetcdf_c++.la ${AM_LDFLAGS}
# These headers will be installed in the users header directory.
include_HEADERS = netcdfcpp.h ncvalues.h netcdf.hh
# This is our output library.
lib_LTLIBRARIES = libnetcdf_c++.la
# Library source.
libnetcdf_c___la_SOURCES = netcdf.cpp ncvalues.cpp
libnetcdf_c___la_LDFLAGS = -version-number 4:1:0
netcdfcpp.h the C++ interface
netcdf.cpp the implementation of the interface, on top of the current
C library interface
nctst.cpp a test program for the interface that creates a netCDF file
and then dumps out its contents in ASCII form to stdout.
This example may also be helpful in understanding how the
interface is intended to be used.
example.c example of C code needed to create a small netCDF file
example.cpp analogous example of C++ code needed to do the same thing
Makefile makefile for building nctst
ncvalues.cpp interface for auxilliary classes of typed arrays needed by
netCDF interface; fairly simple
ncvalues.cpp implementation of auxilliary classes of typed arrays needed by
netCDF interface
README this file
This diff is collapsed.
......@@ -2,7 +2,7 @@
* Copyright 1992, University Corporation for Atmospheric Research
* See netcdf/README file for copying and redistribution conditions.
*
* Purpose: implementation of classes of typed arrays for netCDF
* Purpose: implementation of classes of typed arrays for netCDF
*
* $Header: /upc/share/CVS/netcdf-3/cxx/ncvalues.cpp,v 1.12 2008/03/05 16:45:32 russ Exp $
*********************************************************************/
......@@ -14,16 +14,11 @@
#include "ncvalues.h"
// pragma GCC diagnostic is available since gcc>=4.2
#if defined(__GNUG__) && (__GNUC__>4) || (__GNUC__==4 && __GNUC_MINOR__>=2)
#pragma GCC diagnostic ignored "-Wtype-limits"
#endif
NcValues::NcValues( void ) : the_type(ncNoType), the_number(0)
{}
NcValues::NcValues(NcType type, long Num)
: the_type(type), the_number(Num)
NcValues::NcValues(NcType type, long num)
: the_type(type), the_number(num)
{}
NcValues::~NcValues( void )
......@@ -303,9 +298,9 @@ std::ostream& NcValues_char::print(std::ostream& os) const
os << '"';
long len = the_number;
while (the_values[--len] == '\0') // don't output trailing null bytes
;
;
for(int i = 0; i <= len; i++)
os << the_values[i] ;
os << the_values[i] ;
os << '"';
return os;
......
netcdf ref_nctst {
dimensions: