gordias.datahandling.prepare_input_data#
- gordias.datahandling.prepare_input_data(datafiles: list[str], configuration: dict[str, Any] | None = None) CubeList#
Produce a
iris.cube.CubeListwith one cube per variable.Loads the data from all input files and merges them into one cube per variable. In the process, there might be potentially conflicting global attributes that cannot be merged. To transfer global attributes a configuration file can be given as an input to the configuration input parameter. If no configuration is given, the content of the cubes will be equalized by removing the attributes that conflict. If the given datafiles cannot be concatenated into a single cube per variable, the function raises a
ValueError.- Parameters:
- Returns:
A list of cubes, one per variable, referencing the corresponding data from all the input files.
- Return type:
- Raises:
ValueError – If the given data can not be concatenated into one cube per variable. In this case, it is advised to investigate the problem by loading the same set of files in an interactive session with iris. Additionally a description of the differences found when comparing the cubes are logged.