Compiling WRF for Idealized Cases



On some computers (e.g., some Intel machines), it is necessary to set the following environment variable before compiling:
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 compile without optimization and with debugging
compile -j n parallel make using n tasks if supported (default 2)
compile -h help message

Pick the idealized case you want to run (e.g., the baroclinic wave case), and compile the code for this case:

./compile em_b_wave >& log.compile

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

WRF/main/ideal.exe: WRF initialization for idealized data cases
WRF/main/wrf.exe: WRF model integration

These executables will be linked from the WRF/main/ directory, to the directories run/ and test/em_your_case (e.g., for the baroclinic wave case, the executables will be linked to the directory test/em_b_wave, which is where you will be running the code).



If you change cases, remember that recompiling a new case will overwrite the 'ideal.exe' executable that you are now using. If you would like to keep the old 'ideal.exe,' move or rename it. Since 'ideal.exe' is linked from the WRF/main/ directory, into the directory you are using (e.g., test/em_b_wave), you can simply remove the link and copy 'ideal.exe' into the test/case/ directory, so that it does not get overwritten when compiling a new case.






The executables were not created

Check the log.compile file for any errors. The file is large, so you may want to do a search for the word 'Error' (with a capital 'E'. We are not concerned about errors with a lower–case 'e').
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 et 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 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 report a problem to wrfhelp (wrfhelp at ucar dot edu)

Repeat what you have done one more time:
./clean -a
./configure
./compile em_real >& log.compile
Then send the log.compile file, together with your computer/compiler information to wrfhelp.


You are now ready to run the WRF ARW model for your chosen idealized case.