code: def load_with_scipy(file, data_name):
      import scipy.io
  
      
  
      logger.debug('Loading data {} of netcdf file {} with scipy.io.'.format(data_name, file))
  
      f = scipy.io.netcdf.netcdf_file(file, 'r')
      data_netcdf = f.variables[data_name]
      data = np.array(data_netcdf.data, copy = True)
      data[data == data_netcdf.missing_value] = np.nan
      f.close()
  
      return data
docs: Loads data from a netcdf file.
  
      Parameters
      ----------
      file : string or file-like
          The name of the netcdf file to open.
      data_name : string
          The name of the data to extract from the netcdf file.
  
      Returns
      -------
      data : ndarray
          The desired data from the netcdf file as ndarray with nan for missing values.