Skip to content

River Boundary Conditions

This page explains how to configure river forcing in SURF-SHYFEM, including the supported input variables, input-file format, file placement, file naming, and how river data are connected to the SHYFEM-MPI simulation.

River forcing represents water input from rivers into the coastal ocean. River discharge adds freshwater volume to the model domain and can affect local sea level, salinity distribution, temperature, stratification, and river-plume dynamics.

Input Files

For each river input file, the user must provide time series for the following physical variables:

  • River discharge in \(m^3/s\);
  • Temperature in \(^\circ C\);
  • Salinity in \(psu\);

You can include any number of rivers in your simulation. To correctly generate and load your river data files, please refer to the instructions below.

File Placement

Click here to expand...

River input files must be placed in a directory of your choice inside the Base Directory. The path to that directory must be specified via the Path parameter in the JSON configuration file section 🔗River Forcing at Domain Boundaries. The path is relative to the Base Directory.

For example, if your river data is organized as follows:

Base Directory/
├── Experiment Directory/
│   └── ...
└── my_river_input/
    ├── RiverName1.dat
    ├── RiverName2.dat
    └── ...
then the Path parameter must be set to:

"Path": "my_river_input"

File Formatting

Click here to expand...

The data files must be saved as .dat files and must contain the following columns, in the specified order:

Column Variable Data Type
1 Timestamp str (YYYY-MM-DDTHH:MM)
2 River discharge float
3 Temperature float
4 Salinity float

Formatting Guidelines

  • Delimiter: Use semicolon (;) with no spaces to separate the columns.

  • Timestamps: The time series does not need to be uniformly spaced and can extend beyond the start or end of the experiment. However, it must fully cover the entire duration of the simulation.

  • Missing data: Empty slots and/or non-conform entries (caused e.g. by missing sensor measurements) are automatically ignored.

Here is an example of an acceptable data formatting:

# DateTime ; Discharge [m3/s] ; Temperature [degC] ; Salinity [psu]
2021-05-20T00:00:00;1020.8742;21.1536;41.7083
2021-05-20T08:00:00;1026.9659;21.2888;42.1906
2021-05-20T10:00:00;1024.8235;;42.0103
2021-05-20T13:00:00;1018.8895;25.7494;41.9893
[...]

File Naming

Click here to expand...

The files must be named exactly as specified in the River Names field within the JSON configuration section 🔗River Forcing at Domain Boundaries (e.g. River Name: BusaLevanteFile Name: BusaLevante.dat).