-
Notifications
You must be signed in to change notification settings - Fork 1
Initial Conditions
Alexander Michalek edited this page Jul 18, 2025
·
4 revisions
Initial conditions define the starting discharge (q0) for each stream link at the beginning of the simulation. This model supports two methods for specifying initial conditions, controlled via the initial_conditions.flag parameter in the config.yaml file.
The initial_conditions block in config.yaml looks like this:
initial_conditions:
flag: 0 # 0 = constant value, 1 = from NetCDF file
initial_value: 1.0
filename: "/path/to/snapshot.nc" # Required if flag = 1
varname: "snapshot" # Required if flag = 1
id_varname: "LinkID" # Required if flag = 1If flag is set to 0, the model uses a constant discharge value for all links. This is the simplest and fastest option and requires only the initial_value field.
- All stream links will be initialized with the same value of
q0 = initial_value. - This mode is useful for testing or for initializing the start of the simulations.
If flag is set to 1, the model reads initial conditions from a NetCDF file. The file must contain:
- A 1D float variable containing the discharge values
- A 1D integer variable containing the corresponding LinkIDs This option is to be used when restarting from generated snapshot files.
Required fields:
-
filename: Path to the NetCDF file -
varname: Name of the variable that stores discharge values -
id_varname: Name of the variable that stores link IDs
- Use
flag = 0when initializing simple synthetic tests or when no saved state is available. - Use
flag = 1to resume from a previously saved state or to initialize from external hydrologic data. - Always ensure that the NetCDF file contains valid LinkIDs and matching discharge data.
- Ensure that
filename,varname, andid_varnamematch the actual NetCDF file contents.
Getting Started
User Guide
- Background
- Compiling
- OpenMP
- Solver
- The YAML File
- Parameters
- Initial Conditions
- Boundary Conditions
- Reservoirs
- Runoff Forcings
- Output Files
Programmer Guide