diff --git a/testing_and_setup/compass/ocean/isomip_plus/viz/__main__.py b/testing_and_setup/compass/ocean/isomip_plus/viz/__main__.py index 52136ca259..d43fcde650 100644 --- a/testing_and_setup/compass/ocean/isomip_plus/viz/__main__.py +++ b/testing_and_setup/compass/ocean/isomip_plus/viz/__main__.py @@ -37,7 +37,7 @@ def main(): dsMesh = xarray.open_dataset('{}/init.nc'.format(folder)) ds = xarray.open_mfdataset('{}/timeSeriesStatsMonthly*.nc'.format(folder), - concat_dim='Time') + concat_dim='Time', combine='nested') if args.streamfunctions: compute_barotropic_streamfunction(dsMesh, ds, folder) diff --git a/testing_and_setup/compass/ocean/isomip_plus/viz/plot.py b/testing_and_setup/compass/ocean/isomip_plus/viz/plot.py index 1484603c38..2b8c34838c 100644 --- a/testing_and_setup/compass/ocean/isomip_plus/viz/plot.py +++ b/testing_and_setup/compass/ocean/isomip_plus/viz/plot.py @@ -56,7 +56,7 @@ def __init__(self, inFolder='.', outFolder='plots', expt=0): self.ds = xarray.open_mfdataset( '{}/timeSeriesStatsMonthly*.nc'.format(self.inFolder), - concat_dim='Time') + concat_dim='Time', combine='nested') try: os.makedirs(self.outFolder) @@ -226,7 +226,7 @@ def __init__(self, inFolder='.', outFolder='plots', expt=0, self.ds = xarray.open_mfdataset( '{}/timeSeriesStatsMonthly*.nc'.format(self.inFolder), - concat_dim='Time') + concat_dim='Time', combine='nested') self._compute_section_x_z() diff --git a/testing_and_setup/compass/ocean/isomip_plus/viz/streamfunction.py b/testing_and_setup/compass/ocean/isomip_plus/viz/streamfunction.py index f0e9e49bac..b42cb6caa3 100644 --- a/testing_and_setup/compass/ocean/isomip_plus/viz/streamfunction.py +++ b/testing_and_setup/compass/ocean/isomip_plus/viz/streamfunction.py @@ -371,7 +371,8 @@ def _interpolate_horizontal_transport_zlevel(ds, z, outFileName): bar.finish() - dsOut = xarray.open_mfdataset(fileNames, concat_dim='Time') + dsOut = xarray.open_mfdataset(fileNames, concat_dim='Time', + combine='nested') dsOut['xtime_startMonthly'] = ds.xtime_startMonthly dsOut['xtime_endMonthly'] = ds.xtime_endMonthly @@ -529,7 +530,7 @@ def _horizontally_bin_overturning_streamfunction(ds, dsMesh, x, osfFileName, bar.finish() - dsOSF = xarray.open_mfdataset(fileNames, concat_dim='nx') + dsOSF = xarray.open_mfdataset(fileNames, concat_dim='nx', combine='nested') dsOSF['xtime_startMonthly'] = ds.xtime_startMonthly dsOSF['xtime_endMonthly'] = ds.xtime_endMonthly dsOSF['x'] = x