Compile the Code
Compile the Code carson Fri, 02/22/2019 - 10:27Compile the code
This exercise will compile the NEMSfv3gfs code with CCPP in static mode, using the control physics suite (operational/Zhao-Carr microphysics). An optional second step will recompile and run with the GFDL microphysics (updated control).
Using the same build mechanisms as the baseline NEMSfv3gfs,
cd tests/
- For bash shell
./compile.sh $PWD/../FV3 theia.intel "CCPP=Y HYBRID=N STATIC=Y SUITE=suite_FV3_GFS_2017_updated.xml" ccpp1 YES NO 2>&1 | tee compile1.log
- For t/csh shell
./compile.sh $PWD/../FV3 theia.intel "CCPP=Y HYBRID=N STATIC=Y SUITE=suite_FV3_GFS_2017_updated.xml" ccpp1 YES NO |& tee compile1.log
- The compile.sh script takes up to 6 arguments.
PATHTR BUILD_TARGET [ MAKE_OPT [ BUILD_NR ] [ clean_before ] [ clean_after ]
- so, in the example command-line given above,
- PATHTR = $PWD/../FV3
- BUILD_TARGET = theia.intel
- MAKE_OPT = "CCPP=Y HYBRID=N STATIC=Y SUITE=suite_FV3_GFS_2017_updated.xml"
- BUILD_NR (name of the fv3.exe executable) = ccpp1 (fv3_ccpp1.exe)
- clean_before = YES
- clean_after = NO
While the code is compiling, review the SDF file, which can be found in the ccpp/suites directory:
cat ../ccpp/suites/suite_FV3_GFS_2017_updated.xml
Note the use of interstitial code (this was/is in GFS_physics_driver!) in addition to the physics schemes.
While the code is compiling, you may start setting up the case run directory (next page).
Completed compilation
The result of the compile.sh script will be an executable named fv3_ccpp1.exe in the tests/ subdirectory.
The log file will show how the CCPP is compiled, and what flags are used in the NEMSfv3gfs build to include CCPP.
The compilation (on theia) generally takes about 15 minutes.