code: def get_dataset(self, key, info):
          
          logger.debug('Reading %s.', key.name)
  
          # Check if file_key is specified in the yaml
          file_key = info.get('file_key', key.name)
  
          variable = self.nc[file_key]
  
          l_step = self.nc.attrs.get('al_subsampling_factor', 1)
          c_step = self.nc.attrs.get('ac_subsampling_factor', 16)
  
          if c_step != 1 or l_step != 1:
              logger.debug('Interpolating %s.', key.name)
  
              # TODO: do it in cartesian coordinates ! pbs at date line and
              # possible
              tie_x = self.cartx['x_tx'].data[0, :][::-1]
              tie_y = self.cartx['y_tx'].data[:, 0]
              full_x = self.cart['x_i' + self.view].data
              full_y = self.cart['y_i' + self.view].data
  
              variable = variable.fillna(0)
  
              from scipy.interpolate import RectBivariateSpline
              spl = RectBivariateSpline(
                  tie_y, tie_x, variable.data[:, ::-1])
  
              valid = np.isfinite(full_y)
  
              interpolated = spl.ev(full_y[valid],
                                    full_x[valid])
  
              values = np.full_like(full_y, np.nan,
                                    dtype=variable.dtype)
  
              values[valid] = interpolated
              values = np.ma.masked_invalid(values, copy=False)
  
              variable = xr.DataArray(da.from_array(values, chunks=(CHUNK_SIZE, CHUNK_SIZE)),
                                      dims=['y', 'x'], attrs=variable.attrs)
  
          variable.attrs['platform_name'] = self.platform_name
          variable.attrs['sensor'] = self.sensor
  
          if 'units' not in variable.attrs:
              variable.attrs['units'] = 'degrees'
  
          variable.attrs.update(key.to_dict())
  
          return variable
docs: Load a dataset