Building model - ufs-community/ufs-weather-model GitHub Wiki
How to build the UFS Weather Model
The most straightforward way to run the UFS WM is to use the regression testing (RT) framework. The RT framework will load modulefiles, build (compile) the desired WM configuration, and run the test(s).
1) load the required modules
module use modulefiles
module load ufs_${platform}.${compiler}
- NOTE: On platform GAEA, you must first set up the lmod environment:
source /lustre/f2/pdata/esrl/gsd/contrib/lua-5.1.4.9/init/init_lmod.sh
2) Build command, one line or multi-line
The UFS Weather Model can be built in one of several configurations see the configuration options in the Users Guide (UG) for common options. The CMAKE_FLAGS environment variable specifies which configuration to build using the -DAPP and -DCCPP_SUITES variables. Users set which components to build using -DAPP. Users select the CCPP suite(s) by setting the CCPP_SUITES environment variable at build time in order to have one or more CCPP physics suites available at runtime. Multiple suites can be set. Additional variables, such as -D32BIT=ON, can be set if the user chooses.
- export before the call to build.sh, for example:
export CMAKE_FLAGS="-DAPP=S2S -DCCPP_SUITES=FV3_GFS_v17_coupled_p8"
./build.sh
- build using one-line command, for example:
Build the ufs-weather-model ATMW app (standalone ATM with waves):
CMAKE_FLAGS="-DAPP=ATMW -DCCPP_SUITES=FV3_GFS_v17_p8" ./build.sh > output 2>&1 &
In each case, the executable will be build/ufs_model. The CCPP_SUITES file used must be an existing SDF. To ensure you are using a current SDF, refer to the available options in tests/rt.conf or check the files in ufsatm/ccpp/suites.
compile.sh
- File location is
ufs-weather-model/tests - Sets up environment variables and calls build.sh
- Used by ufs-weather-model/tests/rt.sh
- Most useful for debugging purposes, when repetitive compilation is desired for use within a sandbox (run directory).