title: Set temporary directory: open_mfdataset xarray, dask(?), python
body: <p>I am opening multiple files with xarray.open_mfdataset and storing them again as one dataset. As I am doing so, my temporary directory runs out of memory.</p>
  <p>How do I change the path to the temporary directory?</p>
  <p>My code looks something like:</p>
  <pre><code>    import xarray as xr
  
      with xr.open_mfdataset( my_list_of_filepaths ) as in_data:
  
          out_data = some_data_manipulation( in_data )
  
          out_data.to_netcdf( out_filepath )
  </code></pre>
  <p>I have tried:</p>
  <pre><code>    import dask
      import xarray as xr
  
      with dask.config.set({'temporary_directory': 'path_to_temp_dir'}):
  
          with xr.open_mfdataset( my_list_of_filepaths ) as in_data:
  
              out_data = some_data_manipulation( in_data )
  
              out_data.to_netcdf( out_filepath )
  </code></pre>
  <p>and setting the environment variables TMPDIR, TEMP and TMP to my desired temporary directory without success.</p>
  <p>Thank you!</p>