Compiling the LFM requires two steps: configure & compile.

Configure Make.$MACHINE:

Compiler settings and library locations should be specified in a Make.$MACHINE file. The code ships with a set of pre-configured Make.$MACHINE files in the env directory.

If your environment is listed here, simply set the environment variable $MACHINE appropriately. If your environment is not listed, create a copy of one of the pre-existing Make.$MACHINE files as a template for your own system inside the env directory.


Once you have a proper Make.$MACHINE file, you are ready to compile. The LTR code base contains several models that may be coupled together:

Additionally, the LFM can be compiled in a variety of resolutions:

There are two ways to build the code:

  1. Compile Everything
  2. Compile a particular model at a particular resolution (à la carte).

Build everything

The entire code base can be compiled with one command:

gmake all-resolutions

This may take a while and all results will be stored in the build directory.

À la carte

You can compile a particular model at a particular resolution via the following command:

gmake (input-code) RESOLUTION=(input-resolution)

where (input-code) is one of:

and RESOLUTION = (input-resolution) is one of:

See the LFM Grid Resolution page for more information.


Once you have finished compiling the code, the code will be installed into the "build" directory. Before you can run the code, you need to set some environment variables. See the Environment Variables page for details.

Kicking the Tires

Now you are ready to take the LTR for a test drive. See the Run the Code page to learn how to setup & execute a simple test run.