Skip to content

Commit

Permalink
adjust criteria for frequency domain selection to make the selected f…
Browse files Browse the repository at this point in the history
…requency domain to be consistent with that of cdms version
  • Loading branch information
lee1043 committed May 14, 2024
1 parent 240627e commit f455307
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions pcmdi_metrics/mjo/lib/lib_mjo.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,10 +255,10 @@ def calculate_ewr(OEE):
Actual ranges of frequency and wavenumber have been checked and applied.
"""
east_power_domain = OEE.sel(
zonalwavenumber=slice(1, 3), frequency=slice(0.0166667, 0.0333333)
zonalwavenumber=slice(1, 3), frequency=slice(0.016, 0.034)
)
west_power_domain = OEE.sel(
zonalwavenumber=slice(1, 3), frequency=slice(-0.0333333, -0.0166667)
zonalwavenumber=slice(1, 3), frequency=slice(-0.034, -0.016)
)
eastPower = np.average(east_power_domain)
westPower = np.average(west_power_domain)
Expand Down
8 changes: 4 additions & 4 deletions pcmdi_metrics/mjo/lib/plot_wavenumber_frequency_power.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ def plot_power(d: xr.DataArray, title: str, fout: str, ewr=None):
currentAxis = plt.gca()
currentAxis.add_patch(
Rectangle(
(0.0166667, 1),
0.0333333 - 0.0166667,
(0.016, 1),
0.034 - 0.016,
2,
edgecolor="black",
ls="--",
Expand All @@ -97,8 +97,8 @@ def plot_power(d: xr.DataArray, title: str, fout: str, ewr=None):
)
currentAxis.add_patch(
Rectangle(
(-0.0333333, 1),
0.0333333 - 0.0166667,
(-0.034, 1),
0.034 - 0.016,
2,
edgecolor="black",
ls="--",
Expand Down

0 comments on commit f455307

Please sign in to comment.