spyice.utils package#
Submodules#
Module contents#
- class src.spyice.utils.ConfigSort[source]#
Bases:
objectA class that provides methods for retrieving configuration parameters.
- Parameters:
config (DictConfig) – The configuration dictionary.
- Variables:
config (DictConfig) – The configuration dictionary.
- get_config_params(config
DictConfig): Retrieves configuration parameters using the ‘consts’, ‘dt’, ‘S_IC’, and ‘iter_max’ keys.
- get_ownconfig_params(config)[source]#
Retrieves configuration parameters using the ‘constants’, ‘dt’, ‘S_IC’, and ‘iter_max’ keys.
- getconfig_dataclass(config, config_type='default')[source]#
Retrieves configuration parameters based on the specified config_type.
- Parameters:
config (dataclass)
config_type (str)
- Return type:
dataclass
- __init__(config)[source]#
A class that provides methods for retrieving configuration parameters.
- Parameters:
config (DictConfig) – The configuration dictionary.
- Variables:
config (DictConfig) – The configuration dictionary.
- get_config_params(config
DictConfig): Retrieves configuration parameters using the ‘consts’, ‘dt’, ‘S_IC’, and ‘iter_max’ keys.
- get_config_params(config)[source]#
Get the configuration parameters from the given config dictionary.
- Parameters:
config (DictConfig) – The configuration dictionary.
- Returns:
None
- Raises:
None –
- get_ownconfig_params(config)[source]#
Retrieves the parameters from the given configuration dictionary.
- Parameters:
config (dict) – The configuration dictionary.
- Returns:
None
- classmethod getconfig_dataclass(config, config_type='default')[source]#
Retrieves configuration parameters based on the specified config_type.
- Parameters:
config (dataclass) – The configuration dictionary.
config_type (str) – The type of configuration “default” or “jupyter”. “jupyter” is used for Jupyter notebook configurations.
- Returns:
An instance of the ConfigData class.
- Return type:
- src.spyice.utils.create_output_directory(hyd_dir, initial_salinity, boundary_condition_type, grid_resolution_dz, grid_timestep_dt, max_iterations, output_suffix)[source]#
Creates an output directory for storing temperature data.
- Parameters:
hyd_dir (str) – The directory path where the output directory will be created.
- Returns:
The path of the created output directory.
- Return type:
str
- Raises:
None –