mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-01-30 16:10:44 +08:00
2afbdbd18f
The XArray implementation that uses Zarr for storage provides a mechanism to simulate named dimensions. It does this by adding a per-variable attribute called _ARRAY_DIMENSIONS. This attribute contains a list of names to be matched against the shape values of the variable. In effect a named dimension is created with the name _ARRAY_DIMENSIONS(i) and length shape(i) for all i in range 0..rank(variable). Both read and write support is provided. This XArray support is only invoked if the mode value of "xarray" is defined. So for example, as in this URL. ```` https://s3.us-west-1.amazonaws.com/bucket/dataset#mode=nczarr,xarray,s3 ```` Note that the "xarray" mode flag also implies mode flag "zarr", so the above is equivalent to this URL. ```` https://s3.us-west-1.amazonaws.com/bucket/dataset#mode=nczarr,zarr,xarray,s3 ```` The primary change to implement this was to unify the handling of dimension references in libnczarr/zsync. A test for this and other pure-zarr features was added as nczarr_test/run_purezarr.sh Other changes: * Make sure distcheck leaves no files around. * Change the special attribute flag DIMSCALEFLAG to HIDDENATTRFLAG to support the xarray attribute. * Annotate the zmap implementations with feature flags such as WRITEONCE (for zip files).
121 lines
3.5 KiB
Makefile
121 lines
3.5 KiB
Makefile
## This is a automake file, part of Unidata's netCDF package.
|
|
# Copyright 2018, 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
|
|
|
|
TESTS_ENVIRONMENT =
|
|
|
|
#TEST_EXTENSIONS = .sh
|
|
|
|
#SH_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver-verbose
|
|
#sh_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver-verbose
|
|
#LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver-verbose
|
|
#TESTS_ENVIRONMENT += export SETX=1;
|
|
|
|
AM_CPPFLAGS += -I${top_srcdir} -I${top_srcdir}/libnczarr
|
|
AM_LDFLAGS += ${top_builddir}/liblib/libnetcdf.la
|
|
LDADD = ${top_builddir}/liblib/libnetcdf.la
|
|
|
|
# Set up the tests; do the .sh first, then .c
|
|
check_PROGRAMS =
|
|
TESTS =
|
|
|
|
check_PROGRAMS += ut_map ut_mapapi ut_json ut_projections ut_chunking
|
|
|
|
commonsrc = ut_util.c ut_test.c ut_includes.h ut_test.h ut_util.h test_nczarr_utils.h
|
|
tstcommonsrc = tst_utils.c tst_utils.h
|
|
|
|
ut_map_SOURCES = ut_map.c ${commonsrc}
|
|
ut_mapapi_SOURCES = ut_mapapi.c ${commonsrc}
|
|
ut_json_SOURCES = ut_json.c ${commonsrc}
|
|
ut_projections_SOURCES = ut_projections.c ${commonsrc}
|
|
ut_chunking_SOURCES = ut_chunking.c ${commonsrc}
|
|
tst_fillonlyz_SOURCES = tst_fillonlyz.c ${tstcommonsrc}
|
|
|
|
check_PROGRAMS += tst_zchunks tst_zchunks2 tst_zchunks3 tst_fillonlyz
|
|
|
|
TESTS += run_ut_map.sh
|
|
TESTS += run_ut_mapapi.sh
|
|
TESTS += run_ut_misc.sh
|
|
TESTS += run_ut_chunk.sh
|
|
|
|
if BUILD_UTILITIES
|
|
|
|
if USE_HDF5
|
|
TESTS += run_nccopyz.sh
|
|
TESTS += run_fillonlyz.sh
|
|
endif
|
|
|
|
TESTS += run_ncgen4.sh
|
|
TESTS += run_purezarr.sh
|
|
|
|
check_PROGRAMS += tst_chunkcases
|
|
tst_chunkcases_SOURCES = tst_chunkcases.c ${tstcommonsrc}
|
|
TESTS += run_chunkcases.sh
|
|
|
|
endif
|
|
|
|
if BUILD_BENCHMARKS
|
|
if BUILD_UTILITIES
|
|
|
|
UTILSRC = bm_utils.c timer_utils.c tst_utils.c
|
|
|
|
bm_chunks3_SOURCES = bm_chunks3.c ${UTILSRC}
|
|
|
|
check_PROGRAMS += bm_chunks3
|
|
|
|
TESTS += run_perf_chunks1.sh
|
|
|
|
endif # BUILD_BENCHMARKS
|
|
|
|
endif #BUILD_UTILITIES
|
|
|
|
# These programs are used by the test cases
|
|
noinst_PROGRAMS = zmapio
|
|
zmapio_SOURCES = zmapio.c
|
|
noinst_PROGRAMS += zhex
|
|
zhex_SOURCES = zhex.c
|
|
noinst_PROGRAMS += zisjson
|
|
zisjson_SOURCES = zisjson.c
|
|
noinst_PROGRAMS += zs3parse
|
|
zs3parse_SOURCES = zs3parse.c
|
|
|
|
if ENABLE_NCZARR_S3
|
|
noinst_PROGRAMS += s3util
|
|
s3util_SOURCES = s3util.c
|
|
TESTS += run_s3_cleanup.sh
|
|
endif
|
|
|
|
# Given a netcdf4|NCZarr file, dump the actual chunk contents.
|
|
# Used to validate nczarr chunking code.
|
|
AM_CPPFLAGS += -I$(top_srcdir)/libnczarr
|
|
noinst_PROGRAMS += ncdumpchunks
|
|
ncdumpchunks_SOURCES = ncdumpchunks.c
|
|
|
|
EXTRA_DIST = CMakeLists.txt \
|
|
run_ut_map.sh run_ut_mapapi.sh run_ut_misc.sh run_ut_chunk.sh run_ncgen4.sh \
|
|
run_nccopyz.sh run_fillonlyz.sh run_chunkcases.sh test_nczarr.sh run_perf_chunks1.sh run_s3_cleanup.sh \
|
|
run_purezarr.sh \
|
|
ref_ut_map_create.cdl ref_ut_map_writedata.cdl ref_ut_map_writemeta2.cdl ref_ut_map_writemeta.cdl \
|
|
ref_ut_map_readmeta.txt ref_ut_map_readmeta2.txt ref_ut_map_search.txt \
|
|
ref_ut_mapapi_create.cdl ref_ut_mapapi_data.cdl ref_ut_mapapi_meta.cdl ref_ut_mapapi_search.txt \
|
|
ref_t_meta_dim1.cdl ref_t_meta_var1.cdl \
|
|
ref_ut_json_build.txt ref_ut_json_parse.txt \
|
|
ref_ut_proj.txt ref_ut_testmap_create.cdl \
|
|
ref_perdimspecs.cdl ref_fillonly.cdl \
|
|
ref_whole.cdl ref_whole.txt \
|
|
ref_skip.cdl ref_skip.txt ref_skipw.cdl \
|
|
ref_rem.cdl ref_rem.dmp ref_ndims.cdl ref_ndims.dmp \
|
|
ref_misc1.cdl ref_misc1.dmp \
|
|
ref_avail1.cdl ref_avail1.dmp ref_avail1.txt \
|
|
ref_xarray.cdl ref_purezarr.cdl ref_purezarr_base.cdl
|
|
|
|
CLEANFILES = ut_*.txt ut*.cdl tmp*.nc tmp*.cdl tmp*.txt tmp*.dmp tmp*.zip tmp*.nc
|
|
|
|
# Remove directories
|
|
clean-local:
|
|
rm -fr tmp*.file results.file results.s3 results.zip
|