Skip to content

Commit

Permalink
fix cwd
Browse files Browse the repository at this point in the history
  • Loading branch information
Ana Ordonez committed Aug 7, 2024
1 parent b29f8fa commit 61b65eb
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions pcmdi_metrics/drcdm/lib/compute_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@
import numpy as np
import xarray as xr
import xcdat as xc
import xclim

from pcmdi_metrics.stats import compute_statistics_dataset as pmp_stats

# import xclim


bgclr = [0.45, 0.45, 0.45]


Expand Down Expand Up @@ -1106,7 +1104,6 @@ def get_annual_pxx(
return result_dict


"""
def get_annual_cwd(
ds, sftlf, dec_mode, drop_incomplete_djf, annual_strict, fig_file=None, nc_file=None
):
Expand All @@ -1119,7 +1116,7 @@ def get_annual_cwd(
Pcwd["ANN"] = xclim.indices.maximum_consecutive_wet_days(
ds.pr, thresh="1 mm/day", freq="YS", resample_before_rl=True
)
Pcwd["time"].encoding["calendar"] = ds.time["calendar"]
Pcwd.time.encoding["calendar"] = ds.time.encoding["calendar"]
Pcwd = update_nc_attrs(Pcwd, dec_mode, drop_incomplete_djf, annual_strict)

result_dict = metrics_json({index: Pcwd}, obs_dict={}, region="land", regrid=False)
Expand All @@ -1139,7 +1136,6 @@ def get_annual_cwd(

del Pcwd
return result_dict
"""


# A couple of statistics that aren't being loaded from mean_climate
Expand Down

0 comments on commit 61b65eb

Please sign in to comment.