diff --git a/Load.py b/Load.py index b3adaeb496be9dab6710fad085417662ecc6d359..62ec295c9db1d8ad071b14a16634d352809c0fec 100644 --- a/Load.py +++ b/Load.py @@ -451,15 +451,17 @@ def load(fields, runNB, proposalNB, semesterNB, topic='SCS', display=False, return result def concatenateRuns(runs): - """ Concatenate two runs with identical data variables along the trainId dimension + """ Concatenate a list of two runs with identical data variables along the + trainId dimension. + Input: runs: (list) the xarray Datasets to concatenate Output: a concatenated xarray Dataset """ - keys = runs[0].keys() + keys = sorted(runs[0].keys()) for run in runs[1:]: - if run.keys() != keys: + if sorted(run.keys()) != keys: print('data fields between different runs are not identical. Cannot combine runs.') return