WRF-CMake / wrf

🌀 The Weather Research and Forecasting (WRF) model with CMake support
Other
45 stars 3 forks source link
atmospheric-modelling atmospheric-science cmake fortran grib hpc hpc-applications linux macos meteorology netcdf numerical-modelling nwp research scientific-computations scientific-computing weather weather-forecast windows wrf

WRF-CMake

Build status Azure Pipelines DOI DOI

Project overview

WRF-CMake adds CMake support to the latest version of the Advanced Research Weather Research and Forecasting model (here WRF, for short) with the intention of streamlining and simplifying its configuration and build process. In our view, the use of CMake provides model developers, code maintainers, and end-users with several advantages such as robust incremental rebuilds, flexible library dependency discovery, native tool-chains for Windows, macOS, and Linux with minimal external dependencies, thus increasing portability, and automatic generation of project files for different platforms.

WRF-CMake is designed to work alongside the current releases of WRF, therefore you can still compile your code using the legacy Makefiles included in WRF and WPS for any of the currently unsupported features.

For more details, please see the short summary paper WRF-CMake: integrating CMake support into the Advanced Research WRF (ARW) modelling system on the Journal of Open Source Software website.

Currently supported platforms

Currently unsupported features

Installation

The installation of WRF-CMake or WPS-CMake is straightforward thanks to the downloadable pre-built binaries for most Linux distributions (specifically RPM-based and Debian-based distribution-compatible), macOS, and Windows (see binary distribution below) -- most users wishing to run WRF on their system can simply download the pre-compiled binaries without the need to build from source. Alternately, you can install WRF-CMake or WPS-CMake using the Homebrew/Linuxbrew package manager, or by building and installing the software from source -- please refer to the build and install manually from source and using Homebrew or Linuxbrew section below.

Please note that HPC users, or users seeking to run WRF in the 'most optimal' configuration for their system are advised to build WRF-CMake manually from source or to use the Homebrew/Linuxbrew package manager.

Manually from source

To build and install WRF-CMake or WPS-CMake manually from source, see the install from source page.

Using Homebrew or Linuxbrew

WRF-CMake and WPS-CMake can be built and installed using Homebrew (macOS) or Linuxbrew (Linux) with the following commands:

brew tap wrf-cmake/wrf
brew install wrf -v

Binary distribution (Experimental)

To download the latest pre-compiled binary releases, see below -- please note that these distributions are currently experimental, therefore please report any issues here.

Note on MPI

If you want to launch WRF-CMake and WPS-CMake binary distributions built in dmpar to run on multiple processes, you need to have MPI installed on your system.

Documentation

Example usage

If you have already used WRF/WPS before and you just want a quick tutorial to go over the main steps, we have put together a very basic tutorial on our sister-project's website GIS4WRF with step-by-step instructions: Simulate The 2018 European Heat Wave with WRF-CMake.

Otherwise, if you are a beginner, we recommend going through the basics or running the case studies as described in the WRF-ARW Online Tutorial.

How to cite

When using WRF-CMake, please cite both model, and software (with version), e.g.:

We used the Weather Research and Forecasting (WRF) model (Skamarock et al., 2018), WRF-CMake (Riechert and Meyer, 2019a) version 4.1.0 (Riechert and Meyer, 2019b) to ...

The corresponding reference list should be as follows

Riechert, M., & Meyer, D. (2019a). WRF-CMake: Integrating CMake support into the Advanced Research WRF (ARW) modelling system. Journal of Open Source Software, 4(41), 1468. https://doi.org/10.21105/joss.01468

Riechert, M., & Meyer, D. (2019b). WRF-CMake: integrating CMake support into the Advanced Research WRF (ARW) modelling system (Version WRF-CMake-4.1.0). Zenodo. http://doi.org/10.5281/zenodo.3403343

Skamarock, W. C., Klemp, J. B., Dudhia, J., Gill, D. O., Liu, Z., Berner, J., … Huang, X.-Y. (2019). A Description of the Advanced Research WRF Model Version 4. NCAR Technical Note NCAR/TN-556+STR, 145. https://doi.org/10.5065/1dfh-6p97

If you are looking to cite a different version of WRF-CMake, please see the list of WRF-CMake DOIs on Zenodo at https://doi.org/10.5281/zenodo.3403342.

How to contribute

If you are looking to contribute, please read our Contributors' guide for details.

Testing framework

In our current GitHub set-up, we perform a series of compilation and regression tests at each commit using the WRF-CMake Automated Testing Suite (WATS) on Windows, macOS, and Linux.

When you build WRF or WRF-CMake yourself then you have already done a compilation test. If you like to replicate the regression tests, then follow the steps on the WATS page.

Changes to be upstreamed

The following is a list of changes to be upsteamed:

Copyright and license

General WRF copyright and license applies for any files part of the original WRF distribution -- see the README file for more details.

Additional files provided by WRF-CMake are licensed according to LICENSE_CMAKE.txt if the relevant file contains the following header at the beginning of the file, otherwise the general WRF copyright and license applies.

WRF-CMake (https://github.com/WRF-CMake/wrf).
Copyright <year> M. Riechert and D. Meyer. Licensed under the MIT License.