title: options for saving xarray dataset with to_netcdf
body: <p>I would like to add units, long_name, and maybe a description to a variable while using the to_netcdf command. Let me know if you know how. </p>
  
  <p>Here is my code that work:</p>
  
  <pre><code>filename = path+'file.nc'
  
  ds = xr.Dataset({'sla': (('time_counter','x', 'y'), SLA)}, coords={'time_counter':time_counter,'nav_lon':(('x','y'),lon),'nav_lat':(('x','y'),lat)})
  
  ds.to_netcdf(filename, 'w')
  </code></pre>
  
  <p>Supplementary informations if you want to use this:</p>
  
  <ul>
  <li>'sla' is the name I give while saving the variable SLA</li>
  <li>SLA has 3 dimensions; I give them the names 'time_counter', 'x', and 'y'</li>
  <li>I defined coordinates, one of which ('time_counter') is directly a dimension of SLA, but also it is possible to have a coordinate with multiple dimensions (e.g., 'nav_lon' and 'nav_lat' have 2 dimensions.</li>
  <li>Here is the link that explain the function: <a href="http://xarray.pydata.org/en/stable/generated/xarray.Dataset.to_netcdf.html" rel="nofollow noreferrer">http://xarray.pydata.org/en/stable/generated/xarray.Dataset.to_netcdf.html</a></li>
  </ul>