Skip to content

Commit d5880d2

Browse files
authored
Merge pull request #149 from NASA-Planetary-Science/devel
Update main with bug fix in devel
2 parents 30d14c6 + 3690dfe commit d5880d2

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

amescap/Spectral_utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,9 +279,9 @@ def extract_diurnal_harmonics(kmx, tmx, varIN, tod, lon):
279279
ntime, nlon, nlat, ntod = varIN.shape
280280
output_shape = (ntime, kmx, tmx, nlat)
281281
if varIN.ndim == 5:
282-
varIN = np.transpose(varIN, (0, 4, 3, 2, 1))
283-
ntime, nlon, nlat, nlev, ntod = varIN.shape
284-
output_shape = (ntime, kmx, tmx, nlat, nlev)
282+
varIN = np.transpose(varIN, (0, 4, 2, 3, 1))
283+
ntime, nlon, nlev, nlat, ntod = varIN.shape
284+
output_shape = (ntime, kmx, tmx, nlev, nlat)
285285

286286
# Convert longitude to radians
287287
if np.max(lon) > 100:

bin/MarsFiles.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2177,6 +2177,7 @@ def main():
21772177

21782178
# Normalize the data by diurnal mean
21792179
norm = np.mean(varIN, axis = 1)[:, np.newaxis, ...]
2180+
varIN = varIN.filled(0)
21802181
varIN = varIN/norm
21812182
ampe, ampw, phasee, phasew = extract_diurnal_harmonics(kmx, tmx, varIN, target_tod, lon)
21822183

0 commit comments

Comments
 (0)