|
MONC
|
Parses a configuration file and loads the contents into the options database which can then be interogated by components in the model. More...
Functions/Subroutines | |
| subroutine, public | parse_configuration_file (options_database, user_configuration_file) |
| Parses a specific configuration and adds the contents into the options database. More... | |
| recursive subroutine | process_configuration_file (options_database, filename, is_user_file, file_id) |
| Will actually open a specific file and read it in line by line, parsing this and storing the configuration options. More... | |
| recursive subroutine | process_configuration_line (options_database, raw_line, is_user_file, found_global) |
| Processes a line from the configuration file, breaks it up into its key and value and depending upon the specifics of the line it will store it in the options database in a variety of ways. More... | |
| logical function | parse_global_configuration_if_available (options_database) |
| Parses the global configuration file if it is available and calls on to add all of this to the options database. More... | |
| logical function | has_multiple_values (configuration_value) |
| Determines if a specific string contains multiple values such as str1, str2, str3. More... | |
| subroutine | get_mode_and_split_points_from_line (raw_line, mode, start_split, end_split) |
| Processes a line to determine the mode (replace or additive) and where the split point is between the key and value. More... | |
| subroutine | handle_array_element_set (options_database, config_key, config_value, mode) |
| Handles setting a specific array element, when the key has something like k(n) - n being the index to set. More... | |
| integer function | get_key_array_index (config_key) |
| Given a configuration key of the form k(n), this returns the n. More... | |
| logical function | is_key_array_index_specifier (config_key) |
| Determines whether a configuration key represents a specific array element, i.e. is of the form k(n) More... | |
| subroutine | process_configuration_array (options_database, config_key, config_value, mode) |
| Will process a configuration array of values such as v1,v2,v3,v4. More... | |
| subroutine | store_configuration (options_database, config_key, config_value, array_index) |
| Stores a specific configuration by determining the type of a value and calling on to the options database for storage. More... | |
| character(len=len(string_value)) function | remove_string_quotation (string_value) |
| Removes quotations from a string if these are included, regardless of before it will return the contents i.e. "abc" = abc, hg"abc"re = abc. More... | |
Variables | |
| integer, parameter | user_file_id =15 |
| integer, parameter | global_file_id =16 |
Parses a configuration file and loads the contents into the options database which can then be interogated by components in the model.
|
private |
Given a configuration key of the form k(n), this returns the n.
| config_key | The configuration key to parse and extract the index from |
Definition at line 197 of file configurationfileparser.F90.

|
private |
Processes a line to determine the mode (replace or additive) and where the split point is between the key and value.
| raw_line | The raw configuration line to process The mode, 1=replace, 2=additive and 0=none (unparsable) |
| start_split | The last element before the split, i.e. the key is up to and including this element |
| end_split | The element after the split, i.e. the value is this key to the end |
Definition at line 145 of file configurationfileparser.F90.

|
private |
Handles setting a specific array element, when the key has something like k(n) - n being the index to set.
| options_database | The options database |
| config_key | The configuration key including the index |
| config_value | The configuration value to set |
| mode | Whether this is replace or additive |
Definition at line 175 of file configurationfileparser.F90.


|
private |
Determines if a specific string contains multiple values such as str1, str2, str3.
| configuration_value | The string value |
Definition at line 132 of file configurationfileparser.F90.

|
private |
Determines whether a configuration key represents a specific array element, i.e. is of the form k(n)
| config_key | The configuration key to check |
Definition at line 217 of file configurationfileparser.F90.

| subroutine, public configuration_file_parser_mod::parse_configuration_file | ( | type(hashmap_type), intent(inout) | options_database, |
| character(*), intent(in) | user_configuration_file | ||
| ) |
Parses a specific configuration and adds the contents into the options database.
| options_database | The options database |
| user_configuration_file | Filename of the initial (user) configuration file to open and process |
Definition at line 27 of file configurationfileparser.F90.


|
private |
Parses the global configuration file if it is available and calls on to add all of this to the options database.
| options_database | The options database |
Definition at line 116 of file configurationfileparser.F90.


|
private |
Will process a configuration array of values such as v1,v2,v3,v4.
| options_database | The options database |
| config_key | The configuration key |
| config_value | The values each separated by comma The mode to use for storage, 1=insert, 2=additive |
Definition at line 238 of file configurationfileparser.F90.


|
private |
Will actually open a specific file and read it in line by line, parsing this and storing the configuration options.
| options_database | The options database |
| filename | Name of file to open |
| is_user_file | Whether or not this is the user configuration file or not |
| file_id | The ID to use in the open call |
Definition at line 42 of file configurationfileparser.F90.


|
private |
Processes a line from the configuration file, breaks it up into its key and value and depending upon the specifics of the line it will store it in the options database in a variety of ways.
| options_database | The options database |
| raw_line | The raw text line to process |
| is_user_file | Whether this line was read from the user file or not |
| found_global | Whether or not we have found the global configuration file |
Definition at line 83 of file configurationfileparser.F90.


|
private |
Removes quotations from a string if these are included, regardless of before it will return the contents i.e. "abc" = abc, hg"abc"re = abc.
| string_value | The string value which may or may not contain string quotation marks |
Definition at line 337 of file configurationfileparser.F90.

|
private |
Stores a specific configuration by determining the type of a value and calling on to the options database for storage.
| options_database | The options database |
| config_key | The configuration key |
| config_value | The configuration value |
| array_index | The index in the array to insert the element into |
Definition at line 280 of file configurationfileparser.F90.


|
private |
Definition at line 17 of file configurationfileparser.F90.
|
private |
Definition at line 17 of file configurationfileparser.F90.
1.8.14