#NEWLINE# def concat( objs , dim = None , data_vars = 'all' , coords = 'different' , compat = 'equals' , positions = None , indexers = None , mode = None , concat_over = None ) : #NEWLINE# #INDENT# "Concatenate xarray objects along a new or existing dimension.\n\n    Parameters\n    ----------\n    objs : sequence of Dataset and DataArray objects\n        xarray objects to concatenate together. Each object is expected to\n        consist of variables and coordinates with matching shapes except for\n        along the concatenated dimension.\n    dim : str or DataArray or pandas.Index\n        Name of the dimension to concatenate along. This can either be a new\n        dimension name, in which case it is added along axis=0, or an existing\n        dimension name, in which case the location of the dimension is\n        unchanged. If dimension is provided as a DataArray or Index, its name\n        is used as the dimension to concatenate along and the values are added\n        as a coordinate.\n    data_vars : {'minimal', 'different', 'all' or list of str}, optional\n        These data variables will be concatenated together:\n          * 'minimal': Only data variables in which the dimension already\n            appears are included.\n          * 'different': Data variables which are not equal (ignoring\n            attributes) across all datasets are also concatenated (as well as\n            all for which dimension already appears). Beware: this option may\n            load the data payload of data variables into memory if they are not\n            already loaded.\n          * 'all': All data variables will be concatenated.\n          * list of str: The listed data variables will be concatenated, in\n            addition to the 'minimal' data variables.\n        If objects are DataArrays, data_vars must be 'all'.\n    coords : {'minimal', 'different', 'all' o list of str}, optional\n        These coordinate variables will be concatenated together:\n          * 'minimal': Only coordinates in which the dimension already appears\n            are included.\n          * 'different': Coordinates which are not equal (ignoring attributes)\n            across all datasets are also concatenated (as well as all for which\n            dimension already appears). Beware: this option may load the data\n            payload of coordinate variables into memory if they are not already\n            loaded.\n          * 'all': All coordinate variables will be concatenated, except\n            those corresponding to other dimensions.\n          * list of str: The listed coordinate variables will be concatenated,\n            in addition the 'minimal' coordinates.\n    compat : {'equals', 'identical'}, optional\n        String indicating how to compare non-concatenated variables and\n        dataset global attributes for potential conflicts. 'equals' means\n        that all variable values and dimensions must be the same;\n        'identical' means that variable attributes and global attributes\n        must also be equal.\n    positions : None or list of integer arrays, optional\n        List of integer arrays which specifies the integer positions to which\n        to assign each dataset along the concatenated dimension. If not\n        supplied, objects are concatenated in the provided order.\n    indexers, mode, concat_over : deprecated\n\n    Returns\n    -------\n    concatenated : type of objs\n\n    See also\n    --------\n    auto_combine\n    " #NEWLINE# from . dataset import Dataset #NEWLINE# from . dataarray import DataArray #NEWLINE# try : #NEWLINE# #INDENT# ( first_obj , objs ) = utils . peek_at ( objs ) #NEWLINE# #UNINDENT# except StopIteration : #NEWLINE# #INDENT# raise ValueError ( 'must supply at least one object to concatenate' ) #NEWLINE# #UNINDENT# if ( dim is None ) : #NEWLINE# #INDENT# warnings . warn ( "the `dim` argument to `concat` will be required in a future version of xarray; for now, setting it to the old default of 'concat_dim'" , FutureWarning , stacklevel = 2 ) #NEWLINE# dim = 'concat_dims' #NEWLINE# #UNINDENT# if ( indexers is not None ) : #NEWLINE# #INDENT# warnings . warn ( 'indexers has been renamed to positions; the alias will be removed in a future version of xarray' , FutureWarning , stacklevel = 2 ) #NEWLINE# positions = indexers #NEWLINE# #UNINDENT# if ( mode is not None ) : #NEWLINE# #INDENT# raise ValueError ( '`mode` is no longer a valid argument to xarray.concat; it has been split into the `data_vars` and `coords` arguments' ) #NEWLINE# #UNINDENT# if ( concat_over is not None ) : #NEWLINE# #INDENT# raise ValueError ( '`concat_over` is no longer a valid argument to xarray.concat; it has been split into the `data_vars` and `coords` arguments' ) #NEWLINE# #UNINDENT# if isinstance ( first_obj , DataArray ) : #NEWLINE# #INDENT# f = _dataarray_concat #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( first_obj , Dataset ) : #NEWLINE# #INDENT# f = _dataset_concat #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise TypeError ( ( 'can only concatenate xarray Dataset and DataArray objects, got %s' % type ( first_obj ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# return f ( objs , dim , data_vars , coords , compat , positions )