From eb09fcd74a84eb40e44ef3227a7b6e0d731cf536 Mon Sep 17 00:00:00 2001 From: Michael Kelleher Date: Tue, 25 Jan 2022 16:21:09 -0600 Subject: [PATCH] Modify ensemble methods to match mpas ensembles too --- evv4esm/ensembles/e3sm.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/evv4esm/ensembles/e3sm.py b/evv4esm/ensembles/e3sm.py index b8d1470..ef96cf0 100644 --- a/evv4esm/ensembles/e3sm.py +++ b/evv4esm/ensembles/e3sm.py @@ -72,7 +72,8 @@ def component_monthly_files(dir_, component, ninst, hist_name="h0", nmonth_max=1 else: date_search = "????-??" - base = "{d}/*{c}_????.{n}.{ds}.nc".format(d=dir_, c=component, n=hist_name, ds=date_search) +def component_monthly_files(dir_, component, ninst, hist_name="hist", nmonth_max=24, date_style="short"): + base = "{d}/*{c}_????.{n}.????-??-??.nc".format(d=dir_, c=component, n=hist_name) search = os.path.normpath(base) result = sorted(glob.glob(search)) @@ -150,4 +151,4 @@ def load_mpas_climatology_ensemble(files, field_name, mask_value=None): if mask_value: ens_out = np.ma.masked_less(ens_out, mask_value) - return {"data": ens_out, "desc": var_desc} \ No newline at end of file + return {"data": ens_out, "desc": var_desc}