Compilation and Installation
Procedure
- Use PuTTY to log in to the server as the root user.
- Decompress the WRF installation package.
tar -vxf WRF-4.2.tar.gz
- Go to the directory generated after the decompression.
cd WRF-4.2
- Modify the arch/configure.defaults file.
- Open the arch/configure.defaults file.
vi arch/configure.defaults
- Press i to enter the edit mode and add the following content to the end of line 1978:
################################################## ######### #ARCH Linux aarch64,clang HYPERMPI#serial smpar dmpar dm+sm DESCRIPTION = CLANG ($SFC/$SCC) DMPARALLEL = 1 OMPCPP = -D_OPENMP OMP = -fopenmp OMPCC = -fopenmp SFC = flang SCC = clang CCOMP = clang DM_FC = mpif90 -f90=$(SFC) DM_CC = mpicc -cc=$(SCC) -DMPI2_SUPPORT FC = CONFIGURE_FC CC = CONFIGURE_CC LD = $(FC) RWORDSIZE = CONFIGURE_RWORDSIZE PROMOTION = #-fdefault-real-8 ARCH_LOCAL = -DNONSTANDARD_SYSTEM_SUBR -DWRF_USE_CLM CFLAGS_LOCAL = -mcpu=native -w -O3 -c -march=armv8.2-a LDFLAGS_LOCAL = CPLUSPLUSLIB = ESMF_LDFLAG = $(CPLUSPLUSLIB) FCOPTIM = -O3 -funroll-loops -march=armv8.2-a FCREDUCEDOPT = $(FCOPTIM) FCNOOPT = -O0 FCDEBUG = -g # -fbacktrace -ggdb-fcheck=bounds,do,mem,pointer -ffpe-trap=invalid,zero,overflow FORMAT_FIXED = -ffixed-form FORMAT_FREE = -ffree-form -ffree-line-length-0 FCSUFFIX = BYTESWAPIO = -fconvert=big-endian FCBASEOPTS_NO_G = -w $(FORMAT_FREE) $(BYTESWAPIO) FCBASEOPTS = -mcpu=native $(OMP) $(FCBASEOPTS_NO_G) MODULE_SRCH_FLAG = TRADFLAG = -traditional CPP = /lib/cpp -P AR = ar ARFLAGS = ru M4 = m4 -G RANLIB = ranlib RLFLAGS = CC_TOOLS = $(SCC)
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the arch/configure.defaults file.
- Modify the phys/module_mp_SBM_polar_radar.F file.
- Perform the compilation and installation.
echo 4 | ./configure ./compile em_real 2>&1 | tee -a compile.log
If the following information is displayed, the WRF program is installed successfully.

Parent topic: WRF 4.2 Porting Guide (openEuler 21.03)
