CCPP and SCM Online Tutorial | Download and Build > Option 1 Using a pre-configured platform

Option 1. Using a computational platform with the required software stack

In order to build and run the SCM, your platform needs to have the system software listed below. The versions we have tested with are listed below

  • GNU compilers 12.1.0,     cmake 3.23.2, NetCDF 4.7.4, Python 3.9.12
  • GNU compilers 10.1.0,     cmake 3.16.4, NetCDF 4.8.1, Python 3.7.12
  • GNU compilers 11.1.0,     cmake 3.18.2, NetCDF 4.8.1, Python 3.8.5
  • Intel compilers 2022.0.2, cmake 3.20.1, NetCDF 4.7.4, Python 3.7.11
  • Intel compilers 2022.1.0, cmake 3.22.0, NetCDF 4.8.1, Python 3.7.12

The following Python modules are required: xarray, dask, netCDF4, bottleneck, matplotlib, f90nml, configobj, shapely, pandas, and scipy.

In addition, there are several utility libraries as part of the HPC-Stack package that must be installed. 

  • bacio - Binary I/O Library
  • sp - Spectral Transformation Library
  • w3nco - GRIB decoder and encoder library

Obtaining the code

The source code for the CCPP and SCM is provided through GitHub.com. This tutorial accompanies the v6.0.0 release tag, which contains the tested and supported version for general use. 

Clone the the v6.0.0 release code using

cd $SCM_WORK
git clone --recursive -b release/public-v6 https://github.com/NCAR/ccpp-scm

The recursive option in this command clones the release/public-v6 branch of the NCAR authoritative SCM repository (ccpp-scm) and all subrepositories (ccpp-physics, ccpp-framework, and CMakeModules). 

Setting up the environment in a preconfigured platform

Computational platforms that meet the system requirements and in which the HPS-Stack are prebuilt and installed in a central location are referred to as preconfigured platforms. Examples of preconfigured platforms are the Hera NOAA high-performance computing machine (using the Intel compiler) and the NCAR Cheyenne system (using the Intel and GNU compilers). 

Platform-specific scripts are provided to load modules and set the user environment for preconfigured platforms. These scripts load compiler modules, the NetCDF module, Python environment, etc. and set compiler and HPC-Stack environment variables. 

Go to the top-level code directory (ccpp-scm) 

cd $SCM_WORK/ccpp-scm

Now source the correct script for your platform and shell. 

For t/csh shells, 

  • source scm/etc/Hera_setup_intel.csh
  • source scm/etc/Cheyenne_setup_gnu.csh
  • source scm/etc/Cheyenne_setup_intel.csh

For bourne/bash shells, 

  • . scm/etc/Hera_setup_intel.sh
  • . scm/etc/Cheyenne_setup_gnu.sh
  • . scm/etc/Cheyenne_setup_intel.sh

Setting up the environment in a non-preconfigured platform

If you are not using a preconfigured platform, you need to install HPC-Stack yourself following the instructions found in Section 2.2.2 of the CCPP SCM User and Technical Guide v6-0-0

After performing the installation and setting environment variables bacio_ROOT, sp_ROOT, and w3nco_ROOT to the location where HPC-Stack is installed, continue following the instructions in this tutorial.

Staging additional datasets

You need to download the lookup tables (large binaries, 324 MB) for the Thompson microphysics package and place them in the correct directory.  

cd $SCM_WORK/ccpp-scm
./contrib/get_all_static_data.sh
./contrib/get_thompson_tables.sh 

Building the code

Following the commands below, you will run cmake to query system parameters, execute the CCPP pre-build script to match the physics variables (between what the host model – SCM – can provide and what is needed by physics schemes in the CCPP), and build the physics caps needed to use them. Subsequently, you will run make to build the SCM executable.

cd $SCM_WORK/ccpp-scm/scm
mkdir -p bin && cd bin
cmake ../src
make -j4

A successful build will produce executable file $SCM_WORK/ccpp-scm/scm/bin/scm