Compiling WRF for Real Data Cases



On some computers, it is necessary to set the following environment variable before compiling (if you are unsure, go ahead and set it, as it does not hurt to do so):
setenv WRF_EM_CORE 1


Type:

./compile

You will be given the following choices:

Usage:

compile [-d] [-j n] wrf      compile wrf in run dir (NOTE: no real.exe, ndown.exe, or ideal.exe generated)

or choose a test case (see README_test_cases for details) :
compile em_b_wave
compile em_convrad
compile em_esmf_exp
compile em_fire
compile em_grav2d_x
compile em_heldsuarez
compile em_hill2d_x
compile em_les
compile em_quarter_ss
compile em_real
compile em_scm_xy
compile em_seabreeze2d_x
compile em_squall2d_x
compile em_squall2d_y
compile em_tropical_cyclone
compile exp_real
compile nmm_real
compile nmm_tropical_cyclone

compile -d : to compile without optimization and with debugging
compile -j n : parallel make using n tasks if supported (default 2)
compile -h : help message

Since we are compiling a WRF ARW real data case, we are going to choose the "em_real" option (make sure to send the standard error and output to a log file as indicated below with the use of ">&". If anything goes wrong with the compilation, this file will be necessary for troubleshooting):

./compile em_real >& log.compile

If your compilation was successful, you should see the following executables in the WRF/main/ directory:

ndown.exe: Used for one-way nesting
tc.exe: TC Bogusing for adding or removing a tropical cyclone
real.exe: WRF initialization for eal data cases
wrf.exe: WRF model integration

Make sure the executables are not of zero–size!

These executables will be linked from the main/ directory to the directories run/ and test/em_real/. You can choose to run the code from either of these directories.






The executables were not created

Check the log.compile file for any errors. The file is large, so you will want to do a search for the word 'Error' (with a capital 'E'. We are not concerned about errors with a lower–case 'e'). Click here to see an example compile log that was created on the NCAR Cheyenne supercomputer for a build with ifort. This file will vary among platforms, compilers, and versions.
Most common errors are:
  • Incorrect netCDF version (e.g., netCDF is compiled with PGI, but you are compiling the code with Intel compilers).
  • Required libraries are not installed, or not installed correctly.
  • Paths to libraries not found.
Typically when you are unable to compile WRF, it is related to a problem with your environment, compiler(s), and/or libraries. We have a webpage that will walk you through the steps of verifying that your environment is set up properly, testing that each of the libraries are built correctly, and are compatible with your compilers. You can find that web page here. If you are working on a large cluster, you may need to seek help from a systems administrator from your institute to get the environment set up correctly.

If you need to correct a problem in the configure.wrf file, be sure to:
./clean -a
./configure
then make the change to configure.wrf, and save it, before attempting to compile the code again.




If you need to obtain help or support regarding a compiling problem

Repeat what you have done one more time:
./clean -a
./configure
./compile em_real >& log.compile
Then post a topic to the WRF/MPAS Support Forum, and be sure to attach the log.compile file, along with your configure.wrf file, and computer/compiler information.




If WRF was successfully compiled, you are now ready to compile WPS.





WPS Code