-
Notifications
You must be signed in to change notification settings - Fork 1
Initial Conditions
Initial conditions specify the starting state (y0) for each simulation stream at the beginning of the model run. This program supports two methods for specifying initial conditions, controlled via the initial.mode parameter in the config.yaml file.
The initial block in config.yaml looks like this:
initial:
mode: "constant" # Options: "constant" or "from_file"
file: "" # Required if mode = "from_file"
values: [0.01, 0.1, 0.0, 0.1, 0.01, 1.0, 1.0, 0.0, 0.0] # Initial values for each state variable (if mode is "constant")
# Order of values: [snow, static, surface, grav, aquifer, T_air, T_soil, surf_runoff, total_runoff]
When mode is set to "constant", the model initializes all ODE states for each stream with the same user-specified values.
- Provide the values as an array under
initial.value. - Each element in the array corresponds to one state variable in the model (add exact tanks here).
- This option is simple and recommended for new runs or testing.
Example:
initial:
mode: "constant"
values: [0.01, 0.1, 0.0, 0.1, 0.01, 1.0, 1.0, 0.0, 0.0] When mode is set to "from_file", the model loads the initial conditions from a NetCDF file.
-
The file must contain a 2D variable where:
- The first dimension indexes streams (
link_ids). - The second dimension indexes model states.
- The first dimension indexes streams (
-
A variable holding
link_idsis also required to map states to the correct streams. -
This mode is typically used for restarting simulations from a previous outputs, typically by loading the final.nc file generated by this module.
Required fields:
-
file: Path to the NetCDF file containing the initial state.
Example:
initial:
mode: "from_file"
file: "/data/final_20190101_20190110.nc"- Ensure the NetCDF file’s dimensions and variable names match the expected format.
- When using restart files, verify that the link IDs in the file align with those in your spatial parameters CSV.
Getting Started
User Guide
Programmer Guide