Skip to main content
Texas Tech University

WRF

Introduction

The Weather Research and Forecasting (WRF) Model is a next-generation mesoscale numerical weather prediction system designed for both atmospheric research and operational forecasting applications. WRF features two dynamical cores, a data assimilation system, and a software architecture supporting parallel computation and system extensibility. The model serves a wide range of meteorological applications across scales from tens of meters to thousands of kilometers.

Running WRF in HPCC

Submitting a WRF job to Nocona

There are two WRF modules in Nocona: WRF built against GCC 14.2.0 and WRF built against AOCC 4.2.0.

Create a job submission script with the following content as a reference:

#!/bin/bash
#SBATCH --job-name=wrf_gcc
#SBATCH --partition=nocona
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=128
#SBATCH --output=%x.%j.out
#SBATCH --error=%x.%j.err 

module load gcc/14.2.0 openmpi/5.0.5 wrf/4.5.2-mpi

# Our WRF module is dmpar built (pure MPI only), so keep OpenMP disabled
# by setting the thread to 1
export OMP_NUM_THREADS=1 

# Map 4 MPI ranks per L3 cache for optimal MPI performance
mpirun -np $SLURM_NTASKS --map-by ppr:4:l3cache --bind-to core wrf.exe
#!/bin/bash
#SBATCH --job-name=wrf_gcc
#SBATCH --partition=nocona
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=128
#SBATCH --output=%x.%j.out
#SBATCH --error=%x.%j.err 

module load aocc/4.2.0 openmpi/5.0.5 wrf/4.5.2-mpi

# Our WRF module is dmpar built (pure MPI only), so keep OpenMP disabled
# by setting the thread to 1
export OMP_NUM_THREADS=1 

# Map 4 MPI ranks per L3 cache for optimal MPI performance
mpirun -np $SLURM_NTASKS --map-by ppr:4:l3cache --bind-to core wrf.exe

Submitting a WRF job to Quanah

There are two WRF modules in Quanah: WRF built against GCC 14.2.0 and WRF built against Intel OneAPI 2024.2.1.

Create a job submission script with the following content as a reference:

#!/bin/bash
#SBATCH --job-name=wrf_gcc
#SBATCH --partition=quanah
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=36
#SBATCH --output=%x.%j.out
#SBATCH --error=%x.%j.err 

module load gcc/14.2.0 openmpi/4.1.6 wrf/4.5.2-mpi

# Our WRF module is dmpar built (pure MPI only), so keep OpenMP disabled 
#by setting the thread to 1

export OMP_NUM_THREADS=1

mpirun -np $SLURM_NTASKS wrf.exe
#!/bin/bash
#SBATCH --job-name=wrf_gcc
#SBATCH --partition=quanah
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=36
#SBATCH --output=%x.%j.out
#SBATCH --error=%x.%j.err 

module load intel-oneapi/2024.2.1 oneapi-mpi/2021.13.1 wrf/4.5.2-mpi

# Our WRF module is dmpar built (pure MPI only), so keep OpenMP disabled 
#by setting the thread to 1

export OMP_NUM_THREADS=1

mpirun -np $SLURM_NTASKS wrf.exe

Then submit this job using the sbatch command. Please make sure to edit the following Slurm parameters as needed:

Number of nodes (--nodes): If you want to scale out your job to run across multiple worker nodes.

Number of MPI tasks (--ntasks-per-node): We recommend setting this parameter to the maximum number of available CPU cores per node on each partition.

Wall time (--time): If your job won’t take longer than 10 hours, leave it as it is. Adjust the wall time based on how long you estimate your job will take.


Please contact HPCC support at hpccsupport@ttu.edu if you have any questions.