Skip to content

Commit

Permalink
bugfix global_ranges
Browse files Browse the repository at this point in the history
  • Loading branch information
ginihumer authored May 10, 2024
1 parent 7c8fa86 commit 95e658b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions reaction_cime/helper_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,12 @@ def preprocess_dataset(df):
def generate_global_ranges(domain):
ranges = {}
for col_sub in time_series_cols_diverging:
global_min = min(domain[[col for col in domain.columns if col_sub in col]].fillna(0).min())
global_max = max(domain[[col for col in domain.columns if col_sub in col]].fillna(0).max())
sub_frame = domain[[col for col in domain.columns if col_sub in col]].fillna(0)
print("---", sub_frame.empty)
if sub_frame.empty:
continue
global_min = min(sub_frame.min())
global_max = max(sub_frame.max())

global_range = max(abs(global_min), abs(global_max))
# global_range = round(global_range) # do we want to be rounded?
Expand Down

0 comments on commit 95e658b

Please sign in to comment.