Build instructions: HDF5 and NetCDF4 ------------------------------------ This file documents the steps to take for building the NetCDF4 C and Fortran libraries. As NetCDF4 relies on HDF5, you need to build all three sets of libraries. The process has been made as simple as possible, but unfortunately some manual actions are left. Note on versions ---------------- The instructions below as well as the overall build script assume the following versions for the NetCDF4 and HDF5 libraries: NetCDF4-C: 4.3.2 NetCDF4-Fortran: 4.4.1 HDF5: 1.8.16 Other versions, especially newer versions, will most probably work as well, but sofar they have not been tested. Prequisites ----------- LINUX AND WINDOWS: CMake: You need to have CMake 3.1 or later installed. You PATH variable needs to include the bin directory for CMake. CMake can be found at http://www.cmake.org and can be built with a simple procedure or you can get the binaries for your platform. For Windows you can download an installer or a zip file at https://cmake.org/download For Linux you can download a compressed tarball at https://cmake.org/download as well. Note: For Cygwin a separate installation exists - see the Cygwin setup program to download and install the Cygwin-specific version. LINUX: NetCDF-C 4.3.2: netcdf-4.3.2.tar.gz (http://www.unidata.ucar.edu) NetCDF-Fortran 4.4.1: netcdf-fortran-4.4.1.tar.gz HDF5.1.8.16: CMake-hdf5-1.8.16.tar.gz (http://www.hdfgroup.org) WINDOWS: NetCDF-C 4.3.2: netcdf-4.3.2.zip (http://www.unidata.ucar.edu) NetCDF-Fortran 4.4.1: netcdf-fortran-4.4.1.zip HDF5.1.8.16: CMake-hdf5-1.8.16.zip (http://www.hdfgroup.org) DOWNLOADS: NetCDF C: Windows: https://github.com/Unidata/netcdf-c/archive/v4.3.2.zip Linux: https://github.com/Unidata/netcdf-c/archive/v4.3.2.tar.gz NetCDF Fortran: Windows: https://github.com/Unidata/netcdf-fortran/archive/v4.4.1.zip Linux: https://github.com/Unidata/netcdf-fortran/archive/v4.4.1.tar.gz NetCDF Fortran: HDF5: Windows: http://www.hdfgroup.org/ftp/HDF5/current/src/CMake-hdf5-1.8.16.zip Linux: http://www.hdfgroup.org/ftp/HDF5/current/src/CMake-hdf5-1.8.16.tar.gz Steps ----- LINUX: - Make sure your path includes the C and Fortran compilers of your choice. - Create a separate directory for building everything - Copy the tar.gz files and the file buildnc.sh into that directory - Run buildnc.sh This will take a while, but the result is a complete set of libraries and module files, found in the subdirectory "lib". WINDOWS: - Start a DOS window with the right settings for the Intel Fortran compiler and MicroSoft Visual Studio. - MS Visual Studio can be either VS2012 or VS2013, 32 or 64 bits. - Create a build directory and copy the zip files into it as well as the files "buildnc.bat" and "netcdf-config.cmake.corrected". - Unpack the zip files Note: this is one manual step to do - Run the batch file "buildnc.bat" This will take a while, but the result is a complete set of libraries and module files, found in the subdirectory "lib". FINAL REMARK: Refer to either the subdirectory lib in this build directory or copy the files to a more convenient place. You need the lib subdirectory.