netcdf

NetCDF is a set of software libraries and self-describing, machine-independent data formats that support the creation, access, and sharing of array-oriented scientific data.

http://www.unidata.ucar.edu/software/netcdf/#netcdf_faq

http://www.unidata.ucar.edu/software/netcdf/#documentation

User guide: http://www.unidata.ucar.edu/software/netcdf/docs/ http://confluence.rcs.griffith.edu.au:8080/download/attachments/26380275/netcdf.pdf
Installation Guide: http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-install/ http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-install/Building-on-Unix.html#Building-on-Unix

 

Usage

module load NetCDF/4.4.1.1-gnu

 

Installation

 

netcdf 4.4.1.1

module purge
module load library/szip/2.1.1
module load library/zlib/1.2.5
module load library/hdf5/1.8.18-parallel
#module load library/hdf5/1.8.18
#module load library/hdf5/1.8.16-intel
module load gcc/4.9.3

./configure --prefix=/sw/NetCDF/4.4.1.1/4.4.1.1-gnu --enable-netcdf-4 --enable-shared 2>&1 |tee configure_netcdf-gnu.txt
make 2>&1 |tee make_netcdf-gnu.txt
make check 2>&1 |tee make_check_netcdf-gnu.txt
make install 2>&1 |tee make_install_netcdf-gnu.txt

 

netCDF - Version 4.2.1.1

module purge
module load library/zlib/1.2.5
module load gsl/gsl-1.15
module load library/hdf5/1.8.7
module load ics/2013

export LDFLAGS="-L/sw/library/zlib/1.2.5/lib -L/sw/library/hdf5/1.8.7/lib"
export CPPFLAGS="-Dpgifortran -I/sw/library/zlib/1.2.5/include -I/sw/library/hdf5/1.8.7/include"

./configure --prefix=/sw/NetCDF/4.2.1.1/ 2>&1 |tee configure_netcdf-gnu.txt
Check config.log
make 2>&1 |tee make_netcdf-gnu.txt
make check 2>&1 |tee make_check_netcdf-gnu.txt
make install 2>&1 |tee make_install_netcdf-gnu.txt

netcdf gnu version

Usage:

 module display NetCDF/4.1.3-gnu 

installation notes

module purge
module load library/zlib/1.2.5
module load gsl/gsl-1.15
module load library/hdf5/1.8.7

export LDFLAGS="-L/sw/library/zlib/1.2.5/lib -L/sw/library/hdf5/1.8.7/lib"
export CPPFLAGS="-I/sw/library/zlib/1.2.5/include -I/sw/library/hdf5/1.8.7/include"

./configure --prefix=/sw/NetCDF/4.1.3-gnu/ 2>&1 |tee configure_netcdf-gnu.txt
Check config.log
make 2>&1 |tee make_netcdf-gnu.txt
make check 2>&1 |tee make_check_netcdf-gnu.txt
make install 2>&1 |tee make_install_netcdf-gnu.txt

netcdf compiled using intel compilers

prequisites : zlib and HDF5

http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-install/Quick-Instructions.html#Quick-Instructions

zlib

module load library/zlib/1.2.5
cd /sw/library/netcdf/src-netcdf-4.1.3/src-zlib
wget ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4/zlib-1.2.5.tar.gz

Build zlib like this:
 mkdir -p /sw/library/zlib/1.2.5
cd /sw/library/netcdf/src-netcdf-4.1.3/src-zlib/zlib-1.2.5

 ./configure --prefix=/sw/library/zlib/1.2.5  2>&1 |tee configure_log_zlib.txt
 make check install 2>&1 |tee make_check_log_zlib.txt

HDF5

module load library/hdf5/1.8.7
cd /sw/library/netcdf/src-netcdf-4.1.3/src-hdf5
wget ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4/hdf5-1.8.7.tar.gz
tar -zxvf hdf5-1.8.7.tar.gz
module load library/zlib/1.2.5
module list
Currently Loaded Modulefiles:
  1) gsl/1.15intel             2) intel-fc-11/12.0.2.137    3) intel-mpi/4.0.1.007       4) intel-cmkl-11/11.2.137    5) intel-tools-11/11.2.137   6) library/zlib/1.2.5
cd /sw/library/netcdf/src-netcdf-4.1.3/src-hdf5/hdf5-1.8.7
Then you build HDF5, specifying the location of the zlib library:

./configure --with-zlib=/sw/library/zlib/1.2.5 --prefix=/sw/library/hdf5/1.8.7 2>&1 |tee configure_log_hdf5.txt
>>>>>>>>>>>>>>>>>
 SUMMARY OF THE HDF5 CONFIGURATION
            =================================

General Information:
-------------------
                   HDF5 Version: 1.8.7
                  Configured on: Thu Aug 25 11:53:53 EST 2011
                  Configured by: root@admin.default.domain
                 Configure mode: production
                    Host system: x86_64-unknown-linux-gnu
              Uname information: Linux admin.default.domain 2.6.32-131.0.15.el6.x86_64 #1 SMP Tue May 10 15:42:40 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux
                       Byte sex: little-endian
                      Libraries:
             Installation point: /sw/library/hdf5/1.8.7

Compiling Options:
------------------
               Compilation Mode: production
                     C Compiler: /usr/bin/gcc ( gcc (GCC) 4.4.5 20110214 )
                         CFLAGS:
                      H5_CFLAGS: -std=c99 -pedantic -Wall -Wextra -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline -Wno-long-long -Wfloat-equal -Wmissing-format-attribute -Wmissing-noreturn -Wpacked -Wdisabled-optimization -Wformat=2 -Wunreachable-code -Wendif-labels -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch -Wvariadic-macros -Wnonnull -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros -Wunsafe-loop-optimizations -Wc++-compat -Wstrict-overflow -Wlogical-op -Wlarger-than=2048 -Wvla -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat -O3 -fomit-frame-pointer -finline-functions
                      AM_CFLAGS:
                       CPPFLAGS:
                    H5_CPPFLAGS: -D_POSIX_SOURCE   -DNDEBUG -UH5_DEBUG_API
                    AM_CPPFLAGS: -I/sw/library/zlib/1.2.5/include -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_BSD_SOURCE
               Shared C Library: yes
               Static C Library: yes
  Statically Linked Executables: no
                        LDFLAGS:
                     H5_LDFLAGS:
                     AM_LDFLAGS:  -L/sw/library/zlib/1.2.5/lib
                Extra libraries:  -lz -lm
                       Archiver: ar
                         Ranlib: ranlib
              Debugged Packages:
                    API Tracing: no

Languages:
----------
                        Fortran: no

                            C++: no

Features:
---------
                  Parallel HDF5: no
             High Level library: yes
                   Threadsafety: no
            Default API Mapping: v18
 With Deprecated Public Symbols: yes
         I/O filters (external): deflate(zlib)
         I/O filters (internal): shuffle,fletcher32,nbit,scaleoffset
                            MPE: no
                     Direct VFD: no
                        dmalloc: no
Clear file buffers before write: yes
           Using memory checker: no
         Function Stack Tracing: no
                           GPFS: no
      Strict File Format Checks: no
   Optimization Instrumentation: no
       Large File Support (LFS): yes
             H5dump Packed Bits: yes

>>>>>>>>>>>>>>>>

make check install 2>&1 |tee make_check_log_hdf5.txt

netcdf

module load library/hdf5/1.8.7
module load library/zlib/1.2.5
module load library/netcdf/4.1.3
cd /sw/library/netcdf
tar -xvf /data1/netcdf.tar.gz
mv  netcdf-4.1.3 src-netcdf-4.1.3
module load gsl/1.15intel
module load intel-cmkl-11/11.2.137  intel-fc-11/12.0.2.137 intel-mpi/4.0.1.007 intel-tools-11/11.2.137

cd /sw/library/netcdf/src-netcdf-4.1.3

  ./configure --disable-netcdf-4 --prefix=/sw/library/netcdf/4.1.3 2>&1 |tee configure_netcdf.txt

parallel-netcdf

this was not built but could be built if needed

netcdf -mpt version

module purge
module load library/hdf5/1.8.7
module load library/zlib/1.2.5
module load gsl/1.15intel
module load intel-cmkl-11/11.2.137  intel-fc-11/12.0.2.137 intel-tools-11/11.2.137
FC=ifort F90=ifort CC=icc
cd /sw/NetCDF/4.1.3-mpt/src-netcdf-4.1.3
make distclean

./configure --disable-netcdf-4 --prefix=/sw/NetCDF/4.1.3-mpt/ 2>&1 |tee configure_netcdf.txt
make check install 2>&1 |tee make_check_log.txt

cat  buildit.sh

#!/bin/bash
make distclean
CC=icc \
CFLAGS="-O3" \
CXX=icpc \
CXXFLAGS="-O3" \
FC=ifort \
FCFLAGS="-O3" \
F77=ifort \
FFLAGS="-O3" \
CPPFLAGS=-I/sw/library/hdf5/1.8.7/include \
LDFLAGS=-L/sw/library/hdf5/1.8.7/lib \
LIBS=-lhdf5 \
 ./configure --prefix=/sw/NetCDF/4.1.3-mpt/ 2>&1 |tee configure_netcdf.txt
make check install 2>&1 |tee make_check_log.txt