diff --git a/mpas_analysis/ocean/streamfunction_moc.py b/mpas_analysis/ocean/streamfunction_moc.py index d9ff263b2..5fcea4f2a 100644 --- a/mpas_analysis/ocean/streamfunction_moc.py +++ b/mpas_analysis/ocean/streamfunction_moc.py @@ -1538,7 +1538,7 @@ def _compute_moc(latBins, nz, latCell, regionCellMask, transportZ, """compute meridionally integrated MOC streamfunction""" mocTop = np.zeros([np.size(latBins), nz + 1]) - mocTop[0, range(1, nz + 1)] = transportZ.cumsum() + mocTop[0, nz-1:-1:-1] = - transportZ[nz-1:-1:-1].cumsum() for iLat in range(1, np.size(latBins)): indlat = np.logical_and(np.logical_and( regionCellMask == 1, latCell >= latBins[iLat - 1]),