control_file.py
The control_file object is used to check and read the control file for a run:
Inputs
file_path: the file path of the control file
Attributes
valid_file: a Boolean indicating whether or not the control file path is validkeywords: a hardcoded list of the keywords that should be present in the control fileblanks_okay: a hardcoded list of whether each keyword can be blank (based on order ofkeywords)valid_structure,no_incorrect_blanks: Boolean keywords based on internal checks of the control file formatrun_name: a string representing the run name preferred by the useremissions_path: a string representing the path to the emissions input fileemissions_units: a string representing the units of the emissions dataisrm_path: a string representing the path of the folder storing ISRM numpy layers and geodatapopulation_path: a string representing the path to the population input filecheck: a Boolean indicating whether the program should run, or if it should just check the inputs (useful for debugging)population_path: a string representing the path to the population data fileverbose: a Boolean indicating whether the user wants to run in verbose modeoutput_exposure: a Boolean indicating whether exposure should be outputdetailed_conc: a Boolean indicating whether concentrations should should be output as totals or by pollutant
Internal Functions
check_path: checks if a file exists at the given control file pathget_input_value: gets the input for a given keywordcheck_control_file: runs all of the internal checks to confirm the control file is validget_all_inputs: imports all values from the control fileget_region_dict: loads all of the acceptable values for the various regionsregion_check_helper: a helper function for checking the region of interest and region category inputsout_res_check_helper: a helper function for checking the output resolution inputcheck_inputs: checks that all inputs are valid once imported
External Functions
get_file_path: returns the file path