WRF

From ACENET
Jump to: navigation, search
Description
WRF (Weather Research and Forecasting), or WRF-ARW (Advanced Research WRF), is a software suite for weather modelling supported by NCAR, the National Center for Atmospheric Research.
Documentation
Notes
WRF-ARW supports several options which must be set at build-time, so rather than supplying a plethora of centrally installed pre-built versions, ACENET encourages users to download and build their own copy. There is detailed documentation available from NCAR for doing this (see links above).

How to build WRF (ARW) on ACENET

Below are the instructions how to build WRF (ARW) and WPS (with GRIB2 support). Lines preceded with the # symbol are comments. The dollar sign $ represents the command line prompt.

# This is the directory where everything gets installed.
#   If you prefer, you can carry on compilation in /tmp instead for speed,
#   and then move files back here.
$ export DIR=$HOME/wrf
$ mkdir -p $DIR

# WRF
$ cd $DIR
$ wget http://www2.mmm.ucar.edu/wrf/src/WRFV3.7.TAR.gz
$ tar xzf WRFV3.7.TAR.gz
$ cd WRFV3/
$ module purge
$ module load intel openmpi/intel netcdf/intel
$ export WRFIO_NCD_LARGE_FILE_SUPPORT=1
$ ./clean -a
$ ./configure
  # Select "dmpar Intel" -> 15
  # Select option 1 (basic or standard static) for nesting
$ ./compile em_real >& log.compile &
# You can check on the progress with the following command: tail -f log.compile. To exit hit Ctrl-C.
# If everything goes fine, you will see "Executables successfully built",
# and you will find four executables in main/
  # wrf.exe
  # real.exe
  # ndown.exe
  # tc.exe
$ cd ../

# WPS
# Three compression libraries are required for GRIB Edition 2 support, that is the 'ungrib' program of WPS.
# Two libraries ZLIB and PNG are already present on the system. Install only JASPER.
# JASPER
$ wget http://www2.mmm.ucar.edu/wrf/OnLineTutorial/compile_tutorial/tar_files/jasper-1.900.1.tar.gz
$ tar xzf jasper-1.900.1.tar.gz
$ cd jasper-1.900.1/
$ ./configure --prefix=$DIR/grib2 CC=gcc CXX=g++ F77=gfortran
$ make clean && make && make install
$ cd ../
  # You can delete JASPER source files afterwards like so: rm -rf jasper-1.900.1.tar.gz jasper-1.900.1/ ._jasper-1.900.1

$ wget http://www2.mmm.ucar.edu/wrf/src/WPSV3.7.TAR.gz
$ tar xzf WPSV3.7.TAR.gz
$ cd WPS/
$ export JASPERLIB=$DIR/grib2/lib
$ export JASPERINC=$DIR/grib2/include
$ ./clean -a
$ ./configure
  # Select "serial Intel" -> 17
$ ./compile >& log.compile &
# You can check on the progress with the following command: tail -f log.compile. To exit hit Ctrl-C.
# When done, you will find three new executables:
  # geogrid.exe
  # metgrid.exe
  # ungrib.exe

Submission script example

Here is an example of a submission script:

#$ -cwd
#$ -pe ompi* 8
#$ -l h_rt=48:0:0
#$ -l h_vmem=2G,h_stack=500M
#$ -j y

module purge
module load intel openmpi/intel netcdf/intel
mpirun wrf.exe