Skip to content

River Inputs

Once the mesh is created, configure the simulation via input.txt (main parameters) and savefield.yaml (specific 1D/2D outputs).

Point Tolosa-sw to the Gmsh mesh file and set the bathymetry source:

mesh_name = basic_gir_stereo.msh
bathy_in = 0 ! 0 = flat bottom (no topography)
!--- Schemes ---
temp_scheme = euler ! Euler temporal scheme
spatial_scheme = lm ! Low-Mach spatial scheme
spatial_order = 1
adapt_dt = 1
cfl = 0.5
gamma = 0.5
alpha = 0.5
!--- Time ---
time_format = julian_cnes
start_date = 24835. ! CNES Julian day
simu_time = 1 days
!--- Friction ---
friction_model = 2 ! Oceanic with log-law (cb from z0)
friction_scheme = 1 ! Implicit
cb = 0.001
!--- Coriolis ---
coriolis = 2 ! Beta-plane
!--- Output ---
dtw = 600. ! VTK/Tecplot write interval (s)
dtp = 100. ! Post-treatment write interval (s)
dtb = 600. ! Binary write interval (s)
w_tecplot = 0
w_vtk = 1 ! Write VTK files
w_bin = 1 ! Write binary files
w_post = 1 ! Write post-treatment diagnostics
verbose = 3

savefield.yaml defines specific outputs beyond the full-domain fields: time series at individual points (tide gauges) and 2D fields in sub-windows.

Each entry specifies a tide gauge by its mesh cell number and the write interval:

gauge:
-
name: TIDE_G_1
cell: 6330
dt: 600
-
name: TIDE_G_2
cell: 12535
dt: 600
-
name: TIDE_G_3
cell: 16717
dt: 600
-
name: TIDE_G_4
cell: 13935
dt: 600

Results are written to res/gauge/. Default variables extracted: ssh.

Available keys:

KeyDescription
nameOutput name (used as filename stem)
cellGmsh cell number
x, yCoordinates in meters (alternative to cell)
lon, latCoordinates in degrees (alternative to cell)
variablesFields: ssh, sshuvb, sshuv, h, etc. — b = bathymetry (default: ssh)
dtWrite interval (s)
t_min, t_maxTime range (default: full simulation)
formatOutput format: csv (default), plt (Tecplot)

Each entry defines a spatial window and write interval:

field:
-
name: Window_1
x_min: -91500.
x_max: -82000.
y_min: -812000.
y_max: -798000.
dt: 360.
-
name: Window_2
format: bin
x_min: -101000.
x_max: -91500.
y_min: -784000.
y_max: -769000.
dt: 360.

Window_1 uses the default VTK format; Window_2 uses binary format (readable by PyTolosa).

Available keys:

KeyDescription
nameOutput name
x_min/x_max, y_min/y_maxWindow in meters (default: entire domain)
lon_min/lon_max, lat_min/lat_maxWindow in degrees (alternative)
variablesFields to extract (default: sshb)
dtWrite interval (s)
t_min, t_maxTime range
formatvtk (default), bin, binc
!--- Mesh ---
mesh_name = basic_gir_stereo.msh
bathy_in = 0
!--- Schemes ---
temp_scheme = euler
spatial_scheme = lm
spatial_order = 1
adapt_dt = 1
cfl = 0.5
gamma = 0.5
alpha = 0.5
!--- Time ---
time_format = julian_cnes
start_date = 24835.
simu_time = 1 days
!--- Friction ---
friction_model = 2
friction_scheme = 1
cb = 0.001
!--- Coriolis ---
coriolis = 2
!--- Output ---
dtw = 600.
dtp = 100.
dtb = 600.
w_tecplot = 0
w_vtk = 1
w_bin = 1
w_post = 1
verbose = 3
gauge:
-
name: TIDE_G_1
cell: 6330
dt: 600
-
name: TIDE_G_2
cell: 12535
dt: 600
-
name: TIDE_G_3
cell: 16717
dt: 600
-
name: TIDE_G_4
cell: 13935
dt: 600
field:
-
name: Window_1
x_min: -91500.
x_max: -82000.
y_min: -812000.
y_max: -798000.
dt: 360.
-
name: Window_2
format: bin
x_min: -101000.
x_max: -91500.
y_min: -784000.
y_max: -769000.
dt: 360.