Skip to content

Commit bb53220

Browse files
committed
Add example config file and docs, remove old one
A version of the new aronnax.conf file has been added to the base directory of the repo. This config file includes all of the paramters and inputs that can be specified as well as comments describing them. This partially completes #103. The documenation page `running_aronnax` ingests this config file and displays it, along with its comments and some additional descriptive text.
1 parent 03afa84 commit bb53220

File tree

3 files changed

+152
-87
lines changed

3 files changed

+152
-87
lines changed

aronnax.conf

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
# Aronnax configuration file. Change the values, but not the names.
2+
3+
#------------------------------------------------------------------------------
4+
# au is the lateral friction coefficient in m^2 / s
5+
# ah is thickness diffusivity in m^2 / s
6+
# ar is linear drag between layers in 1/s
7+
# dt is time step in seconds
8+
# slip is free-slip (=0), no-slip (=1), or partial slip (something in between)
9+
# nTimeSteps: number of timesteps before stopping
10+
# dumpFreq: time between snapshot outputs in seconds
11+
# avFreq: time between averaged output in seconds
12+
# hmin: minimum layer thickness allowed by model (for stability) in metres
13+
# maxits: maximum iterations for the pressure solver algorithm. Should probably
14+
# be at least max(nx,ny), and possibly nx*ny
15+
# eps: convergence tolerance for pressure solver. Algorithm stops when error is
16+
# less than eps*initial_error
17+
# freesurfFac: 1. = linear implicit free surface, 0. = rigid lid.
18+
# botDrag is the linear bottom friction in 1/s
19+
# thickness_error is the discrepancy between the summed layer thicknesses and
20+
# the depth above which the model emits a warning. 1e-2 is a 1% discrepancy.
21+
22+
[numerics]
23+
au = 500.
24+
ah = 0.0
25+
ar = 0.0
26+
dt = 600.
27+
slip = 0.0
28+
nTimeSteps = 502
29+
dumpFreq = 1.2e5
30+
avFreq = 1.2e5
31+
hmin = 100
32+
maxits = 1000
33+
eps = 1e-5
34+
freesurfFac = 0.
35+
botDrag = 1e-6
36+
thickness_error = 1e-2
37+
#------------------------------------------------------------------------------
38+
39+
# RedGrav selects whether to use n+1/2 layer physics (RedGrav=yes), or n-layer
40+
# physics with an ocean floor (RedGrav=no)
41+
# depthFile defines the depth of the ocean bottom below the sea surface in metres.
42+
# hmean is a list of initial thicknesses for the layers in metres. Each value is
43+
# separated by a comma. This input was a useful short cut for specifying
44+
# initial conditions with constant layer thicknesses, but has been superseded
45+
# and may be removed in the future.
46+
# H0 is the depth of the ocean basin and is only required in n-layer mode. This
47+
# input was a useful short cut for specifying a flat bottomed ocean, but has
48+
# been superseded and may be removed in the future.
49+
50+
[model]
51+
RedGrav = no
52+
depthFile
53+
hmean = 400.,1600.
54+
H0 = 2000.
55+
#------------------------------------------------------------------------------
56+
57+
# these variables set the number of processors to use in each direction.
58+
# Currently the model only runs on one processor, so nProcX and nProcY must
59+
# be set to 1
60+
61+
[pressure_solver]
62+
nProcX = 1
63+
nProcY = 1
64+
#------------------------------------------------------------------------------
65+
66+
# g_vec is the reduced gravity at interfaces in m/s^2. g_vec must have as many
67+
# entries as there are layers. The values are given by the delta_rho*g/rho_0.
68+
# In n-layer mode the first entry applies to the surface, i.e. the top of the
69+
# upper layer. In n+1/2 layer mode the first entry applies to the bottom of
70+
# the upper layer.
71+
# rho0 is the reference density in kg/m^3, as required by the Boussinesq assumption.
72+
73+
[physics]
74+
g_vec = 9.8, 0.01
75+
rho0 = 1035.
76+
#------------------------------------------------------------------------------
77+
78+
# nx is the number of grid points in the x direction
79+
# ny is the number of grid points in the y direction
80+
# layers is the number of active layers
81+
# dx is the x grid spacing in metres
82+
# dy is the y grid spacing in metres
83+
# fUfile defines the Coriolis parameter on the u grid points
84+
# fVfile defines the Coriolis parameter on the v grid points
85+
# wetMaskFile defines the computational domain - which grid points are ocean and
86+
# which are land
87+
88+
[grid]
89+
nx = 10
90+
ny = 10
91+
layers = 2
92+
dx = 2e4
93+
dy = 2e4
94+
fUfile = :beta_plane_f_u:1e-5,2e-11
95+
fVfile = :beta_plane_f_v:1e-5,2e-11
96+
wetMaskFile = :rectangular_pool:
97+
#------------------------------------------------------------------------------
98+
99+
# These files define the values towards which the model variables are relaxed
100+
# (in metres or m/s), and the timescale for the relaxation, in 1/s.
101+
[sponge]
102+
spongeHTimeScaleFile
103+
spongeUTimeScaleFile
104+
spongeVTimeScaleFile
105+
spongeHFile
106+
spongeUfile
107+
spongeVfile
108+
109+
#------------------------------------------------------------------------------
110+
111+
# These files define the initial values used in the simulation. If no values are
112+
# defined for the velocities (in m/s) or the free surface elevation (in m),
113+
# they will be initialised with zeros. Layer thickness (in m) must be initialised,
114+
# either by passing a file, or using the generator functions.
115+
116+
[initial_conditions]
117+
initUfile
118+
initVfile
119+
initHfile
120+
initEtaFile
121+
122+
#------------------------------------------------------------------------------
123+
124+
# The wind files define the momentum forcing in N/m^2
125+
# wind_mag_time_series_file defines the constant factor by which the wind is
126+
# multiplied by at each timestep.
127+
# DumpWind defines whether the model outputs the wind field when it outputs other
128+
# variables (at the rate controlled by DumpFreq).
129+
130+
[external_forcing]
131+
zonalWindFile = 'input/wind_x.bin'
132+
meridionalWindFile = 'input/wind_y.bin'
133+
wind_mag_time_series_file
134+
DumpWind = no
135+
#------------------------------------------------------------------------------

docs/running_aronnax.rst

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,20 @@ As described above, it is possible to define functions that can be passed to `ar
2020
nx=10, ny=10, exe="aronnax_test", dx=xlen/10, dy=ylen/10)
2121
2222
.. warning::
23-
Running Aronnax in a directory that contains outputs from a previous simulation will result in those outputs being overwritten. The model does not currently check if the intended outputs directory is empty.
23+
Running Aronnax in a directory that contains outputs from a previous simulation will result in those outputs being overwritten. The model does not currently check if the output directory is empty.
24+
25+
26+
Parameters
27+
===========
28+
Parameters can be passed to the model in two ways. Either they can be included in a file called `aronnax.conf` in the working directory, or they can be passed as keyword arguments to :meth:`aronnax.driver.simulate`. The main directory of the repository includes an example `aronnax.conf` file.
29+
30+
.. note::
31+
Aronnax takes a deliberately strict approach towards specifying parameter choices. The model contains very few default values, except in situations where a default of zero can sensibly be applied. As such, you will need to specify your parameter choices, either through the configuration file, or the function call. However, parameters that are not required, for example, bottom drag in n+1/2 layer mode, need not be set.
32+
33+
The example file is reproduced here with comments describing the parameters and their units. All possible parameters are included, but they are not all assigned values. After modifying this file for your simulation, any unassigned parameters should be deleted.
34+
35+
.. include:: ../aronnax.conf
36+
:literal:
37+
38+
.. warning::
39+
The configuration file shown above includes all of the possible input parameters and fields since it forms part of the documentation. IT WILL NOT WORK AS IS. To use it in an actual simulation the file will need to be modified either by giving values to the parameters that are currently unspecified, or deleting them from the file. If you wish to see a configuration file that corresponds to a successful simulation, look in any of the test, benchmark, or reproduction directories.

parameters.in

Lines changed: 0 additions & 86 deletions
This file was deleted.

0 commit comments

Comments
 (0)