code: def read_ma_array(self, infile, var_name):
          
          file_obj = self.read_cdf(infile)
  
          # .data is not backwards compatible to old scipy versions, [:] is
          data = file_obj.variables[var_name][:]
  
          # load numpy if available
          try:
              import numpy as np
          except Exception:
              raise ImportError("numpy is required to return masked arrays.")
  
          if hasattr(file_obj.variables[var_name], "_FillValue"):
              # return masked array
              fill_val = file_obj.variables[var_name]._FillValue
              retval = np.ma.masked_where(data == fill_val, data)
          else:
              # generate dummy mask which is always valid
              retval = np.ma.array(data)
  
          return retval
docs: Create a masked array based on cdf's FillValue