read_config⚓︎
Parse config files.
check_mand_keywords_da(keys_da)
⚓︎
Check for mandatory keywords in DATAASSIM
part, and output error if they are not present
check_mand_keywords_en(keys_en)
⚓︎
Check for mandatory keywords in ENSEMBLE
part, and output error if they are not present
check_mand_keywords_fwd(keys_fwd)
⚓︎
Check for mandatory keywords in FWDSIM
part, and output error if they are not present
check_mand_keywords_opt(keys_opt)
⚓︎
Check for mandatory keywords in OPTIM
part, and output error if they are not present
parse_keywords(lines)
⚓︎
Here we parse the lines in the init. file to a Python dictionary. The keys of the dictionary is the keywords in the PIPT init. file, and the information in each keyword is stored in each key of the dictionary. To know how the keyword-information is organized in the keys of the dictionary, confront the manual located in the doc folder.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
lines
|
list
|
List of (clean) lines from the PIPT init. file. |
required |
Returns:
Name | Type | Description |
---|---|---|
keys |
dict
|
Dictionary with all info. from the init. file. |
read_clean_file(init_file)
⚓︎
Read PIPT init. file and lines that are not comments (marked with octothorpe)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
init_file
|
str
|
Name of file to remove all comments. WHOLE filename needed (with suffix!) |
required |
Returns:
Name | Type | Description |
---|---|---|
lines |
list
|
Lines from init. file converted to list entries |
read_toml(init_file)
⚓︎
Read .toml configuration file, parse and output dictionaries for PIPT/POPT
Parameters:
Name | Type | Description | Default |
---|---|---|---|
init_file
|
str
|
toml configuration file |
required |
read_txt(init_file)
⚓︎
Read a PIPT or POPT input file (.pipt or .popt), parse and output dictionaries for data assimilation or optimization, and simulator classes.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
init_file
|
str
|
PIPT init. file containing info. to run the inversion algorithm |
required |
Returns:
Name | Type | Description |
---|---|---|
keys_pr |
dict
|
Parsed keywords from DATAASSIM or OPTIM |
keys_fwd |
dict
|
Parsed keywords from FWDSSIM |