This guide is intended to help build WRF Version 2.1 on Linux using PGI 6.1 compilers.
- Application Notes
- Source Information
- Verifying Output
- Known Issues
Information about The Weather Research and Forecasting (WRF) Model can be found at the WRF home page.
You may obtain the source for WRF Version 2.1 from the WRF Users Page. While the source is freely available, you will be asked to register if you are a new user.
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.
- Unzip and untar your WRF package and cd to the created WRFV2 directory.
- Please review chapter 2 of the WRF user's guide and the README file included with your WRF source.
- 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.
and select the configuration type, Serial, OpenMP, or MPI.
- For 32-bit SSE enabled systems, Pentium 4, Xeon, etc., we recommend using "-fast -Mipa=fast,inline,safe" instead of the default "-fast". Edit the configure.wrf file and change "FCOPTIM" to "-fast", change "FCBASEOPTS" by adding "-Mipa=fast,inline,safe" and removing "-tp p6", and add "$(FCFLAGS)" to the LDFLAGS.
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.
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,
- cd to the test case directory, WRFV2/test/<case_name>
- Run the file run_me_first.csh, if it exsists.
- Run ideal.exe
- Run wrf.exe
Each test case should print "SUCCESS" upon completion.
You may encounter undefined references to SSE2 math library routines when you link with netCDF on 32-bit SSE2 enabled systems. With the 6.1 release, the default behavior is to use SSE2 floating-point instruction instead of x87 on systems which support them. Using the Pentium III architecture flag "-tp p6", as the WRF 32-bit configure file does, the compiler will use x87 instead since SSE2 is not supported on a Pentium III. The solution is to either remove "-tp p6" from the WRF configure file if you want SSE2 or add "-tp p6" it to your netCDF configuration if you want x87.
Example undefined reference:
lib/libnetcdf.a(ncx.o)(.text+0xb14): In function `ncx_get_float_uchar': : undefined reference to `__mth_i_fixux'