156.10. netcdf-c-4.10.1
Library for netCDF, the self-describing array format of climate, ocean and atmosphere data
4.10.1-1 · BSD-3-Clause · 0.9 SBU · 3.2 MiB, 38 files · 41_system, 887 of 1047 · ports/core/sci-libs/netcdf-c
Homepage: https://www.unidata.ucar.edu/software/netcdf/
Why it is in KDOS. The comment above it in script/phases/41_system/packages.d/sci-libs.txt:
netCDF is the array format climate, ocean and atmosphere data ships in, and it is HDF5 underneath. DAP and NCZarr are network clients and are off — on a distro that builds offline they are the half nobody here can reach.
Depends on: cmake, hdf5, zlib, libxml2, zstd, bzip2, curl, openssl, libzip, libaec, c-blosc.
Required by (5): gdal, labplot, nco, qgis, vtk.
Sources: netcdf-c-4.10.1.tar.gz (12.7 MiB). Every step kpkg takes applies to this port.
Install: script/chroot/exec.sh bash -c 'source script/phases/41_system/phase.env && kpkg install netcdf-c'
build.sh:
mkdir -p build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib \
-DNETCDF_ENABLE_DAP=ON -DNETCDF_ENABLE_BYTERANGE=ON \
-DNETCDF_ENABLE_NCZARR=ON -DNETCDF_ENABLE_NCZARR_ZIP=ON \
-DNETCDF_ENABLE_S3=ON -DNETCDF_ENABLE_S3_INTERNAL=ON -DNETCDF_ENABLE_S3_AWS=OFF \
-DNETCDF_ENABLE_LIBXML2=ON \
-DNETCDF_ENABLE_FILTER_SZIP=ON -DNETCDF_ENABLE_FILTER_ZSTD=ON \
-DNETCDF_ENABLE_FILTER_BZ2=ON -DNETCDF_ENABLE_FILTER_BLOSC=ON \
-DNETCDF_ENABLE_HDF4=OFF -DNETCDF_ENABLE_PNETCDF=OFF \
-DNETCDF_PLUGIN_INSTALL=ON -DNETCDF_WITH_PLUGIN_DIR=/usr/lib/hdf5/plugin \
-DNETCDF_ENABLE_TESTS=OFF -DNETCDF_ENABLE_EXAMPLES=OFF \
-DNETCDF_BUILD_UTILITIES=ON
make
make DESTDIR=$PKG install
test -e "$PKG/usr/lib/hdf5/plugin/lib__nch5blosc.so"
Programs: nc-config, nccopy, ncdump, ncgen, ncgen3.
Libraries: libnetcdf.so.
Directories: /usr/lib/cmake/netCDF, /usr/lib/hdf5, /usr/share/licenses/netcdf-c.