# xarray.Variable.concat

#### *classmethod* Variable.concat(variables, dim='concat_dim', positions=None, shortcut=False, combine_attrs='override')[[source]](https://github.com/pydata/xarray/blob/main/xarray/core/variable.py#L2027-L2115)

Concatenate variables along a new or existing dimension.

* **Parameters:**
  * **variables** ([iterable](https://docs.python.org/3/glossary.html#term-iterable) of [`Variable`](xarray.Variable.html.md#xarray.Variable)) – Arrays to stack together. Each variable is expected to have
    matching dimensions and shape except for along the stacked
    dimension.
  * **dim** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str) or [`DataArray`](xarray.DataArray.html.md#xarray.DataArray), *optional*) – Name of the dimension to stack along. This can either be a new
    dimension name, in which case it is added along axis=0, or an
    existing dimension name, in which case the location of the
    dimension is unchanged. Where to insert the new dimension is
    determined by the first variable.
  * **positions** ([`None`](https://docs.python.org/3/builtins/constants.html#None) or [`list`](https://docs.python.org/3/builtins/stdtypes.html#list) of [array-like](https://numpy.org/doc/stable/glossary.html#term-array_like), *optional*) – List of integer arrays which specifies the integer positions to
    which to assign each dataset along the concatenated dimension.
    If not supplied, objects are concatenated in the provided order.
  * **shortcut** ([`bool`](https://docs.python.org/3/builtins/functions.html#bool), *optional*) – This option is used internally to speed-up groupby operations.
    If shortcut is True, some checks of internal consistency between
    arrays to concatenate are skipped.
  * **combine_attrs** (`{"drop", "identical", "no_conflicts", "drop_conflicts", "override"}`, *default*: `"override"`) – String indicating how to combine attrs of the objects being merged:
    - “drop”: empty attrs on returned Dataset.
    - “identical”: all attrs must be the same on every object.
    - “no_conflicts”: attrs from all objects are combined, any that have
      the same name must also have the same value.
    - “drop_conflicts”: attrs from all objects are combined, any that have
      the same name but different values are dropped.
    - “override”: skip comparing and copy attrs from the first dataset to
      the result.
* **Returns:**
  **stacked** ([`Variable`](xarray.Variable.html.md#xarray.Variable)) – Concatenated Variable formed by stacking all the supplied variables
  along the given dimension.
