tar -vxf WRF-4.2.tar.gz
cd WRF-4.2
vi arch/configure.defaults
################################################## ######### #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)
执行4.a之后,按“Esc”键,输入“:set nu”,按“Enter”即可显示出行号。
vi phys/module_mp_SBM_polar_radar.F
external :: derf
执行5.a之后,按“Esc”键,输入“:set nu”,按“Enter”即可显示出行号。
export WRFIO_NCD_LARGE_FILE_SUPPORT=1 export CPPFLAGS="-I$HDF5/include -I$PNETCDF/include -I$NETCDF/include" export LDFLAGS="-L$HDF5/lib -L$PNETCDF/lib -L$NETCDF/lib -L$ZLIB/lib -lnetcdf -lnetcdff -lpnetcdf -lhdf5_hl -lhdf5 -lz"
yum install time
echo 4 | ./configure sed -i "s%-lz% -L/path/to/ZLIB/lib -lz%g" configure.wrf ./compile -j 16 em_real 2>&1 | tee -a compile.log
当命令行出现如下图所示内容时,表示WRF程序安装成功。