Computational Science Community Wiki

WPS compilation on ARCHER

WPS 3.4.1 compiling using the CRAY compiler

The module options needed are:

module load cray-netcdf
module load jasper
module load libpng

And we export the netcdf directory settings (I think this is needed, not sure...):

export NETCDF=$NETCDF_DIR

Ensure that (in the directory containing the WPS compile-directory) you've linked WRFV3 to a directory in which you've compiled WRF (doesn't need to be WRFChem) with the CRAY compiler.

Configure (using ./configure) selecting option 30 (Cray XT/XE Linux x86_64 (Opteron), Cray CCE compiler 7.0 or higher  (dmpar_NO_GRIB2)).

Compile (using ./compile).

WPS 3.4.1 compiling using the Intel compiler on the login node with the grib1 or grib2 options enabled

Before starting, I'd strongly recommend reading the WPS instructions before moaning about WPS compilation and running: http://www2.mmm.ucar.edu/wrf/users/docs/user_guide_V3/users_guide_chap3.htm#_How_to_Run

The following are "WPS for numpty (i.e. me)" instructions

1. copy the downloaded tarball to your nerc space on ARCHER and untar e.g.

scp WPSV3.4.1.TAR.gz user@login.archer.ac.uk:/nerc/n02/n02/user/TMPDIR/WPS
tar zxvf WRFV3.4.1.TAR.gz

note that the compute nodes cannot access the /nerc/ space, so compilation should be done on the login node (or you will have to copy the *.exe executables to the /work/ space for running WPS once they are compiled).

2. the Intel compiler on Cray architecture option is not available until later versions so copy the following text to the end of the WPS/arch/configure_defaults file:

########################################################################################################################
#ARCH   Cray XC CLE/Linux x86_64, Intel compiler  # serial serial_NO_GRIB2 dmpar dmpar_NO_GRIB2
#
COMPRESSION_LIBS    = CONFIGURE_COMP_L
COMPRESSION_INC     = CONFIGURE_COMP_I
FDEFS               = CONFIGURE_FDEFS
SFC                 = ftn
SCC                 = cc
DM_FC               = $(SFC)
DM_CC               = $(SCC)
FC                  = CONFIGURE_FC
CC                  = CONFIGURE_CC
LD                  = $(FC)
FFLAGS              = -FR -convert big_endian
F77FLAGS            = -FI -convert big_endian
FCSUFFIX            =
FNGFLAGS            = $(FFLAGS)
LDFLAGS             =
CFLAGS              =
CPP                 = /lib/cpp -C -P -traditional
CPPFLAGS            = -D_UNDERSCORE -DBYTESWAP -DLINUX -DIO_NETCDF -DIO_BINARY -DIO_GRIB1 -DBIT32 CONFIGURE_MPI
ARFLAGS             =
CC_TOOLS            =

load the following modules and environment paths:

module swap PrgEnv-cray PrgEnv-intel
module load cray-netcdf
module load jasper
module load zlib
module load libpng
export JASPERLIB=$JASPER_DIR/lib
export JASPERINC=$JASPER_DIR/include
export JASPERLIB=$JASPER_DIR/lib
export JASPERINC=$JASPER_DIR/include
export NETCDF=$NETCDF_DIR
export WRFIO_NCD_LARGE_FILE_SUPPORT=1
export FLEX_LIB_DIR=/usr/lib64

3. in the WPS directory, configure WPS:

./configure

selecting the Intel compiler on Cray option that is now available, with grib2 support if you want to use GFS or FNL grib2 data

4. edit the configure.wps file that has been generated in the WPS directory to ensure that it points to the Intel-compiled WRF or WRF-Chem directory. By default it is ../WRFV3

5. in the WPS directory, compile WPS, writing the compilation log file:

./compile 2>&1 | tee wps_compile_log.txt

WPS 3.8.1 compiling using the Intel compiler on the login node with the grib1 or grib2 options enabled

This is the same as for WPS 3.4.1 (see above section). The only difference is that step 2 is unneeded, as the Intel configuration is already available. Option 40 (CRAY architecture, Intel compiler, dmpar, no grib2) works okay. Other compile options have not been checked.

Running WPS

Our guide to running WPS is available here