diff --git a/src/ILAMB/Confrontation.py b/src/ILAMB/Confrontation.py index c29b411..6640d43 100644 --- a/src/ILAMB/Confrontation.py +++ b/src/ILAMB/Confrontation.py @@ -601,7 +601,7 @@ def determinePlotLimits(self): # Determine plot limits and colormap if opts["sym"]: - vabs = max(abs(limits[pname]["min"]), abs(limits[pname]["min"])) + vabs = max(abs(limits[pname]["min"]), abs(limits[pname]["max"])) limits[pname]["min"] = -vabs limits[pname]["max"] = vabs if "shift" in pname: @@ -705,6 +705,8 @@ def _computeOverallScore(scalars): weight = self.weight[score] overall_score += weight * scalars.variables[v][...] sum_of_weights += weight + if np.abs(overall_score) < 1e-12: + overall_score = np.nan overall_score /= max(sum_of_weights, 1e-12) scores["Overall Score %s" % region] = overall_score return scores