Compile WPS

To compile WPS, issue the following command (make sure to send your standard error and output to a log file by utilizing the ">&" as shown below. If your compilation fails, you will need this file to troubleshoot):

./compile >& compile.log
If your compilation was successful, you should see these executables created (make sure they are not of size zero):
geogrid.exe -> geogrid/src/geogrid.exe Generates static data
ungrib.exe -> ungrib/src/ungrib.exe Unpacks GRIB data and changes to intermediate format
metgrid.exe -> metgrid/src/metgrid.exe Generates input data for WRF
If you do not see these files, check your compile.log file for any errors (seach for the word 'Error,' with a captial 'E').

A few utilities will also be linked under the util/ directory:

avg_tsfc.exe Computes daily mean surface temperature from intermediate files. Recommended for using with the 5-layer soil model (sf_surface_physics = 1) in WRF
g1print.exe Lists the contents of a GRIB1 file
g2print.exe Lists the contents of a GRIB2 file
mod_levs.exe Removes superfluous levels from the 3D fields in intermediate files
rd_intermediate.exe Reads intermediate files
calc_ecmwf_p.exe Creates fields that have 3D pressure and geopotential height on the same levels as the other atmospheric fields, for use with ECMWF sigma–level data sets
height_ukmo.exe Computes a geopotential height field for data sets from the UKMO Unified Model
plotgrids.ncl Creates an image of your domain
int2nc.ncl Creates a netCDF format file, from an intermediate format file



*Note:
Programs plotgrids.exe and plotfmt.exe are no longer automatically compiled with WPS. The reason is that, instead of plotgrids.exe, there is a program called plotgrids.ncl that is compiled, and serves the exact same purpose. plotfmt.exe is only useful for new data types (that we do not support). If you still wish to compile these programs, you can type (from the WPS directory):

./compile utility_of_your_choice >& log.utility_of_your_choice
If you have NCL libraries installed, before compiling, it may be useful to type 'ncargf90'. This will tell you the correct libraries to use if you would like to compile these 2 programs. Then you will need to edit the following line in your configure.wps file to reflect those libraries (and then save the configure.wps file before compiling).
NCARG_LIBS =




Utilities

Detailed explanations of the WPS utility programs are available from Chapter 3 of the WRF Users' Guide.



NCAR Graphics

If you don't have NCAR Graphics on your system, it is not a problem, but since it is a very handy, free plotting program, we recommend installing it at some point.



The executables were not created

Check the log.compile file carefully for any errors (do a search for 'Error' with a capital 'E').

Most common errors are:
– Incorrect netCDF version (e.g., netCDF compiled with PGI, but you are compiling the code with Intel).
– Paths to libraries not found.
– Required libraries not installed, or not installed correctly.
– You configured for GRIB2 data, but do not have the extra libraries (JasPer, PNG, and Zlib) on your system, or they have been installed incorrectly. See this page for help getting those libraries installed correctly. (Zlib may already be on your computer, so check before installing this library. JasPer and PNG are compression libraries needed to ungrib GRIB version 2 data).

Typically when you are unable to compile WPS, 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 correct any problems in the configure.wps file, be sure to
./clean -a
and reconfigure before you attempt to compile the code again.




If your executables were created correctly, you are now ready to run the WRF ARW model.





Run Basics