title: boolean indexing in xarray
body: <p>I have some arrays with dims <code>'time', 'lat', 'lon'</code> and some with just <code>'lat', 'lon'</code>. I often have to do this in order to mask time-dependent data with a 2d (lat-lon) mask:</p>
  
  <pre><code>x.data[:, mask.data] = np.nan
  </code></pre>
  
  <p>Of course, computations broadcast as expected. If <code>y</code> is 2d lat-lon data, its values are broadcast to all time coordinates in x:</p>
  
  <pre><code>z = x + y
  </code></pre>
  
  <p>But indexing doesn't broadcast as I'd expect. I'd like to be able to do this, but it raises <em>ValueError: Buffer has wrong number of dimensions</em>:</p>
  
  <pre><code>x[mask] = np.nan
  </code></pre>
  
  <p>Lastly, it seems that <code>xr.where</code> <em>does</em> broadcast the values of the mask across time coordinates as expected, but you can't set values this way.</p>
  
  <pre><code>x_masked = x.where(mask)
  </code></pre>
  
  <p>So, is there something I'm missing here that facilitates setting values using a boolean mask that is missing dimensions (and needs to be broadcast)? Is the option I provided at the top really the way to do this (in which case, I might as well just be using standard numpy arrays...)</p>