This guide is intended to help build WRF Version 2 on Linux using PGI 5.2-2 compilers.

Version Information

This guide was created for WRF version 2.0.2 release and the PGI Release 5.2-2. This information is for both x64 processors running 64-bit Linux or x86 processors running 32-bit Linux.

Application Notes

Information about The Weather Research and Forecasting (WRF) Model can be found at the WRF Homepage.

Obtaining the Source Code

You may obtain the source for WRF Version 2.0.2 from the WRF Users Page. While the source is freely available, you will be asked to register if you are a new user.

Dependencies

A netCDF package built using the same major version of the PGI compilers is required. Please refer to the PGI Guide to NetCDF for more information on building netCDF. Also, you must have PGI release 5.2-2 or above.

Configuration and Set-up Information

  1. Unzip and untar your WRF package and cd to the created WRFV2 directory.
  2. Please review chapter 2 of the WRF user's guide and the README file included with your WRF source.
  3. Set the environmental variable NETCDF to the location of your netCDF installation. NetCDF must be installed before you can continue. See PGI Guide to NetCDF for informantion on how to build netCDF.
  4. Run:

    ./configure

    and select the configuration type, Serial, OpenMP, or MPI.

    Note: if you are on a 64-bit system and see no configuration choices listed, append this configuration file to the end of your WRFV2/arch/configure.defaults file and rerun configure.

  5. For 32-bit SSE enabled systems, Pentium 4, Xeon, etc., we recommend using "-fast -Mscalarsse -Mcache_align -Mipa=fast,inline,safe" instead of the default "-fast". Edit the configure.wrf file and change "FCOPTIM" to "-fast -Mscalarsse -Mcache_align", change "FCBASEOPTS" by adding "-Mipa=fast,inline,safe" and removing "-tp p6", and add "$(FCFLAGS)" to the LDFLAGS.

Building WRF

To build WRFV2, use "./compile <case_name>" where <case_name> is one of the following: em_b_wave, em_hill2d_x, em_grav2d_x, em_quarter_ss, em_squall2d_x, em_squall2d_y, or em_real. All but em_real are idealized test cases. We suggest you separately build and run each test case to ensure your installation is correct. If all the test cases are correct, then build the em_real case.

Running WRF

Please refer to the WRF user's guide for more information about running a real case. For the idealized cases, please refer to the README_test_cases file located in the root of your WRFV2 directory.

To run each idealized case,

  1. cd to the test case directory, WRFV2 est/<case_name>
  2. Run the file run_me_first.csh, if it exsists.
  3. Run ideal.exe
  4. Run wrf.exe

Verifying Correctness

Each test case should print "SUCCESS" upon completion.

Known Issues and Limitations

WRFV2 may not compile with PGI compilers prior to version 5.2-2.

Click me