nctoolkit.DataSet.merge¶
- DataSet.merge(self, join='variables', match=['year', 'month', 'day'])¶
Merge a multi-file ensemble into a single file 2 methods are available. 1) merging files with different variables, but the same time steps. 2) merging files with the same variables, with different times.
- Parameters
join (str) – This defines the type of merging to carry out. “variables”: this will merge by variable, so that an ensemble with different variables, but the same number of time steps is merged to a single file. “time”: this will merge files with the same variables, but different times to a single file, into a single file with ordered times. join defaults to “variables”, and uses partial matches, so “var” will give variable based merging.
match (list, str) – Optional argument when join = ‘variables’. A list or str stating what must match in the netCDF files. Defaults to year/month/day. This list must be some combination of year/month/day. An error will be thrown if the elements of time in match do not match across all netCDF files. The only exception is if there is a single date file in the ensemble.