fixes for netcdf, fixes for write to txt not json serializable error (skips over it)