Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ISOMIP+ viz scripts #642

Merged
merged 1 commit into from
Aug 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions testing_and_setup/compass/ocean/isomip_plus/viz/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down