WRF-CMake integration
Last year we released WRF-CMake on GitHub and published a short summary paper this year that describes its main features and testing methodology with comparison against existing WRF.
This thread is meant to gauge interest/feasibility of a merge with the main WRF project.
The main goal of WRF-CMake is to simplify the build process for WRF and WPS on all common platforms including Windows, and to be 100% non-breaking (so that current and future users can decide whether to compile WRF with CMake support or not). It achieves that by using CMake, which provides a high level language to specify the build. CMake is an industry standard by now and provides many expected features out of the box. This starts with flexible library discovery, great error reporting (both for missing libraries and compilation/linking errors), automatic construction of compiler command lines, and ends with automatic Fortran module dependency analysis and integrated OpenMP/MPI support. We found it especially useful while developing/extending WRF as it allows for robust incremental rebuilds.
Based on our work with CMake, it was easy to provide additional goodies to the community like pre-built binaries (for Linux, macOS, and Windows) and support for the Homebrew package manager. To be clear, this is of course also possible with existing WRF, but we found it to be much more straight-forward with CMake.
Although our work currently only covers ARW and WPS (that is, the NMM core, WRF-DA, WRFPLUS, WRF-Chem, and WRF-Hydro are not currently supported), given the general positive feedback from the community, we would like to ask if there is interest in merging WRF-CMake into the main WRF repository. WRF-CMake was developed such that it can live side-by-side to WRFs existing build scripts without breaking anything for existing users.
As part of our efforts we also developed a continuous integration setup which runs automated compilations & tests on each commit on the free Azure DevOps platform (unlimited number of jobs, max 10 in parallel, each up to 6 hours). This builds both with the existing build scripts as well as with CMake in many configurations (operating systems, parallelisation mode, debug/release, etc.) -- please see repository or paper for more details on that topic. We would be happy to provide this as well as it would immediately point out any discrepancies between existing and CMake builds.