code: def get_daily_events(da, da_value, operator):
      r
      events = operator(da, da_value) * 1
      events = events.where(~np.isnan(da))
      events = events.rename('events')
      return events
docs: r"""
      function that returns a 0/1 mask when a condition is True or False
  
      the function returns 1 where operator(da, da_value) is True
                           0 where operator(da, da_value) is False
                           nan where da is nan
  
      Parameters
      ----------
      da : xarray.DataArray
      da_value : float
      operator : string
  
  
      Returns
      -------
      xarray.DataArray