Skip to content

Commit

Permalink
clean up; potential bug fix that could happen when segment length is …
Browse files Browse the repository at this point in the history
…other than 180
  • Loading branch information
lee1043 committed May 9, 2024
1 parent 6a88bd3 commit 550f4d8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pcmdi_metrics/mjo/lib/mjo_metric_calc.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ def mjo_metric_ewr_calculation(
elif season == "MJJASO":
mon = 5
numYear = endYear - startYear + 1

day = 1

# Store each year's segment in a dictionary: segment[year]
Expand All @@ -103,7 +104,7 @@ def mjo_metric_ewr_calculation(
daSeaCyc = xr.DataArray(
np.zeros((NT, ds[data_var].shape[1], ds[data_var].shape[2])),
dims=["day", "lat", "lon"],
coords={"day": np.arange(180), "lat": lat, "lon": lon},
coords={"day": np.arange(NT), "lat": lat, "lon": lon},
)
daSeaCyc_values = daSeaCyc.values.copy()

Expand Down

0 comments on commit 550f4d8

Please sign in to comment.