nc4.rst 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. :orphan:
  2. .. _nc4:
  3. Installing required NetCDF-4 Native libraries
  4. =============================================
  5. In order to write NetCDF-4 files, you must have the NetCDF-4 C library (version 4.3.1 or above) available on your system, along with all supporting libraries (HDF5, zlib, etc).
  6. The following sections provide quick reference installation instructions.
  7. For more detailed info, please take a look at the `NetCDF-4 C Library Loading <https://docs.unidata.ucar.edu/netcdf-java/current/userguide/netcdf4_c_library.html>`_ page.
  8. Windows install
  9. ---------------
  10. #. Download the latest NetCDF4 installer from the `NetCDF-C Windows Libraries <https://www.unidata.ucar.edu/software/netcdf/docs/winbin.html>`_ page.
  11. #. Install the executable
  12. #. Make sure to add the *bin* folder of the package you have extracted, to the ``PATH`` environment variable.
  13. Linux install
  14. -------------
  15. #. Download the latest required dependencies (SZIP, ZLIB, HDF5) from the `NetCDF-4 libraries section <ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4/>`_.
  16. As an instance:
  17. .. code-block:: bash
  18. wget ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4/hdf5-1.8.13.tar.gz
  19. wget ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4/zlib-1.2.8.tar.gz
  20. #. Download the latest NetCDF-C source code from `here <https://github.com/Unidata/netcdf-c/releases/>`_.
  21. As an instance:
  22. .. code-block:: bash
  23. wget https://github.com/Unidata/netcdf-c/archive/v4.3.3.1.tar.gz
  24. #. Build and install the required dependencies (The following instructions assume that you will install all NetCDF4 C libs on ``/work/libs/nc4libs``, as an instance).
  25. #. ZLIB
  26. .. code-block:: bash
  27. ./configure --prefix=/work/libs/nc4libs
  28. make check install
  29. #. HDF5
  30. .. code-block:: bash
  31. ./configure --with-zlib=/work/libs/nc4libs --prefix=/work/libs/nc4libs --enable-threadsafe --with-pthread=/DIR/TO/PTHREAD
  32. make check install
  33. #. Build the NetCDF C Library.
  34. .. code-block:: bash
  35. CPPFLAGS=-I/work/libs/nc4libs/include LDFLAGS=-L/work/libs/nc4libs/lib ./configure --prefix=/work/libs/nc4libs
  36. make check install
  37. #. Make sure to add the *lib* folder of the package you have extracted, to the ``PATH`` environment variable.
  38. GeoServer startup checks
  39. ------------------------
  40. If everything has been properly configured, you may notice a similar log message during GeoServer startup:
  41. | ``NetCDF-4 C library loaded (jna_path='null', libname='netcdf').``
  42. | ``Netcdf nc_inq_libvers='4.3.1 of Jan 16 2014 15:04:00 $' isProtected=true``
  43. |
  44. In case the native libraries haven't been properly configured you will see a message like this, instead:
  45. ``NetCDF-4 C library not present (jna_path='null', libname='netcdf').``
  46. Requesting a NetCDF4-Classic output file as WCS2.0 output
  47. =========================================================
  48. Specifying application/x-netcdf4 as Format, will return a NetCDF4-Classic output files, provided that the underlying libraries are available.