ENH: write netCDF files