Save
el_paso.save
Attributes
Classes
Functions:
el_paso.save.save
save
Saves variables to files based on the specified saving strategy and time intervals.
This function iterates through defined time intervals, calling the saving strategy to save a set of variables to corresponding files. It handles variable filtering and includes a check for missing data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
variables_dict
|
dict[str, Variable]
|
A dictionary mapping variable names to their
|
required |
saving_strategy
|
SavingStrategy
|
The strategy object that defines how to organize, standardize, and save the data (e.g., file paths, formats). |
required |
start_time
|
datetime
|
The start of the overall time range for which data should be saved. |
required |
end_time
|
datetime
|
The end of the overall time range. |
required |
time_var
|
Variable
|
The variable representing time. If not provided, the saving strategy must handle time internally. Defaults to None. |
None
|
append
|
bool
|
If |
False
|
ignore_validation
|
bool
|
If |
False
|
Raises:
| Type | Description |
|---|---|
TypeError
|
If |
KeyError
|
If |
UserWarning
|
If the saving process is attempted for an output file but one
or more of its required variables are missing from |
Source code in el_paso/save.py
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | |