535.weather_t
SPEChpc™ 2021 Benchmark Description

Benchmark Name

535.weather (miniWeather)


Benchmark Author

Matthew Norman <normanmr_at_ornl.gov>



Benchmark Program General Category

Weather


Benchmark Description

The miniWeather code mimics the basic dynamics seen in atmospheric weather and climate. The dynamics themselves are dry compressible, stratified, non-hydrostatic flows dominated by buoyant forces that are relatively small perturbations on a hydrostatic background state. The equations in this code themselves form the backbone of pretty much all fluid dynamics codes, and this particular flavor forms the base of all weather and climate modeling. With about 500 total lines of code (and only about 200 lines that you care about), it serves as an approachable place to learn parallelization and porting using MPI + X, where X is OpenMP, OpenACC, CUDA, or potentially other approaches to CPU and accelerated parallelization. The code uses periodic boundary conditions in the x-direction and solid wall boundary conditions in the z-direction.

Brief Description of the Code

Domain Parameters:

A fuller description of the science, math, and dynamics are play are given later, but this section is reserved to describing some of the main variables and flow in the code. The code is decomposed in two spatial dimensions, x and z, with nx_glob and nz_glob cells in the global domain and nx and nz cells in the local domain, using straightforward domain decomposition for MPI-level parallelization. The global domain is of size xlen and zlen meters, and hs "halo" cells are appended to both sides of each dimension for convenience in forming stencils of cells for reconstruction.

Fluid State Variables

There are four main arrays used in this code: state, state_tmp, flux, and tend, and the dimensions for each are given in the code upon declaration in the comments. Each of these arrays is described briefly below:


Overal Model Flow

This code follows a traditional Finite-Volume control flow.

To compute the time tendency, given an initial state at the beginning of a time step that contains cell-averages of the fluid state, the value of the state at cell boundaries is reconstructed using a stencil. Then, a viscous term is added to the fluid state at the cell boundaries to improve stability. Next, the tendencies are computed as the divergence of the flux across the cell. Finally, the tendencies are applied to the fluid state.

Once the time tendency is computed, the fluid PDEs are essentially now cast as a set of ODEs varying only in time, and this is called the "semi-discretized" form of the equations. To solve the equations in time, an ODE solver is used, in this case, a Runge-Kutta method. Finally, at the highest level, the equations are split into separate solves in each dimension, x and z.


Input Description

The benchmark takes the following 6 input parameters:

  1. NetCDF output file name
  2. Global X-dimension size
  3. Global Z-dimension size
  4. Number of time-steps to run
  5. Output ever N number of time-steps
  6. Model number to use:
    1. Colliding Thermals
    2. Rising Thermals
    3. Mountain Gravity Waves (not-used in hpc2020 due to time constraints)
    4. Turbulence (not-used in hpc2020 since model uses random numbers)
    5. Density Current
    6. Injection

Output Description

Each run produces NetCDF files containing the output from the run. The utility 997.ncmpidiff is then used to compare the the generated files to a set of known correct results.

Programming Language

Fortran


External Dependencies

PNetCDF Library, MPI Library, NcmpiDiff utility

Runtime Limitations (such as number of ranks)

No known runtime limitations.

Known portability issues

No known portability issues.


Version and Licensing

Application Version: versioning not used. Original source for the miniWeather git repository:

git clone https://github.com/mrnorman/miniWeather.git
git checkout 1d142b026ca7ec9812bfe4cd6d45f239895a466c

License: BSD 2-Clause "Simplified" License


References


Last updated: $Date$