Error on using xarray open_mfdataset function
<p>I am trying to combine multiple netCDF files with the same dimensions, their dimensions are as follows:</p>

<pre><code>OrderedDict([(u'lat', &lt;type 'netCDF4._netCDF4.Dimension'&gt;: name = 'lat', size = 720
), (u'lon', &lt;type 'netCDF4._netCDF4.Dimension'&gt;: name = 'lon', size = 1440
), (u'time', &lt;type 'netCDF4._netCDF4.Dimension'&gt;: name = 'time', size = 96
), (u'nv', &lt;type 'netCDF4._netCDF4.Dimension'&gt;: name = 'nv', size = 2
)])
OrderedDict([(u'lat', &lt;type 'netCDF4._netCDF4.Dimension'&gt;: name = 'lat', size = 720
), (u'lon', &lt;type 'netCDF4._netCDF4.Dimension'&gt;: name = 'lon', size = 1440
), (u'time', &lt;type 'netCDF4._netCDF4.Dimension'&gt;: name = 'time', size = 96
), (u'nv', &lt;type 'netCDF4._netCDF4.Dimension'&gt;: name = 'nv', size = 2
)])
OrderedDict([(u'lat', &lt;type 'netCDF4._netCDF4.Dimension'&gt;: name = 'lat', size = 720
), (u'lon', &lt;type 'netCDF4._netCDF4.Dimension'&gt;: name = 'lon', size = 1440
), (u'time', &lt;type 'netCDF4._netCDF4.Dimension'&gt;: name = 'time', size = 96
), (u'nv', &lt;type 'netCDF4._netCDF4.Dimension'&gt;: name = 'nv', size = 2
)])
OrderedDict([(u'lat', &lt;type 'netCDF4._netCDF4.Dimension'&gt;: name = 'lat', size = 720
), (u'lon', &lt;type 'netCDF4._netCDF4.Dimension'&gt;: name = 'lon', size = 1440
), (u'time', &lt;type 'netCDF4._netCDF4.Dimension'&gt;: name = 'time', size = 96
), (u'nv', &lt;type 'netCDF4._netCDF4.Dimension'&gt;: name = 'nv', size = 2
)])
OrderedDict([(u'lat', &lt;type 'netCDF4._netCDF4.Dimension'&gt;: name = 'lat', size = 720
), (u'lon', &lt;type 'netCDF4._netCDF4.Dimension'&gt;: name = 'lon', size = 1440
), (u'time', &lt;type 'netCDF4._netCDF4.Dimension'&gt;: name = 'time', size = 96
), (u'nv', &lt;type 'netCDF4._netCDF4.Dimension'&gt;: name = 'nv', size = 2
)])
OrderedDict([(u'lat', &lt;type 'netCDF4._netCDF4.Dimension'&gt;: name = 'lat', size = 720
), (u'lon', &lt;type 'netCDF4._netCDF4.Dimension'&gt;: name = 'lon', size = 1440
), (u'time', &lt;type 'netCDF4._netCDF4.Dimension'&gt;: name = 'time', size = 96
), (u'nv', &lt;type 'netCDF4._netCDF4.Dimension'&gt;: name = 'nv', size = 2
)])
OrderedDict([(u'lat', &lt;type 'netCDF4._netCDF4.Dimension'&gt;: name = 'lat', size = 720
), (u'lon', &lt;type 'netCDF4._netCDF4.Dimension'&gt;: name = 'lon', size = 1440
), (u'time', &lt;type 'netCDF4._netCDF4.Dimension'&gt;: name = 'time', size = 96
), (u'nv', &lt;type 'netCDF4._netCDF4.Dimension'&gt;: name = 'nv', size = 2
)])
</code></pre>

<p>However, on using open_mfdataset, I get this error:</p>

<pre><code>xr.open_mfdataset(path_file, decode_times=False)

*** ValueError: cannot infer dimension to concatenate: supply the ``concat_dim`` argument explicitly
</code></pre>

<p>How to fix this error? My dimensions are the same in all the files</p>

<p><a href="http://xarray.pydata.org/en/stable/generated/xarray.open_mfdataset.html" rel="nofollow">http://xarray.pydata.org/en/stable/generated/xarray.open_mfdataset.html</a></p>

<pre><code>xarray.open_mfdataset(paths, chunks=None, concat_dim=None, preprocess=None, engine=None, lock=None, **kwargs)
</code></pre>

<p>It looks like it needs you to give a <code>concat_dim</code> parameter.  It's having problems inferring it from your data.</p>

<blockquote>
  <p>Dimension to concatenate files along. This argument is passed on to xarray.auto_combine() along with the dataset objects. You only need to provide this argument if the dimension along which you want to concatenate is not a dimension in the original datasets, e.g., if you want to stack a collection of 2D arrays along a third dimension.</p>
</blockquote>

<p>Are these 3d arrays that you want to stack along a new, 4th, dimension?</p>

python numpy netcdf python-xarray netcdf4