You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+33-4Lines changed: 33 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,15 +9,33 @@
9
9
# ShallowWaters.jl - A type-flexible 16bit shallow water model
10
10

11
11
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.
13
13
14
14
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.
15
15
16
16
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.
17
17
18
-
## How to use
18
+
###How to use
19
19
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,...)`
Starting ShallowWaters on Sun, 20 Oct 201919:58:25 without output.
@@ -28,8 +46,19 @@ or by creating a Parameter struct
28
46
julia> P =Parameter(bc="nonperiodic",wind_forcing_x="double_gyre",L_ratio=1,nx=128);
29
47
julia> Prog =RunModel(P);
30
48
```
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.
31
60
32
-
## Installation
61
+
###Installation
33
62
34
63
ShallowWaters.jl is a registered package, so simply do
0 commit comments