Skip to content

Commit e40561b

Browse files
committed
Merge PR #642 'xylar/update_grizzly_example' into ocean/develop
Fix ISOMIP+ viz scripts #642 This merge fixes a few complaints from xarray in the ISOMIP+ viz package.
2 parents dd86f4e + fc13e03 commit e40561b

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

testing_and_setup/compass/ocean/isomip_plus/viz/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def main():
3737
dsMesh = xarray.open_dataset('{}/init.nc'.format(folder))
3838

3939
ds = xarray.open_mfdataset('{}/timeSeriesStatsMonthly*.nc'.format(folder),
40-
concat_dim='Time')
40+
concat_dim='Time', combine='nested')
4141

4242
if args.streamfunctions:
4343
compute_barotropic_streamfunction(dsMesh, ds, folder)

testing_and_setup/compass/ocean/isomip_plus/viz/plot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def __init__(self, inFolder='.', outFolder='plots', expt=0):
5656

5757
self.ds = xarray.open_mfdataset(
5858
'{}/timeSeriesStatsMonthly*.nc'.format(self.inFolder),
59-
concat_dim='Time')
59+
concat_dim='Time', combine='nested')
6060

6161
try:
6262
os.makedirs(self.outFolder)
@@ -226,7 +226,7 @@ def __init__(self, inFolder='.', outFolder='plots', expt=0,
226226

227227
self.ds = xarray.open_mfdataset(
228228
'{}/timeSeriesStatsMonthly*.nc'.format(self.inFolder),
229-
concat_dim='Time')
229+
concat_dim='Time', combine='nested')
230230

231231
self._compute_section_x_z()
232232

testing_and_setup/compass/ocean/isomip_plus/viz/streamfunction.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,8 @@ def _interpolate_horizontal_transport_zlevel(ds, z, outFileName):
371371

372372
bar.finish()
373373

374-
dsOut = xarray.open_mfdataset(fileNames, concat_dim='Time')
374+
dsOut = xarray.open_mfdataset(fileNames, concat_dim='Time',
375+
combine='nested')
375376

376377
dsOut['xtime_startMonthly'] = ds.xtime_startMonthly
377378
dsOut['xtime_endMonthly'] = ds.xtime_endMonthly
@@ -529,7 +530,7 @@ def _horizontally_bin_overturning_streamfunction(ds, dsMesh, x, osfFileName,
529530

530531
bar.finish()
531532

532-
dsOSF = xarray.open_mfdataset(fileNames, concat_dim='nx')
533+
dsOSF = xarray.open_mfdataset(fileNames, concat_dim='nx', combine='nested')
533534
dsOSF['xtime_startMonthly'] = ds.xtime_startMonthly
534535
dsOSF['xtime_endMonthly'] = ds.xtime_endMonthly
535536
dsOSF['x'] = x

0 commit comments

Comments
 (0)