• Stars
    star
    115
  • Rank 305,916 (Top 7 %)
  • Language
    Julia
  • License
    MIT License
  • Created over 6 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A type-flexible shallow water model that can run with 16-bit arithmetic.

ShallowWaters.jl - A type-flexible 16-bit shallow water model

CI DOI

sst

A shallow water model with a focus on type-flexibility and 16-bit number formats. ShallowWaters allows for Float64/32/16, Posit32/16/8, BFloat16, LogFixPoint16, Sonum16, Float32/16 & BFloat16 with stochastic rounding and in general every number format with arithmetics and conversions implemented. ShallowWaters also allows for mixed-precision and reduced precision communication.

ShallowWaters uses an energy and enstrophy conserving advection scheme and a Smagorinsky-like biharmonic diffusion operator. Tracer advection is implemented with a semi-Lagrangian advection scheme. Strong stability-preserving Runge-Kutta schemes of various orders and stages are used with a semi-implicit treatment of the continuity equation. Boundary conditions are either periodic (only in x direction) or non-periodic super-slip, free-slip, partial-slip, or no-slip. Output via NetCDF.

Please feel free to raise an issue if you discover bugs or have an idea how to improve ShallowWaters.

Requires: Julia 1.2 or higher

How to use

julia> using ShallowWaters
julia> run_model()
Starting ShallowWaters on Thu, 20 Jan 2022 15:44:30 without output.
100% Integration done in 0.61s.

You just successfully ran ShallowWaters.jl! For more examples and arguments to pass on to run_model see the documentation.

Installation

ShallowWaters.jl is a registered package, so simply do

julia> ] add ShallowWaters

References

ShallowWaters.jl was used and is described in more detail in

[1] Klöwer M, S Hatfield, M Croci, PD Düben and TN Palmer, 2022. Fluid simulations accelerated with 16 bits: Approaching 4x speedup on A64FX by squeezing ShallowWaters.jl into Float16, Journal of Advances in Modeling Earth Systems, 14, 10.1029/2021MS002684

[2] Klöwer M, PD Düben, and TN Palmer, 2020. Number formats, error mitigation and scope for 16-bit arithmetics in weather and climate modelling analysed with a shallow water model. Journal of Advances in Modeling Earth Systems, 10.1029/2020MS002246

[3] Klöwer M, PD Düben, and TN Palmer, 2019. Posits as an alternative to floats for weather and climate models. In: Proceedings of the Conference for Next Generation Arithmetic 2019, Singapore, ACM, 10.1145/3316279.3316281

If you use this package in your research, please cite us. Additionally, we would love to hear from you that you have used this package, so feel always free to reach out!

More Repositories

1

SoftPosit.jl

A posit arithmetic emulator.
Julia
45
star
2

swm

Shallow water equations solver with finite differences written in Python. Arakawa C-grid, Arakawa and Lamb advection scheme, Shchepetkin and O'Brian-like biharmonic diffusion operator. 4th order Runge-Kutta for time integration.
Python
42
star
3

SpeedyWeather.jl

The little sister of a big weather forecast model
Julia
41
star
4

Sherlogs.jl

A number format that inspects your code by logging the arithmetic results.
Julia
38
star
5

StochasticRounding.jl

Up or down? Maybe both?
Julia
34
star
6

prob_meteogram

An intuitive probabilistic meteogram based on ensemble forecasts
Python
31
star
7

BitInformation.jl

Information between bits and bytes.
Julia
31
star
8

ZfpCompression.jl

Julia bindings for the data compression library zfp
Julia
14
star
9

FlyingClimate

What goes up must come down again.
Jupyter Notebook
14
star
10

swmone

An MPI-parallelised non-linear shallow water model in 1D.
Julia
13
star
11

Sonums.jl

The Self-Organizing NUMbers. A number format that learns from data.
Julia
10
star
12

LogFixPoint16s.jl

A 16bit logarithmic fixed-point number format
Julia
8
star
13

Lorenz96.jl

A type-flexible Lorenz 1996 model.
Julia
6
star
14

AthleticsChampionshipsHeat

Heat indices during some World and European championships in athletics
Jupyter Notebook
5
star
15

moonmap

Maps of Moon and Mars topography, visualized intuitively with perceptually linear colormaps
Python
4
star
16

phdthesis

Finally a document called thesis
TeX
4
star
17

Lorenz63.jl

A type-flexible Lorenz 1963 system simulator.
Julia
3
star
18

Jenks.jl

Jenks Natural Breaks Optimization - a 1D classification method to minimise in-class variance or L1 rounding error.
Julia
3
star
19

LinLogQuantization.jl

Linear and logarithmic quantization for Julia arrays
Julia
3
star
20

coolFFT.jl

A pure-Julia type-flexible implementation of the Cooley-Tukey FFT algorithm
Julia
3
star
21

lorenz_posit

Floats vs Posits vs Integers in Lorenz 63. Decimal accuracy, Fractal dimension, Rounding errors in predictions.
Julia
1
star
22

misc

Miscellaneous scripts. This is more a memo repository than anything structured.
HTML
1
star
23

FastFloat16s.jl

Faster Float16 stored as Float32
Julia
1
star
24

ClimateModels16bit

TeX
1
star
25

fem

Simple Finite-Element model for educational purposes. Uses the Uzawa-algorithm with bubble-nodes to solve the steady but non-linear Navier-Stokes equations in a simple 2D domain.
Python
1
star