Error: No compiled WRF code found. Please check that the WRF model has been compile

created at 12-22-2021 views: 48

1. Error prompt

Install wrf, and report this error when compiling wps:

Error: No compiled WRF code found. Please check that the WRF model has been compile.

This error message is caused by WRF not being compiled or the WRF_DIR environment variable is not configured. I have successfully compiled WRF. It seems that the WRF_DIR environment variable is not configured.

2. Solution

2.1 First, cd to the installation directory of WRF to check whether WRF is compiled successfully.
Use the following statement to check whether an exe is generated.

ls -ls main/*.exe

If these 4 exe files can be found, the compilation is successful.

ls -ls main/*.exe
    42698712 Dec 21 23:28 main/ndown.exe
    42583928 Dec 21 23:28 main/real.exe
    42064152 Dec 21 23:28 main/tc.exe
    46735064 Dec 21 23:27 main/wrf.exe

If not, recompile wrf.

./compile em_real >& log.compile

2.2 Configure WRF_DIR environment variable, (point to the installation directory of wrf)

export WRF_DIR=../WRF/   

for example:

export WRF_DIR=/public/home/WRF-4.2/

After configuring the late environment variables, first ./clean

[... wps-4.2]./clean

re-execute the command:

[... wps-4.2]./configure

choose the corresponding number

re-execute the command

./configure

When geogrid.exe, ungrib.exe, and metgrid.exe appear in the wps installation directory, the installation is successful.

created at:12-22-2021
edited at: 12-22-2021: