Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/lee1043 mov modularize #1062

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Merge branch 'feature/1012_lee1043_stats-MoV_xcdat' into feature/lee1…
…043-mov-modularize
  • Loading branch information
lee1043 committed Feb 26, 2024
commit ae027794203048c9ab58d5ce626376412dbc70ab
6 changes: 2 additions & 4 deletions pcmdi_metrics/variability_mode/lib/lib_variability_mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,9 @@ def subset_time(
if not isinstance(eyear, int):
eyear = int(eyear)

# First trimming
time1 = f"{syear}-01-01 00:00:00"
time2 = f"{eyear}-12-{eday} 23:59:59"
time_tuple = (time1, time2)

# First trimming
ds = select_subset(ds, time=(time1, time2))

# Check available time window and adjust again if needed
Expand All @@ -166,10 +164,10 @@ def subset_time(
"data_syear: " + str(data_syear) + " data_eyear: " + str(data_eyear), debug
)

# Second trimming
if adjust_time_length:
time1 = f"{data_syear}-01-01 00:00:00"
time2 = f"{data_eyear}-12-{eday} 23:59:59"
# Second trimming
ds = select_subset(ds, time=(time1, time2))

return ds
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.