title: Python xarray xr.open_mfdataset error "ValueError: Could not find any dimension coordinates to use to order the datasets for concatenation"
body: <p>I am facing an issue using xarray xr.open_mfdataset. I assume it happens because my netcdf files do not have a time dimension (daily mean values; only one timestep each file). However; I do not understand how I could merge the files despite this? The files have the same lat and lon dimensions. Any suggestion? Many thanks for hints! Please find my code + netcdf file description + error message below.</p>
  <p>CODE:</p>
  <pre><code>%matplotlib inline
  import xarray as xr
  import numpy as np
  import matplotlib.pyplot as plt
  import os
  import warnings
  from shapely.geometry.polygon import LinearRing
  from matplotlib import gridspec
  
  MYPATH = os.path.join(&quot;C:\\&quot;,&quot;Users&quot;,&quot;Judith Marina&quot;,&quot;phd&quot;,&quot;Data&quot;,&quot;Satellite_data&quot;,&quot;NorthSea_Storms&quot;)
  print(MYPATH)
  input_root = os.path.join(MYPATH,&quot;Xaver_AQUA_MODIS_L3_NSST&quot;)
  print(input_root)
  
  dir_list = os.listdir(input_root)
  print(&quot;Files and directories in '&quot;, input_root, &quot;' :&quot;)
  #prints all files
  print(dir_list)
  
  ds = xr.open_mfdataset(dir_list)
  </code></pre>
  <p>ERROR MESSAGE:</p>
  <pre><code>---------------------------------------------------------------------------
  ValueError                                Traceback (most recent call last)
  C:\Users\JUDITH~2\AppData\Local\Temp/ipykernel_6028/798315470.py in &lt;module&gt;
  ----&gt; 1 ds = xr.open_mfdataset(dir_list)
  
  ~\miniconda3\lib\site-packages\xarray\backends\api.py in open_mfdataset(paths, chunks, concat_dim, compat, preprocess, engine, data_vars, coords, combine, parallel, join, attrs_file, combine_attrs, **kwargs)
      934             # Redo ordering from coordinates, ignoring how they were ordered
      935             # previously
  --&gt; 936             combined = combine_by_coords(
      937                 datasets,
      938                 compat=compat,
  
  ~\miniconda3\lib\site-packages\xarray\core\combine.py in combine_by_coords(data_objects, compat, data_vars, coords, fill_value, join, combine_attrs, datasets)
      973         concatenated_grouped_by_data_vars = []
      974         for vars, datasets_with_same_vars in grouped_by_vars:
  --&gt; 975             concatenated = _combine_single_variable_hypercube(
      976                 list(datasets_with_same_vars),
      977                 fill_value=fill_value,
  
  ~\miniconda3\lib\site-packages\xarray\core\combine.py in _combine_single_variable_hypercube(datasets, fill_value, data_vars, coords, compat, join, combine_attrs)
      624         )
      625 
  --&gt; 626     combined_ids, concat_dims = _infer_concat_order_from_coords(list(datasets))
      627 
      628     if fill_value is None:
  
  ~\miniconda3\lib\site-packages\xarray\core\combine.py in _infer_concat_order_from_coords(datasets)
      142 
      143     if len(datasets) &gt; 1 and not concat_dims:
  --&gt; 144         raise ValueError(
      145             &quot;Could not find any dimension coordinates to use to &quot;
      146             &quot;order the datasets for concatenation&quot;
  
  ValueError: Could not find any dimension coordinates to use to order the datasets for concatenation
  </code></pre>
  <p>NETCDF FILE CHARACTERISTICS</p>
  <pre><code>File.variables.keys()
  KeysView(Frozen({'sst': &lt;xarray.Variable (lat: 4320, lon: 8640)&gt;
  [37324800 values with dtype=float32]
  Attributes:
      long_name:      Sea Surface Temperature
      units:          degree_C
      standard_name:  sea_surface_temperature
      valid_min:      [-1000]
      valid_max:      [10000]
      display_scale:  linear
      display_min:    [-2.]
      display_max:    [45.], 'qual_sst': &lt;xarray.Variable (lat: 4320, lon: 8640)&gt;
  [37324800 values with dtype=float32]
  Attributes:
      long_name:  Quality Levels, Sea Surface Temperature
      valid_min:  [0]
      valid_max:  [5], 'lat': &lt;xarray.IndexVariable 'lat' (lat: 4320)&gt;
  array([ 89.979164,  89.9375  ,  89.89583 , ..., -89.895836, -89.93751 ,
         -89.97918 ], dtype=float32)
  Attributes:
      long_name:      Latitude
      units:          degrees_north
      standard_name:  latitude
      valid_min:      [-90.]
      valid_max:      [90.], 'lon': &lt;xarray.IndexVariable 'lon' (lon: 8640)&gt;
  array([-179.97917, -179.9375 , -179.89584, ...,  179.89583,  179.93752,
          179.97917], dtype=float32)
  Attributes:
      long_name:      Longitude
      units:          degrees_east
      standard_name:  longitude
      valid_min:      [-180.]
      valid_max:      [180.], 'palette': &lt;xarray.Variable (rgb: 3, eightbitcolor: 256)&gt;
  array([[ 91,  10, 118, ..., 238, 223,   8],
         [237, 216,   8, ...,   8, 224, 127],
         [  8, 224, 119, ...,   0,   0,   0]], dtype=uint8)}))
  </code></pre>