It's already in the NB: just use Arviz: arviz.to_netcdf, and then arviz.from_netcdf
arviz.to_netcdf
arviz.from_netcdf