PGI Guide to MM5

This guide is intended to help build and run the PSU/NCAR mesoscale model (MM5) using PGI 2011 compilers or later on 64-bit Linux.

Version Information

This guide was created for the PSU/NCAR mesoscale model (MM5) version 3 releases 6 and 7 using the PGI 2011 release or later 64-bit Fortran compiler on an system running 64-bit Linux.

Application Notes

Information about the PSU and National Center of Atmospheric Research's MM5 program can be found at the MM5 Community Model home page.

From the MM5 Community Model home page:

The PSU/NCAR mesoscale model (known as MM5) is a limited-area, nonhydrostatic, terrain-following sigma-coordinate model designed to simulate or predict mesoscale atmospheric circulation. The model is supported by several pre- and post-processing programs, which are referred to collectively as the MM5 modeling system. The MM5 modeling system software is mostly written in Fortran, and has been developed at Penn State and NCAR as a community mesoscale model with contributions from users worldwide. The MM5 modeling system software is freely provided and supported by the Mesoscale Prediction Group in the Mesoscale and Microscale Meteorology Division, NCAR.

Obtaining the Source Code

The source for MM5 can be obtained from NCAR by downloading the gzip'd tar file MM5.TAR.gz.


No known dependencies.

Configuration and Set-up Information

Once unpacked, please read the enclosed README file for general configuration information. If unfamiliar with MM5, we also suggest reading UCAR's MM5 User's Guide.

Set these variables in section 7g1 of the configure.user file:

FCFLAGS= -fast -O4 -Mnoframe -byteswapio -Mnosgimp -DDEC_ALPHA -mp -I/path/to/MM5/MM5/include
LDOPTIONS = -byteswapio
MAKE = make -i -r
CPP = /lib/cpp -C -P -traditional
ARCH_OBJS = milliclock.o

Building MM5

Steps to build MM5

  1. Type make from the command line to build the libraries and mm5 executable.
  2. Type make mm5.deck from the command line to create the deck according to the RUNTIME_SYSTEM

Running MM5

  • To run MM5 you will need a data set. UCAR provides a sample data set, input2mm5.tar.gz, for testing your installation. Unpack this file in the MM5/Run directory.
  • Edit the mm5.deck file as need for your data set. To use the sample data set, no editing is necessary.
  • To set up the example data set, type the mm5.deck command.
  • Change into the Run directory, unlimit the stacksize, and run MM5 manually by typing mm5.exe

Verifying Correctness

MM5 does not include a standard verification process.

Known Issues and Limitations

  • A segmentation violation during execution is generally caused by the stack size being set too small. To increase the stack size, use the limit or unlimit shell commands.
  • Forgetting the -byteswapio, -Mnosgimp, or -DDEC_ALPHA compilation options can cause a segmentation violation.
Click me