Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

Full WRF and WPS Installation Example (Intel)

kwerner

Administrator
Staff member
Add something similar to .bashrc
*Note you will need to modify the paths for your specific environment.
*Note this includes a setting to the path for “DIR.” This is just for the sake of simplifying installation.


export PATH=.:/full-path-to-netcdf-directory/netcdf/bin:/full-path-to-libs-directory/bin:${PATH}
export LD_LIBRARY_PATH=/full-path-to-libs-directory/libs/lib:/full-path-to-libs-directory/libs/netcdf/lib:/full-path-to-libs-directory/libs/grib2/lib
export JASPERLIB=/full-path-to-libs-directory/libs/grib2/lib
export JASPERINC=/full-path-to-libs-directory/libs/grib2/include
export NETCDF=/full-path-to-netcdf-directory/netcdf

export DIR=/full-path-to-libs-directory/libs
export CC=icc
export CXX=icpc
export CFLAGS='-O3 -xHost -ip -no-prec-div -static-intel'
export CXXFLAGS='-O3 -xHost -ip -no-prec-div -static-intel'
export F77=ifort
export FC=ifort
export F90=ifort
export FFLAGS='-O3 -xHost -ip -no-prec-div -static-intel'
export CPP='icc -E'
export CXXCPP='icpc -E'
export LDFLAGS="-L/full-path-to-libs-directory/libs/lib -L/full-path-to-libs-directory/libs/netcdf/lib -L/full-path-to-libs-directory/libs/grib2/lib"
export CPPFLAGS="-I/full-path-to-libs-directory/libs/include -I/full-path-to-libs-directory/libs/netcdf/include -I/full-path-to-libs-directory/libs/grib2/include"

Source the .bashrc file
Code:
source .bashrc

Make a directory to install all the libraries.
Code:
mkdir libs

mpich

Code:
wget https://www2.mmm.ucar.edu/wrf/OnLineTutorial/compile_tutorial/tar_files/mpich-3.0.4.tar.gz
tar -xf mpich-3.0.4.tar.gz
cd mpich-3.0.4
./configure --prefix=$DIR
make 2>&1
make install
cd ..
rm -rf mpich*


zlib

Code:
wget https://www2.mmm.ucar.edu/people/duda/files/mpas/sources/zlib-1.2.11.tar.gz
tar xzvf zlib-1.2.11.tar.gz
cd zlib-1.2.11
./configure --prefix=$DIR/grib2
make -j 4
make install
cd ..
rm -rf zlib*


HDF5

Code:
wget https://www2.mmm.ucar.edu/people/duda/files/mpas/sources/hdf5-1.10.5.tar.bz2
tar -xf hdf5-1.10.5.tar.bz2
cd hdf5-1.10.5
./configure --prefix=$DIR --with-zlib=$DIR/grib2 --enable-fortran --enable-shared
make -j 4
make install
cd ..
rm -rf hdf5*


NetCDF-c

Code:
wget https://github.com/Unidata/netcdf-c/archive/v4.7.2.tar.gz
tar -xf v4.7.2.tar.gz
cd netcdf-c-4.7.2
./configure --enable-shared --enable-netcdf4 --disable-filter-testing --disable-dap --prefix=$DIR/netcdf
make -j 4
make install
cd ..
rm -rf v4.7.2.tar.gz netcdf-c*


netcdf-fortran

Code:
export LIBS=”-lnetcdf -lhdf5_hl -lhdf5 -lz”
wget https://github.com/Unidata/netcdf-fortran/archive/v4.5.2.tar.gz
tar -xf v4.5.2.tar.gz
cd netcdf-fortran-4.5.2
./configure --enable-shared --prefix=$DIR/netcdf
make -j 4
make install
cd ..
rm -rf netcdf-fortran* v4.5.2.tar.gz


libpng

Code:
wget https://www2.mmm.ucar.edu/wrf/OnLineTutorial/compile_tutorial/tar_files/libpng-1.2.50.tar.gz
tar xzvf libpng-1.2.50.tar.gz
cd libpng-1.2.50
./configure --prefix=$DIR/grib2
make -j 4
make install
cd ..
rm -rf libpng*

jasper

Code:
wget https://www2.mmm.ucar.edu/wrf/OnLineTutorial/compile_tutorial/tar_files/jasper-1.900.1.tar.gz
tar xzvf jasper-1.900.1.tar.gz
cd jasper-1.900.1
./configure --prefix=$DIR/grib2
make -j 4
make install
cd ..
rm -rf jasper*

WRF

Code:
git clone --recurse-submodule https://github.com/wrf-model/WRF.git
cd WRF
./configure (choose options 15 and 1)
./compile em_real -j 4 >& log.compile

WPS

Code:
git clone https://github.com/wrf-model/WPS.git
cd WPS
export WRF_DIR=path-to-WRF-top-level-directory/WRF
./configure (choose option 17)
./compile >& log.compile
 
Top