created class/function to save arr to netcdf4