Adjusting code to allow global ensembles