2018-12-07 05:29:57 +08:00
|
|
|
# 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, 2017, 2018
|
|
|
|
# University Corporation for Atmospheric Research/Unidata.
|
|
|
|
|
|
|
|
# See netcdf-c/COPYRIGHT file for more info.
|
2020-11-20 08:01:04 +08:00
|
|
|
SET(libdispatch_SOURCES dparallel.c dcopy.c dfile.c ddim.c datt.c dattinq.c dattput.c dattget.c derror.c dvar.c dvarget.c dvarput.c dvarinq.c ddispatch.c nclog.c dstring.c dutf8.c dinternal.c doffsets.c ncuri.c nclist.c ncbytes.c nchashmap.c nctime.c nc.c nclistmgr.c utf8proc.h utf8proc.c dpathmgr.c dutil.c drc.c dauth.c dreadonly.c dnotnc4.c dnotnc3.c daux.c dinfermodel.c
|
2021-11-02 12:37:05 +08:00
|
|
|
dcrc32.c dcrc32.h dcrc64.c ncexhash.c ncxcache.c ncjson.c ds3util.c)
|
2012-07-18 04:50:43 +08:00
|
|
|
|
2019-07-21 03:59:40 +08:00
|
|
|
# Netcdf-4 only functions. Must be defined even if not used
|
2020-09-28 02:43:46 +08:00
|
|
|
SET(libdispatch_SOURCES ${libdispatch_SOURCES} dgroup.c dvlen.c dcompound.c dtype.c denum.c dopaque.c dfilter.c)
|
2012-07-18 04:50:43 +08:00
|
|
|
|
|
|
|
IF(BUILD_V2)
|
2014-04-22 01:15:33 +08:00
|
|
|
SET(libdispatch_SOURCES ${libdispatch_SOURCES} dv2i.c)
|
2017-02-18 06:38:55 +08:00
|
|
|
ENDIF(BUILD_V2)
|
2012-07-18 04:50:43 +08:00
|
|
|
|
2019-02-25 07:54:13 +08:00
|
|
|
IF(ENABLE_BYTERANGE)
|
Provide byte-range reading of remote datasets
re: issue https://github.com/Unidata/netcdf-c/issues/1251
Assume that you have the URL to a remote dataset
which is a normal netcdf-3 or netcdf-4 file.
This PR allows the netcdf-c to read that dataset's
contents as a netcdf file using HTTP byte ranges
if the remote server supports byte-range access.
Originally, this PR was set up to access Amazon S3 objects,
but it can also access other remote datasets such as those
provided by a Thredds server via the HTTPServer access protocol.
It may also work for other kinds of servers.
Note that this is not intended as a true production
capability because, as is known, this kind of access to
can be quite slow. In addition, the byte-range IO drivers
do not currently do any sort of optimization or caching.
An additional goal here is to gain some experience with
the Amazon S3 REST protocol.
This architecture and its use documented in
the file docs/byterange.dox.
There are currently two test cases:
1. nc_test/tst_s3raw.c - this does a simple open, check format, close cycle
for a remote netcdf-3 file and a remote netcdf-4 file.
2. nc_test/test_s3raw.sh - this uses ncdump to investigate some remote
datasets.
This PR also incorporates significantly changed model inference code
(see the superceded PR https://github.com/Unidata/netcdf-c/pull/1259).
1. It centralizes the code that infers the dispatcher.
2. It adds support for byte-range URLs
Other changes:
1. NC_HDF5_finalize was not being properly called by nc_finalize().
2. Fix minor bug in ncgen3.l
3. fix memory leak in nc4info.c
4. add code to walk the .daprc triples and to replace protocol=
fragment tag with a more general mode= tag.
Final Note:
Th inference code is still way too complicated. We need to move
to the validfile() model used by netcdf Java, where each
dispatcher is asked if it can process the file. This decentralizes
the inference code. This will be done after all the major new
dispatchers (PIO, Zarr, etc) have been implemented.
2019-01-02 09:27:36 +08:00
|
|
|
SET(libdispatch_SOURCES ${libdispatch_SOURCES} dhttp.c)
|
2019-02-25 07:54:13 +08:00
|
|
|
ENDIF(ENABLE_BYTERANGE)
|
Provide byte-range reading of remote datasets
re: issue https://github.com/Unidata/netcdf-c/issues/1251
Assume that you have the URL to a remote dataset
which is a normal netcdf-3 or netcdf-4 file.
This PR allows the netcdf-c to read that dataset's
contents as a netcdf file using HTTP byte ranges
if the remote server supports byte-range access.
Originally, this PR was set up to access Amazon S3 objects,
but it can also access other remote datasets such as those
provided by a Thredds server via the HTTPServer access protocol.
It may also work for other kinds of servers.
Note that this is not intended as a true production
capability because, as is known, this kind of access to
can be quite slow. In addition, the byte-range IO drivers
do not currently do any sort of optimization or caching.
An additional goal here is to gain some experience with
the Amazon S3 REST protocol.
This architecture and its use documented in
the file docs/byterange.dox.
There are currently two test cases:
1. nc_test/tst_s3raw.c - this does a simple open, check format, close cycle
for a remote netcdf-3 file and a remote netcdf-4 file.
2. nc_test/test_s3raw.sh - this uses ncdump to investigate some remote
datasets.
This PR also incorporates significantly changed model inference code
(see the superceded PR https://github.com/Unidata/netcdf-c/pull/1259).
1. It centralizes the code that infers the dispatcher.
2. It adds support for byte-range URLs
Other changes:
1. NC_HDF5_finalize was not being properly called by nc_finalize().
2. Fix minor bug in ncgen3.l
3. fix memory leak in nc4info.c
4. add code to walk the .daprc triples and to replace protocol=
fragment tag with a more general mode= tag.
Final Note:
Th inference code is still way too complicated. We need to move
to the validfile() model used by netcdf Java, where each
dispatcher is asked if it can process the file. This decentralizes
the inference code. This will be done after all the major new
dispatchers (PIO, Zarr, etc) have been implemented.
2019-01-02 09:27:36 +08:00
|
|
|
|
2021-10-30 10:06:37 +08:00
|
|
|
IF(ENABLE_S3_SDK)
|
|
|
|
SET(libdispatch_SOURCES ${libdispatch_SOURCES} ncs3sdk.cpp awsincludes.h)
|
|
|
|
ENDIF(ENABLE_S3_SDK)
|
|
|
|
|
2017-02-18 06:38:55 +08:00
|
|
|
add_library(dispatch OBJECT ${libdispatch_SOURCES})
|
2020-01-03 01:57:59 +08:00
|
|
|
IF(MPI_C_INCLUDE_PATH)
|
|
|
|
target_include_directories(dispatch PUBLIC ${MPI_C_INCLUDE_PATH})
|
|
|
|
ENDIF(MPI_C_INCLUDE_PATH)
|
|
|
|
|
|
|
|
IF(MPI_C_LIBRARIES)
|
|
|
|
target_link_libraries(dispatch PUBLIC ${MPI_C_LIBRARIES})
|
|
|
|
ENDIF(MPI_C_LIBRARIES)
|
2012-07-18 04:50:43 +08:00
|
|
|
|
2021-10-30 10:06:37 +08:00
|
|
|
IF(ENABLE_S3_SDK)
|
|
|
|
target_include_directories(dispatch PUBLIC ${AWSSDK_INCLUDE_DIRS})
|
|
|
|
IF(NOT MSVC)
|
|
|
|
target_compile_features(dispatch PUBLIC cxx_std_11)
|
|
|
|
ENDIF()
|
|
|
|
ENDIF()
|
|
|
|
|
2013-06-04 00:42:04 +08:00
|
|
|
FILE(GLOB CUR_EXTRA_DIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h ${CMAKE_CURRENT_SOURCE_DIR}/*.c)
|
|
|
|
SET(CUR_EXTRA_DIST ${CUR_EXTRA_DIST} CMakeLists.txt Makefile.am)
|
2016-04-07 10:38:51 +08:00
|
|
|
ADD_EXTRA_DIST("${CUR_EXTRA_DIST}")
|