title: problems writing out to NetCDF
body: <p>has anyone else encountered this problem with writing to NetCDF? I'm running through a lot of climate model data and producing ensemble means, but for some reason on one model the writing out fails but works on all the others. The data looks fine when I plot it.</p>
  <pre class="lang-py prettyprint-override"><code>&lt;xarray.Dataset&gt;
  Dimensions:             (i: 360, j: 300, time: 1032, vertices: 4)
  Coordinates:
    * time                (time) datetime64[ns] 2015-01-16T12:00:00 ... 2100-12...
    * j                   (j) int32 0 1 2 3 4 5 6 ... 293 294 295 296 297 298 299
    * i                   (i) int32 0 1 2 3 4 5 6 ... 353 354 355 356 357 358 359
      latitude            (j, i) float64 dask.array&lt;chunksize=(300, 360), meta=np.ndarray&gt;
      longitude           (j, i) float64 dask.array&lt;chunksize=(300, 360), meta=np.ndarray&gt;
  Dimensions without coordinates: vertices
  Data variables:
      vertices_latitude   (j, i, vertices) float64 dask.array&lt;chunksize=(300, 360, 4), meta=np.ndarray&gt;
      vertices_longitude  (j, i, vertices) float64 dask.array&lt;chunksize=(300, 360, 4), meta=np.ndarray&gt;
      sithick             (time, j, i) float32 dask.array&lt;chunksize=(1032, 300, 360), meta=np.ndarray&gt;
  </code></pre>
  <pre class="lang-py prettyprint-override"><code>ds_emean.to_netcdf(path=file_out,mode='w',format='NETCDF4',compute=True)
  HDF5-DIAG: Error detected in HDF5 (1.12.0) thread 123145549598720:
    #000: H5Dio.c line 192 in H5Dread(): can't read data
      major: Dataset
      minor: Read failed
    #001: H5VLcallback.c line 2080 in H5VL_dataset_read(): dataset read failed
      major: Virtual Object Layer
      minor: Read failed
    #002: H5VLcallback.c line 2046 in H5VL__dataset_read(): dataset read failed
      major: Virtual Object Layer
      minor: Read failed
    #003: H5VLnative_dataset.c line 167 in H5VL__native_dataset_read(): can't read data
      major: Dataset
      minor: Read failed
    #004: H5Dio.c line 567 in H5D__read(): can't read data
      major: Dataset
      minor: Read failed
    #005: H5Dchunk.c line 2594 in H5D__chunk_read(): unable to read raw data chunk
      major: Low-level I/O
      minor: Read failed
    #006: H5Dchunk.c line 3957 in H5D__chunk_lock(): data pipeline read failed
      major: Dataset
      minor: Filter operation failed
    #007: H5Z.c line 1336 in H5Z_pipeline(): filter returned failure during read
      major: Data filters
      minor: Read failed
    #008: H5Zdeflate.c line 123 in H5Z_filter_deflate(): inflate() failed
      major: Data filters
      minor: Unable to initialize object
  Traceback (most recent call last):
  </code></pre>