diff --git a/amescap/Spectral_utils.py b/amescap/Spectral_utils.py index 66c4b5c..f609fc7 100644 --- a/amescap/Spectral_utils.py +++ b/amescap/Spectral_utils.py @@ -279,9 +279,9 @@ def extract_diurnal_harmonics(kmx, tmx, varIN, tod, lon): ntime, nlon, nlat, ntod = varIN.shape output_shape = (ntime, kmx, tmx, nlat) if varIN.ndim == 5: - varIN = np.transpose(varIN, (0, 4, 3, 2, 1)) - ntime, nlon, nlat, nlev, ntod = varIN.shape - output_shape = (ntime, kmx, tmx, nlat, nlev) + varIN = np.transpose(varIN, (0, 4, 2, 3, 1)) + ntime, nlon, nlev, nlat, ntod = varIN.shape + output_shape = (ntime, kmx, tmx, nlev, nlat) # Convert longitude to radians if np.max(lon) > 100: diff --git a/bin/MarsFiles.py b/bin/MarsFiles.py index 3aee1fe..38e6bd9 100755 --- a/bin/MarsFiles.py +++ b/bin/MarsFiles.py @@ -2177,6 +2177,7 @@ def main(): # Normalize the data by diurnal mean norm = np.mean(varIN, axis = 1)[:, np.newaxis, ...] + varIN = varIN.filled(0) varIN = varIN/norm ampe, ampw, phasee, phasew = extract_diurnal_harmonics(kmx, tmx, varIN, target_tod, lon)