4. Building Stand-Alone¶

4.1. Software Requirements¶

Before installing the UPP code, it is necessary to ensure that you have the required libraries available on your system. These libraries include:

An introduction of each can be found in their respective top level README.md files. Detailed instructions for building the libraries on various platforms can be found in the NCEPLIBS-external/doc directory.

Certain machines do have the NCEP libraries in a pre-installed location for use to build UPP. Paths to these pre-installed libraries are available on the UFS-SRW wiki and include platform name and compiler version.

4.2. Obtaining and Installing UPP¶

Building and running UPP V9.0.0 has been tested on the following platforms using pre-configured libraries.

System Compiler and Version
NCAR Cheyenne Intel 19.1.1
GNU 9.1.0
NOAA Hera Intel 18.0.5.274

Move to the directory where you want to clone and build UPP and clone the repository into the directory EMC_post.

git clone -b release-tag-name --recurse-submodules https://github.com/NOAA-EMC/EMC_post


where, release-tag-name is the release tag you wish to clone (e.g. for stand-alone UPP version 9, use the release tag upp_v9.0.0).

Move into the top level UPP directory and create and move into the build directory. Then build the UPP code using the cmake utility. The path INSTALL_PREFIX should point to the location of the pre-installed NCEP libraries.

cd EMC_post
mkdir build && cd build

cmake .. -DCMAKE_INSTALL_PREFIX=.. -DCMAKE_PREFIX_PATH=\${INSTALL_PREFIX}
make install


Note

To build in debug mode, you can add -DCMAKE_BUILD_TYPE=Debug to the cmake command. This removes compiler optimization flags and adds -g to the fortran compilation. You can also use -DCMAKE_BUILD_TYPE=RELWITHDEBINFO, which gives the -g, but keeps the -O2 optimization for the fortran compilation.

Move back to the top level UPP directory and create a directory for the CRTM fix files to be unpacked in. Download the fix files from the Github release page or use the wget command. Unpack the tar file.

cd ../
mkdir crtm && cd crtm
tar -xzf fix.tar.gz


Note

To make a clean build, simply remove both the /build directory and the bin/ncep_post executable and then re-create the build from step #2. This is recommended if a mistake is made during the installation process. If a simple change is made to the code, you can simply type make install again in the pre-existing build directory.

4.3. UPP Directory Structure¶

Under the main directory EMC_post reside the following relevant subdirectories (The * indicates a directory that exists only after the build is complete):

bin*: Contains the ncep_post executable after successful compilation
build: Contains the UPP build
include*: Contains include modules built/used during compilation of UPP
lib*: Libraries built/used by UPP that are separate from NCEPlibs
parm: Contains parameter files, which can be modified by the user to control how the post processing is performed.
scripts: Contains a sample run script to process fv3 history files.
- run_upp: runs ncep_post.
sorc: Contains source codes for:
- ncep_post.fd: Source code for the UPP