a. Install WRF

Now that we’ve built a cluster, let’s install WRF:

We’re going to install WRF on the HeadNode, we’re able to do this as the architecture of the HeadNode instance type, c6a.2xlarge, matches the compute nodes so Spack does the correct microarchitecture detection. In most other cases it makes sense to install on compute nodes.

spack install -j $(nproc) wrf@4.3.3%intel build_type=dm+sm ^intel-oneapi-mpi+external-libfabric

The command spack install -j $(nproc) wrf%intel build_type=dm+sm ^intel-oneapi-mpi+external-libfabric tells Spack to install WRF using the latest version in the Spack recipe. It passes some build flags:

Spack Flag Description
-j $(nproc) Compile with all the cores on the HeadNode.
@4.3.3 Specify version 4.3.3 of WRF.
%intel Specify the Intel Compiler (icc) we installed in e. Install Intel Compilers.
build_type=dm+sm Enable hybrid parallelism MPI + OpenMP.
^intel-oneapi-mpi+external-libfabric Uses Intel MPI which we added in e. Install Intel MPI.

This will take about 3 minutes to install. While that’s installing feel free to advance to the next step and pull down the Conus 12-km model.