Install Dependent Software

Required Software

  • Fortran 2008 compiler
  • MPI
  • netCDF

Optional Software

Individual Environments

Ubuntu

$ sudo add-apt-repository ppa:gfd-dennou/ppa
$ sudo apt update
$ sudo apt install gfortran netcdf-bin libopenmpi-dev libnetcdf-dev libnetcdff-dev make
$ sudo apt install grads gphys

You neet to install wgrib and wgrib2 manually.

Debian

Add the following lines to /etc/apt/source/list.

  • stretch
  • deb http://www.gfd-dennou.org/library/cc-env/Linux/debian-dennou stretch main
    deb-src http://www.gfd-dennou.org/library/cc-env/Linux/debian-dennou stretch main
    
  • buster
  • deb http://www.gfd-dennou.org/library/cc-env/Linux/debian-dennou buster main
    deb-src http://www.gfd-dennou.org/library/cc-env/Linux/debian-dennou buster main
    
  • sid
  • deb http://www.gfd-dennou.org/library/cc-env/Linux/debian-dennou sid main
    deb-src http://www.gfd-dennou.org/library/cc-env/Linux/debian-dennou sid main
    

$ sudo apt-get install debian-keyring
$ gpg --keyring /usr/share/keyrings/debian-maintainers.gpg --export -a 891D7E07 | sudo apt-key add -
$ sudo apt update
$ sudo apt install gfortran netcdf-bin libopenmpi-dev libnetcdf-dev libnetcdff-dev make
$ sudo apt install grads gphys

You neet to install wgrib and wgrib2 manually.

Fedora

$ sudo dnf groupinstall "development tools"
$ sudo dnf install openmpi-devel netcdf-devel netcdf-fortran-devel
$ sudo dnf install grads wgrib wgrib2

You neet to install gpview manually.

CentOS

$ sudo yum update
$ sudo yum install epel-release
$ sudo yum groupinstall "development tools"
$ sudo yum install openmpi-devel netcdf-devel netcdf-fortran-devel
$ sudo yum wgrib wgrib2 grads

You neet to install gpview manually.

openSUSE

The following example is for openSUSE 13.2.

$ sudo zypper update
$ sudo zypper ar http://download.opensuse.org/repositories/home:/ocefpaf/openSUSE_13.2/ home_ocefpaf
$ sudo zypper install --type pattern devel_basis
$ sudo zypper install gcc-fortran netcdf-devel netcdf-fortran-devel openmpi-devel
$ sudo zypper install wgrib wgrib2 grads

You neet to install gpview manually.

Mac OS

Dennou Tools for macOS is also helpful.

You need to install Xcode

$ xcode-select --install
$ sudo xcodebuild -license

There are two major package manegers: "HomeBrew" and "macports". We recommend to use HomeBrew, but you can use macports.

  • HomeBrew
  • $ ruby -e "$(curl -fsSL \ https://raw.githubusercontent.com/Homebrew/install/master/install)"
    $ brew install gcc
    
    Check version of gcc. The following example shows that the version is 9.
    $ ls /usr/local/bin/gcc-[0-9]*
    /usr/local/bin/gcc-9
    
    Set environmental variables acoording to the gcc version.
    $ export CC=gcc-9 CXX=g++-9 FC=gfortran-9 F77=gfortran-9
    
    Install some of the softwars with HomeBrew.
    $ brew install open-mpi
    $ brew install szip
    $ brew install wget
    $ brew tap gfd-dennou-club/dennou
    $ brew install dclc
    $ brew install gsl fftw
    $ brew install rbenv ruby-build
    
    Install HDF, NetCDF manually.
    $ wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.1/src/hdf5-1.10.1.tar.gz
    $ tar xvfz hdf5-1.10.1.tar.gz
    $ cd hdf5-1.10.1
    $ CC=$CC FC=$FC F77=$F77 ./configure --prefix=/opt/HDF5 --enable-fortran --with-szlib=/usr/local
    $ make
    $ sudo make install
    
    $ wget https://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-c-4.7.3.tar.gz
    $ tar xvfz netcdf-c-4.7.3.tar.gz
    $ cd netcdf-c-4.7.3
    $ CC=$CC FC=$FC F77=$F77 CPPFLAGS="-I/opt/HDF5/include -I/usr/local/include" LDFLAGS="-L/opt/HDF5/lib -L/usr/local/lib" ./configure --prefix=/opt/NETCDF
    $ make
    $ sudo make install
    
    $ wget https://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-fortran-4.5.2.tar.gz
    $ tar xvfz netcdf-fortran-4.5.2.tar.gz
    $ cd netcdf-fortran-4.5.2
    $ CC=$CC FC=$FC F77=$F77 CPPFLAGS="-I/opt/HDF5/include -I/opt/NETCDF/include -I/usr/local/include" LDFLAGS="-L/opt/HDF5/lib -L/opt/NETCDF/lib -L/usr/local/lib" ./configure --prefix=/opt/NETCDF
    $ make
    $ sudo make install
    
    Install ruby-dcl and gphys with rubygem.
    $ rbenv install 2.6.1
    $ rbenv global 2.6.1
    $ eval "$(rbenv init - bash)"
    $ echo 'eval "$(rbenv init - bash)"' >> $HOME/.bashrc
    $ gem install ruby-dcl
    $ gem install gphys
    $ rbenv rehash
    
  • macports
  • $ sudo port selfupdate
    $ sudo port upgrade outdated
    $ sudo port install gcc49
    $ sudo port install openmpi-gcc49 +threads
    $ sudo port install hdf4 +gcc49 +szip
    $ sudo port install hdf5 +gcc49 +szip
    $ sudo port install netcdf +gcc49 +openmpi +netcdf4 +hdf4
    $ sudo port install netcdf-fortran +gcc49 +openmpi
    $ sudo port install ruby21
    $ sudo port select --set ruby ruby21
    $ sudo port install fftw-3
    $ sudo port install gsl
    $ sudo port install C-DCL6
    $ sudo gem install gphys
    

You neet to install wgrib and wgrib2 manually.

Mannual install of software

GrADS

The web page of GrADS is here.
See hear for required libraries.

$ wget ftp://cola.gmu.edu/grads/2.2/grads-2.2.1-src.tar.gz
$ tar xvfz grads-2.2.1-src.tar.gz
$ cd grads-2.2.1
$ ./configure --prefix={install_dir}
$ make
$ sudo make install

You also need install the GrADS fonts and maps data sets.

$ cd {data_install_dir}
$ wget ftp://cola.gmu.edu/grads/data2.tar.gz
$ tar xvfz data2.tar.gz

You need to set the environment variable GADDIR.

$ GADDIR={data_install_dir}
$ export GADDIR

wgrib

The web page of wgrib is here.

$ wget ftp://ftp.cpc.ncep.noaa.gov/wd51we/wgrib/wgrib.c
$ gcc -o wgrib wgrib.c
$ sudo install wgrib {install_dir}

wgrib2

The web page of wgrib2 is here.
The compiling document is here.

$ wget https://www.ftp.cpc.ncep.noaa.gov/wd51we/wgrib2/wgrib2.tgz
$ tar xvfz wgrib2.tgz
$ cd grib2
$ make CC=gcc FC=gfortran
$ sudo install wgrib2/wgrib2 {install_dir}

gpview (GPhys)

gpview is included in GPhys. The web page of GPhys is here.
GPhys requires C version of GFD Dennou Library.

$ wget https://www.gfd-dennou.org/library/dcl/dcl-7.3.4-C.tar.gz
$ tar xvfz dcl-7.3.4-C.tar.gz
$ ./configure --prefix={install_dir}
$ make
$ sudo make install
$ sudo gem install gphys

Install SCALE

See Users Guide.