Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

CLIMATE-860 - Fix dataset_processor.temporal_subset to remove the warning message #398

Merged
merged 1 commit into from
Aug 25, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 2 additions & 4 deletions ocw/dataset_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,8 @@ def temporal_subset(target_dataset, month_start, month_end,
months = np.array([d.month for d in dates])
time_index = []
for m_value in month_index:
time_index = np.append(time_index, np.where(months == m_value)[0])
time_index = np.sort(time_index)

time_index = list(time_index)
time_index.extend(list(np.where(months == m_value)[0]))
time_index.sort()

new_dataset = ds.Dataset(target_dataset.lats,
target_dataset.lons,
Expand Down