Rate This Document
Findability
Accuracy
Completeness
Readability

Compilation and Installation

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. Decompress the WRF installation package.
    tar -vxf WRF-4.2.tar.gz
  3. Go to the directory generated after the decompression.
    cd WRF-4.2
  4. Modify the arch/configure.defaults file.
    1. Open the arch/configure.defaults file.
      vi arch/configure.defaults
    2. 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)

      After performing 4.a, press Esc, type :set nu, and press Enter to display the line number.

    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  5. Modify the phys/module_mp_SBM_polar_radar.F file.
    1. Open the phys/module_mp_SBM_polar_radar.F file.
      vi phys/module_mp_SBM_polar_radar.F
    2. Press i to go to the edit mode and add the following content to line 452 of the file:
      external :: derf

      After performing 5.a, press Esc, type :set nu, and press Enter to display the line number.

    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  6. 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.