Skip to content

Commit

Permalink
cleaned up
Browse files Browse the repository at this point in the history
  • Loading branch information
lee1043 committed May 15, 2024
1 parent f455307 commit 2e95b74
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions pcmdi_metrics/mjo/lib/lib_mjo.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def generate_axes_and_decorate(Power, NT: int, NL: int) -> xr.DataArray:
return da


def output_power_spectra(NL: int, NT: int, Power):
def output_power_spectra(NL: int, NT: int, Power, debug: bool = False):
"""
Below code taken and modified from Daehyun Kim's Fortran code (MSD/level_2/sample/stps/stps.sea.f.sample)
"""
Expand Down Expand Up @@ -224,10 +224,13 @@ def output_power_spectra(NL: int, NT: int, Power):
)

# Transpose for visualization
# OEE = np.transpose(OEE, (1, 0))
print("before transpose, OEE.shape:", OEE.shape)
if debug:
print("before transpose, OEE.shape:", OEE.shape)

transposed_OEE = OEE.transpose()
print("after transpose, transposed_OEE.shape:", transposed_OEE.shape)

if debug:
print("after transpose, transposed_OEE.shape:", transposed_OEE.shape)
return transposed_OEE

# return OEE
Expand Down

0 comments on commit 2e95b74

Please sign in to comment.