Skip navigation
NASA Logo, National Aeronautics and Space Administration
Currently Being Moderated

Building NU-WRF

VERSION 7  Click to view document history
Created on: Apr 12, 2018 10:01 AM by Carlos Cruz - Last Modified:  Dec 12, 2019 10:36 PM by Carlos Cruz

The NU-WRF modeling system incorporates WRF, LIS and multiple pre- and post-processors from the modeling community. In order to facilitate building these components, NU-WRF includes a build layer that sits on top of the underlying build systems of each component. This layer has been designed to simplify the creation of executables while resolving dependencies among components.


Invoking the build system is done in the top level NU-WRF directory by executing the script. So,


$ ./


will output a help screen. To build something the script requires at least one argument: the build target. The easiest way to build NU-WRF components is to specify the 'all' target:


$ ./ all &


That will generate all exectables including WRF without chemistry.  At the same time, some output will be printed on the screen showing the build progress. A more detailed progress file will be written to nu-wrf.LOG and all the output from the component makfiles will be redirected a make.log file that can be used to look for and/or diagnose build errors.

To generate WRF with chemistry:

$ ./ allchem &


To fully clean the entire system run:


$ ./ allclean &




$ ./ wrf,lis,wps &


will build WRF, LIS and WPS executables with default settings. Note that targets are comma-separated.


$ ./ -o debug lis,wrf,wps &


will build LIS, WRF and WPS executables with debug compilation flags. The '-o debug' should always be used when doing code development.


$ ./ -o debug,nest=2 -p /path/bin/nu-wrf wrf,wps &


will build WRF and WPS executables with debug flags and  preset-moves nesting (nest=2 option)and installl the generated executables to /path/bin/nu-wrf.

$ ./ doc &


Generates NU-WRF user's guide and tutorial documentation (see under docs/ directory).

$ ./ -o nest=3 chem &


In this case ./ will print and error message because nest=3 (vortex-tracking nesting) cannot be used with WRF-chem. WRF-Chem can only be built with nest=1 (default nesting).


$ ./ -o rebuild wrf &


NU-WRF contains modified WRF code to allow a WRF-LIS coupling mode. So, by default, ./ will rebuild LIS everytime WRF code is modified. The LIS recompilation is very time consuming and unnecessary when only WRF code is modified. The '-o rebuild' option avoids regenerating the LIS object files and recompiles (and rebuilds) only WRF thus speeding up the build.


$ ./ --prefix=/path/bin/nu-wrf all &


Build all executables and install then in /path/bin/nu-wrf. Note that this does not install configuration and parameter files - only executables.


$ ./ --config=my-settings.cfg all &


The NU-WRF build system assumes that it is being built on NASA's Discover (at NCCS) or Pleiades systems (at NAS). If not on one of these systems, then the user must provide a configuration file, e.g. my-settings.cfg, suitable for his/her computational system. For more information see the NU-WRF user's guide section  on "Porting NU-WRF"(


$ ./ -e all


The -e flags causes the build system to generate a file, nu.wrf.envs, that specifies all the NU-WRF configuration variables in a bash-script format. This can be useful for debugging or porting to other systems.


Running NU-WRF

For information on running NU-WRF the reader is referred to the NU-WRF  documentation




Comments (0)
USAGov logo NASA Logo -