CPPWRF · WebAssembly · double precision
A thunderstorm, computed in your browser.
Bit for bit what WRF computes.
CPPWRF, our C++ atmospheric model,
compiled to WebAssembly and run in this tab, in double precision. When the hour of model time is done, the
page hashes every value of the wrfout file it wrote and compares it with the native CPU build of
CPPWRF, which is bit-identical to WRF real*8.
- Step
- –
- Model time
- –
- Speed
- –
- Elapsed
- –
x–z cross sections
Along x, 0–16 km in height (interpolated from the model's η levels), in
every output time equal a time differs · hover a cell for the variable
How the check works
For each of the file's variables and each of its output times, the page takes the SHA-256 of the values as
stored in the NetCDF file and compares it with expected/<case>.json.
That file was written once from the native build: . The whole file is compared as
well; the wasm build writes it with the same CPPWRF writer and the same NetCDF-C version.
Bit identity in the browser rests on three things: no fused multiply-add contraction and no fast-math in the wasm, CPPWRF's own port of glibc's libm and libmvec instead of Emscripten's math library, and the same order of operations as WRF, statement by statement.