Skip to content

Commit

Permalink
ran flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
Ana Ordonez committed Oct 23, 2023
1 parent 524c22e commit d9ecd9e
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions pcmdi_metrics/extremes/lib/compute_metrics.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
#!/usr/bin/env python
import datetime
import math
import os
import sys

import cftime
import numpy as np
import pandas as pd
import xarray as xr
import xcdat as xc

Expand Down Expand Up @@ -83,7 +79,7 @@ def annual_stats(self, stat, pentad=False):
# Returns:
# ds_ann: Dataset containing annual max or min grid

if pentad == True:
if pentad:
if self.pentad is None:
self.calc_5day_mean()
ds = self.pentad
Expand Down Expand Up @@ -145,7 +141,7 @@ def seasonal_stats(self, season, stat, pentad=False):

year_range = self.TSD.year_range

if pentad == True:
if pentad:
if self.pentad is None:
self.calc_5day_mean()
ds = self.pentad
Expand Down Expand Up @@ -414,8 +410,6 @@ def precipitation_indices(
P5day["ANN"].where(P5day["ANN"] > 0, 0).where(~np.isnan(P5day["ANN"]), np.nan)
)
for season in ["DJF", "MAM", "JJA", "SON"]:
if season == "DJF":
tmp = S.seasonal_stats(season, "max", pentad=True)
P5day[season] = S.seasonal_stats(season, "max", pentad=True)
P5day[season] = (
P5day[season]
Expand Down

0 comments on commit d9ecd9e

Please sign in to comment.