pvcompare.check_inputs.add_location_and_year_to_project_data¶
- pvcompare.check_inputs.add_location_and_year_to_project_data(user_inputs_mvs_directory, static_inputs_directory, latitude, longitude, country, year)[source]¶
Matches user input for year, latitude, longitude and country with mvs_inputs.
If location (latitude, longitude, country) and year are entered as user input, the according parameters in ‘mvs_inputs/csv_elements’ are overwritten. If one of the location elements is None, an error is returned. If location or year is None, the according parameter is loaded from ‘mvs_inputs/csv_elements’. Finally, it is checked whether country and year are valid.
- Parameters
user_inputs_mvs_directory (str or None) – Path to MVS specific input directory. If None, constants.DEFAULT_USER_INPUTS_MVS_DIRECTORY is used.
static_inputs_directory (str or None) – Path to pvcompare static inputs. If None, constants.DEFAULT_STATIC_INPUTS_DIRECTORY is used. Default: None.
latitude (float) – Latitude of the location.
longitude (float) – Longitude of the location.
country (str) – Country of the location.
year (int) – Year of the simulation.
- Returns
Latitude (float) – Latitude of the location.
Longitude (float) – Longitude of the location.
country (str) – Country of the location.
year (int) – Year of the simulation.