River Inputs
Once the mesh is created, configure the simulation via input.txt (main parameters) and savefield.yaml (specific 1D/2D outputs).
input.txt
Section titled “input.txt”Point Tolosa-sw to the Gmsh mesh file and set the bathymetry source:
mesh_name = basic_gir_stereo.mshbathy_in = 0 ! 0 = flat bottom (no topography)Numerical Scheme and Time
Section titled “Numerical Scheme and Time”!--- Schemes ---temp_scheme = euler ! Euler temporal schemespatial_scheme = lm ! Low-Mach spatial schemespatial_order = 1adapt_dt = 1cfl = 0.5gamma = 0.5alpha = 0.5
!--- Time ---time_format = julian_cnesstart_date = 24835. ! CNES Julian daysimu_time = 1 days
!--- Friction ---friction_model = 2 ! Oceanic with log-law (cb from z0)friction_scheme = 1 ! Implicitcb = 0.001
!--- Coriolis ---coriolis = 2 ! Beta-planeOutputs
Section titled “Outputs”!--- Output ---dtw = 600. ! VTK/Tecplot write interval (s)dtp = 100. ! Post-treatment write interval (s)dtb = 600. ! Binary write interval (s)w_tecplot = 0w_vtk = 1 ! Write VTK filesw_bin = 1 ! Write binary filesw_post = 1 ! Write post-treatment diagnosticsverbose = 3savefield.yaml
Section titled “savefield.yaml”savefield.yaml defines specific outputs beyond the full-domain fields: time series at individual points (tide gauges) and 2D fields in sub-windows.
1D Outputs — Tide Gauges
Section titled “1D Outputs — Tide Gauges”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: 600Results are written to res/gauge/. Default variables extracted: ssh.
Available keys:
| Key | Description |
|---|---|
name | Output name (used as filename stem) |
cell | Gmsh cell number |
x, y | Coordinates in meters (alternative to cell) |
lon, lat | Coordinates in degrees (alternative to cell) |
variables | Fields: ssh, sshuvb, sshuv, h, etc. — b = bathymetry (default: ssh) |
dt | Write interval (s) |
t_min, t_max | Time range (default: full simulation) |
format | Output format: csv (default), plt (Tecplot) |
2D Outputs — Sub-windows
Section titled “2D Outputs — Sub-windows”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:
| Key | Description |
|---|---|
name | Output name |
x_min/x_max, y_min/y_max | Window in meters (default: entire domain) |
lon_min/lon_max, lat_min/lat_max | Window in degrees (alternative) |
variables | Fields to extract (default: sshb) |
dt | Write interval (s) |
t_min, t_max | Time range |
format | vtk (default), bin, binc |
Complete Input Files
Section titled “Complete Input Files”input.txt
Section titled “input.txt”!--- Mesh ---mesh_name = basic_gir_stereo.mshbathy_in = 0
!--- Schemes ---temp_scheme = eulerspatial_scheme = lmspatial_order = 1adapt_dt = 1cfl = 0.5gamma = 0.5alpha = 0.5
!--- Time ---time_format = julian_cnesstart_date = 24835.simu_time = 1 days
!--- Friction ---friction_model = 2friction_scheme = 1cb = 0.001
!--- Coriolis ---coriolis = 2
!--- Output ---dtw = 600.dtp = 100.dtb = 600.w_tecplot = 0w_vtk = 1w_bin = 1w_post = 1verbose = 3savefield.yaml
Section titled “savefield.yaml”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.