FlowDataConfig API Reference
geoloop.configuration.FlowDataConfig
Bases: BaseModel
Configuration object for defining flow-rate profiles.
Supports constant, variable, and file-based flow definitions and resolves directory paths automatically.
Attributes:
| Name | Type | Description |
|---|---|---|
config_file_path |
str or Path
|
Path to the main configuration file. |
fp_type |
{CONSTANT, VARIABLE, FROMFILE}
|
Type of flow-rate time-profile. |
fp_outdir |
(str or Path, optional)
|
Output directory for processed flow data. |
fp_inputdir |
(str or Path, optional)
|
Input directory where flow data files reside, if type FROMFILE. |
fp_filename |
(str, optional)
|
Name of input file for file-based profiles if type FROMFILE. |
fp_filepath |
Path
|
Absolute file path for the input file after resolution if type FROMFILE. |
fp_base |
(float, optional)
|
Base flow value if type is VARIABLE. |
fp_peak |
(float, optional)
|
Peak flow value if type is VARIABLE, constant value if type is CONSTANT. |
fp_scale |
(float, optional)
|
Scaling factor for the flow profile if type is FROMFILE. |
fp_inputcolumn |
(str, optional)
|
Column name to read from the file, if type is FROMFILE. |
fp_smoothing |
(str, optional)
|
Smoothing method applied to the flow profile, if type is FROMFILE. |
validate_fields
Ensure that required parameters are provided for the selected flow type.
Raises:
| Type | Description |
|---|---|
ValueError
|
If mandatory attributes for the chosen |
Returns:
| Type | Description |
|---|---|
FlowDataConfig
|
The validated model instance. |
process_config_paths
Resolve relative paths into absolute paths and create missing directories.
Updates the resolved file path and ensures the input/output directories exist.
Returns:
| Type | Description |
|---|---|
FlowDataConfig
|
|