break down writing to netcdf4 example