Skip to content

Commit 59b3ca7

Browse files
author
Milan K
authored
Update README.md
1 parent ee36833 commit 59b3ca7

File tree

1 file changed

+33
-4
lines changed

1 file changed

+33
-4
lines changed

README.md

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,33 @@
99
# ShallowWaters.jl - A type-flexible 16bit shallow water model
1010
![sst](figs/sst_posit16.png?raw=true "SST")
1111

12-
A shallow water model with a focus on type-flexibility and 16bit number formats. ShallowWaters allows for Float64/32/16, BigFloat/[ArbFloat](https://github.com/JeffreySarnoff/ArbNumerics.jl), [Posit32/16](https://github.com/milankl/SoftPosit.jl), [BFloat16](https://github.com/JuliaComputing/BFloat16s.jl), [Sonum16](https://github.com/milankl/Sonums.jl) and in general every number format with arithmetics and conversions implemented.
12+
A shallow water model with a focus on type-flexibility and 16bit number formats. ShallowWaters allows for Float64/32/16, [BigFloat](https://docs.julialang.org/en/v1/base/numbers/#BigFloats-and-BigInts-1)/[ArbFloat](https://github.com/JeffreySarnoff/ArbNumerics.jl)/[DoubleFloats](https://github.com/JuliaMath/DoubleFloats.jl), [Posit32/16/8](https://github.com/milankl/SoftPosit.jl), [BFloat16](https://github.com/JuliaComputing/BFloat16s.jl), [Sonum16](https://github.com/milankl/Sonums.jl) and in general every number format with arithmetics and conversions implemented. ShallowWaters also allows for mixed-precision and reduced precision communication.
1313

1414
ShallowWaters is fully-explicit with an energy and enstrophy conserving advection scheme and a Smagorinsky-like biharmonic diffusion operator. Tracer advection is implemented with a semi-Lagrangian advection scheme. Runge-Kutta 4th-order is used for pressure, advective and Coriolis terms and the continuity equation. Semi-implicit time stepping for diffusion and bottom friction. Boundary conditions are either periodic (only in x direction) or non-periodic super-slip, free-slip, partial-slip, or no-slip. Output via NetCDF.
1515

1616
Please feel free to raise an [issue](https://github.com/milankl/ShallowWaters.jl/issues) if you discover bugs or have an idea how to improve ShallowWaters.
1717

18-
## How to use
18+
### How to use
1919

20-
You find the options and default parameters in `src/DefaultParameters.jl` (or by typing `?Parameter`). They can be changed with keyword arguments. Optionally, the number format `T` is defined as the first argument of `RunModel(T,...)`
20+
`RunModel` initialises the model, preallocates memory and starts the time integration. You find the options and default parameters in `src/DefaultParameters.jl` (or by typing `?Parameter`).
21+
```julia
22+
help?> Parameter
23+
search: Parameter
24+
25+
Creates a Parameter struct with following options and default values
26+
27+
T::DataType=Float32 # number format
28+
29+
Tprog::DataType=T # number format for prognostic variables
30+
Tcomm::DataType=Tprog # number format for ghost-point copies
31+
32+
# DOMAIN RESOLUTION AND RATIO
33+
nx::Int=100 # number of grid cells in x-direction
34+
Lx::Real=2000e3 # length of the domain in x-direction [m]
35+
L_ratio::Real=2 # Domain aspect ratio of Lx/Ly
36+
...
37+
```
38+
They can be changed with keyword arguments. The number format `T` is defined as the first (but optional) argument of `RunModel(T,...)`
2139
```julia
2240
julia> Prog = RunModel(Float32,Ndays=10,g=10,H=500,Fx0=0.12);
2341
Starting ShallowWaters on Sun, 20 Oct 2019 19:58:25 without output.
@@ -28,8 +46,19 @@ or by creating a Parameter struct
2846
julia> P = Parameter(bc="nonperiodic",wind_forcing_x="double_gyre",L_ratio=1,nx=128);
2947
julia> Prog = RunModel(P);
3048
```
49+
The number formats can be different (aka mixed-precision) for different parts of the model. `Tprog` is the number type for the prognostic variables, `Tcomm` is used for communication of boundary values.
50+
51+
### (Some) Features
52+
53+
- Interpolation of initial conditions from low resolution / high resolution runs.
54+
- Output of relative vorticity, potential vorticity and tendencies du,dv,deta
55+
- (Pretty accurate) duration estimate
56+
- Can be run in ensemble mode with ordered non-conflicting output files
57+
- Runs at CFL=1
58+
- Solving the tracer advection comes at basically no cost, thanks to semi-Lagrangian advection scheme
59+
- Also outputs the gradient operators ∂/∂x,∂/∂y and interpolations Ix, Iy for easier post-processing.
3160

32-
## Installation
61+
### Installation
3362

3463
ShallowWaters.jl is a registered package, so simply do
3564

0 commit comments

Comments
 (0)