docs: def is_2d_regular_grid(nc, variable):
      '''
      Returns True if the variable is a 2D Regular grid.
  
      :param netCDF4.Dataset nc: An open netCDF dataset
      :param str variable: name of the variable to check
      '''
      # x(x), y(y), t(t)
      # X(t, y, x)
  
      dims = nc.variables[variable].dimensions
  
      cmatrix = coordinate_dimension_matrix(nc)
  
      for req in ('x', 'y', 't'):
          if req not in cmatrix:
              return False
  
      x = get_lon_variable(nc)
      y = get_lat_variable(nc)
      t = get_time_variable(nc)
  
      if cmatrix['x'] != (x,):
          return False
      if cmatrix['y'] != (y,):
          return False
      if cmatrix['t'] != (t,):
          return False
  
      # Relaxed dimension ordering
      if len(dims) == 3 and x in dims and y in dims and t in dims:
          return True
      return False