title: Adding unit attributes to an xarray object
body: <p>I have created an array of isobaric pressure levels to plot a cross section:</p>
  
  <pre><code>vertical, = cross['isobaric'].metpy.coordinates('vertical')
  </code></pre>
  
  <p>however, this array has values in units of Pa. To convert into hPa, I created a new array:</p>
  
  <pre><code>vert_hpa = (vertical/100)*units.hPa
  </code></pre>
  
  <p>I then want to use this to calculate potential temperature:</p>
  
  <pre><code>temperature, pressure, relative_humidity = xr.broadcast(cross['temperature'], vert_hpa, cross['relative_humidity'])
  theta = mpcalc.potential_temperature(pressure, temperature)
  </code></pre>
  
  <p>When I attempt to run this, I get an error which suggests that the array I've created and assigned to the variable 'pressure' doesn't have any associated units:</p>
  
  <pre><code>ValueError: `potential_temperature` given arguments with incorrect units: `pressure` requires "[pressure]" but given "dimensionless".
  </code></pre>
  
  <p>The <a href="https://unidata.github.io/MetPy/latest/units.html" rel="nofollow noreferrer">MetPy units documentation</a> suggests that units can be added to an array using the syntax array_name*units.unit. Why has my attempt to do this been unsuccessful?</p>