From 33d069152b75cb369ed92acf260b864bb03abff6 Mon Sep 17 00:00:00 2001 From: Ryan Forsyth Date: Mon, 4 Nov 2024 19:22:06 -0600 Subject: [PATCH 01/13] zppy-interfaces refactor --- zppy/__main__.py | 12 +- zppy/{templates => defaults}/cryosphere.cfg | 0 zppy/{templates => defaults}/default.ini | 0 zppy/{templates => defaults}/high_res_v1.cfg | 0 zppy/{templates => defaults}/water_cycle.cfg | 0 zppy/templates/coupled_global.py | 872 ------------------- zppy/templates/global_time_series.bash | 60 +- zppy/templates/ocean_month.py | 139 --- zppy/templates/readTS.py | 78 -- 9 files changed, 11 insertions(+), 1150 deletions(-) rename zppy/{templates => defaults}/cryosphere.cfg (100%) rename zppy/{templates => defaults}/default.ini (100%) rename zppy/{templates => defaults}/high_res_v1.cfg (100%) rename zppy/{templates => defaults}/water_cycle.cfg (100%) delete mode 100644 zppy/templates/coupled_global.py delete mode 100644 zppy/templates/ocean_month.py delete mode 100644 zppy/templates/readTS.py diff --git a/zppy/__main__.py b/zppy/__main__.py index 4e871478..a503d525 100644 --- a/zppy/__main__.py +++ b/zppy/__main__.py @@ -27,11 +27,13 @@ def main(): ) # Subdirectory where templates are located template_dir: str = os.path.join(os.path.dirname(__file__), "templates") + # Subdirectory where defaults are located + defaults_dir: str = os.path.join(os.path.dirname(__file__), "defaults") # Read configuration file and validate it - default_config: str = os.path.join(template_dir, "default.ini") + default_config: str = os.path.join(defaults_dir, "default.ini") user_config: ConfigObj = ConfigObj(args.config, configspec=default_config) user_config, plugins = _handle_plugins(user_config, default_config, args) - config: ConfigObj = _handle_campaigns(user_config, default_config, template_dir) + config: ConfigObj = _handle_campaigns(user_config, default_config, defaults_dir) # Validate _validate_config(config) # Add templateDir to config @@ -95,7 +97,7 @@ def _handle_plugins( default = f.read() for plugin in plugins: # Read plugin 'default.ini' if it exists - plugin_default_file = os.path.join(plugin["path"], "templates/default.ini") + plugin_default_file = os.path.join(plugin["path"], "defaults/default.ini") print(plugin_default_file) if os.path.isfile(plugin_default_file): with open(plugin_default_file) as f: @@ -105,7 +107,7 @@ def _handle_plugins( def _handle_campaigns( - user_config: ConfigObj, default_config: str, template_dir: str + user_config: ConfigObj, default_config: str, defaults_dir: str ) -> ConfigObj: # Handle 'campaign' option if "campaign" in user_config["default"]: @@ -113,7 +115,7 @@ def _handle_campaigns( else: campaign = "none" if campaign != "none": - campaign_file = os.path.join(template_dir, f"{campaign}.cfg") + campaign_file = os.path.join(defaults_dir, f"{campaign}.cfg") if not os.path.exists(campaign_file): raise ValueError(f"{campaign} does not appear to be a known campaign") campaign_config = ConfigObj(campaign_file, configspec=default_config) diff --git a/zppy/templates/cryosphere.cfg b/zppy/defaults/cryosphere.cfg similarity index 100% rename from zppy/templates/cryosphere.cfg rename to zppy/defaults/cryosphere.cfg diff --git a/zppy/templates/default.ini b/zppy/defaults/default.ini similarity index 100% rename from zppy/templates/default.ini rename to zppy/defaults/default.ini diff --git a/zppy/templates/high_res_v1.cfg b/zppy/defaults/high_res_v1.cfg similarity index 100% rename from zppy/templates/high_res_v1.cfg rename to zppy/defaults/high_res_v1.cfg diff --git a/zppy/templates/water_cycle.cfg b/zppy/defaults/water_cycle.cfg similarity index 100% rename from zppy/templates/water_cycle.cfg rename to zppy/defaults/water_cycle.cfg diff --git a/zppy/templates/coupled_global.py b/zppy/templates/coupled_global.py deleted file mode 100644 index 9fc41401..00000000 --- a/zppy/templates/coupled_global.py +++ /dev/null @@ -1,872 +0,0 @@ -# Script to plot some global atmosphere and ocean time series -import glob -import math -import sys -import traceback -from typing import Any, Dict, List, Optional, Tuple - -import cftime -import matplotlib as mpl -import matplotlib.backends.backend_pdf -import matplotlib.pyplot as plt -import numpy as np -import xarray -from netCDF4 import Dataset -from readTS import TS - -mpl.use("Agg") - - -# ---additional function to get moc time series -def getmoc(dir_in): - files = sorted(glob.glob(dir_in + "mocTimeSeries*.nc")) - nfiles = len(files) - print(dir_in, nfiles, "moc files in total") - var = np.array([]) - time = np.array([]) - for i in range(nfiles): - # Open input file - fin = Dataset(files[i], "r") - time0 = fin["year"][:] - var0 = fin["mocAtlantic26"][:] - for iyear in range(int(time0[0]), int(time0[-1]) + 1): - if i > 0 and iyear <= time[-1]: - print( - "the amoc value for year", - iyear, - "has been included in the moc time series from another moc file", - files[i - 1], - time[-1], - "Skipping...", - ) - else: - imon = np.where(time0 == iyear)[0] - if len(imon) == 12: - var = np.append(var, np.mean(var0[imon])) - time = np.append(time, iyear) - else: - print("error in input file :", files[i]) - - return time, var - - -# ----------------------------------------------------------------------------- -# Function to add horizontal line showing average value over a specified period -def add_line(year, var, year1, year2, ax, format="%4.2f", lw=1, color="b"): - - i1 = (np.abs(year - year1)).argmin() - i2 = (np.abs(year - year2)).argmin() - - tmp = np.average(var[i1 : i2 + 1]) - ax.plot((year[i1], year[i2]), (tmp, tmp), lw=lw, color=color, label="average") - ax.text(ax.get_xlim()[1] + 1, tmp, format % tmp, va="center", color=color) - - return - - -# ----------------------------------------------------------------------------- -# Function to add line showing linear trend over a specified period -def add_trend( - year, - var, - year1, - year2, - ax, - format="%4.2f", - lw=1, - color="b", - verbose=False, - ohc=False, - vol=False, -): - - i1 = (np.abs(year - year1)).argmin() - i2 = (np.abs(year - year2)).argmin() - x = year[i1 : i2 + 1] - y = var[i1 : i2 + 1] - - fit = np.polyfit(x, y, 1) - if verbose: - print(fit) - fit_fn = np.poly1d(fit) - ax.plot(x, fit_fn(x), lw=lw, ls="--", c=color, label="trend") - if ohc: - # Earth radius 6371229. from MPAS-O output files - heat_uptake = fit[0] / (4.0 * math.pi * (6371229.0) ** 2 * 365.0 * 86400.0) - ax.text( - ax.get_xlim()[1] + 1, - fit_fn(x[-1]), - "%+4.2f W m$^{-2}$" % (heat_uptake), - color=color, - ) - if vol: - # Earth radius 6371229. from MPAS-O output files - # sea_lvl = fit[0] / ( 4.0*math.pi*(6371229.)**2*0.7) #for oceanic portion of the Earth surface - ax.text( - ax.get_xlim()[1] + 1, - fit_fn(x[-1]), - "%+5.4f mm yr$^{-1}$" % (fit[0]), - color=color, - ) - - return - - -# ----------------------------------------------------------------------------- -# Function to get ylim -def get_ylim(standard_range, extreme_values): - if len(extreme_values) > 0: - has_extreme_values = True - extreme_min = np.amin(extreme_values) - extreme_max = np.amax(extreme_values) - else: - has_extreme_values = False - extreme_min = None - extreme_max = None - if len(standard_range) == 2: - has_standard_range = True - standard_min = standard_range[0] - standard_max = standard_range[1] - else: - has_standard_range = False - standard_min = None - standard_max = None - if has_extreme_values and has_standard_range: - # Use at least the standard range, - # perhaps a wider window to include extremes - if standard_min <= extreme_min: - ylim_min = standard_min - else: - ylim_min = extreme_min - if standard_max >= extreme_max: - ylim_max = standard_max - else: - ylim_max = extreme_max - elif has_extreme_values and not has_standard_range: - ylim_min = extreme_min - ylim_max = extreme_max - elif has_standard_range and not has_extreme_values: - ylim_min = standard_min - ylim_max = standard_max - else: - raise ValueError("Not enough range information supplied") - return [ylim_min, ylim_max] - - -# ----------------------------------------------------------------------------- -# Plotting functions - - -# 1 -def plot_net_toa_flux_restom(ax, xlim, exps, rgn): - print("Plot 1: plot_net_toa_flux_restom") - param_dict = { - "2nd_var": False, - "axhline_y": 0, - "check_exp_ocean": False, - "check_exp_vol": False, - "check_exp_year": True, - "default_ylim": [-1.5, 1.5], - "do_add_line": True, - "do_add_trend": True, - "format": "%4.2f", - "glb_only": False, - "lw": 1.0, - "ohc": False, - "set_axhline": True, - "set_legend": True, - "shorten_year": False, - "title": "Net TOA flux (restom)", - "use_getmoc": False, - "var": lambda exp: np.array(exp["annual"]["RESTOM"][0]), - "verbose": False, - "vol": False, - "ylabel": "W m-2", - } - plot(ax, xlim, exps, param_dict, rgn) - - -# 2 -def plot_global_surface_air_temperature(ax, xlim, exps, rgn): - print("Plot 2: plot_global_surface_air_temperature") - if rgn == "glb": - region_title = "Global" - elif rgn == "n": - region_title = "Northern Hemisphere" - elif rgn == "s": - region_title = "Southern Hemisphere" - else: - raise RuntimeError(f"Invalid rgn={rgn}") - param_dict = { - "2nd_var": False, - "axhline_y": None, - "check_exp_ocean": False, - "check_exp_vol": False, - "check_exp_year": True, - "default_ylim": [13, 15.5], - "do_add_line": True, - "do_add_trend": True, - "format": "%4.2f", - "glb_only": False, - "lw": 1.0, - "ohc": False, - "set_axhline": False, - "set_legend": True, - "shorten_year": False, - "title": f"{region_title} surface air temperature", - "use_getmoc": False, - "var": lambda exp: np.array(exp["annual"]["TREFHT"][0]) - 273.15, - "verbose": False, - "vol": False, - "ylabel": "degC", - } - plot(ax, xlim, exps, param_dict, rgn) - - -# 3 -def plot_toa_radiation(ax, xlim, exps, rgn): - print("Plot 3: plot_toa_radiation") - param_dict = { - "2nd_var": True, - "axhline_y": None, - "check_exp_ocean": False, - "check_exp_vol": False, - "check_exp_year": False, - "default_ylim": [235, 245], - "do_add_line": False, - "do_add_trend": False, - "format": None, - "glb_only": False, - "lw": 1.0, - "ohc": False, - "set_axhline": False, - "set_legend": False, - "shorten_year": False, - "title": "TOA radiation: SW (solid), LW (dashed)", - "use_getmoc": False, - "var": lambda exp: np.array(exp["annual"]["FSNTOA"][0]), - "verbose": None, - "vol": None, - "ylabel": "W m-2", - } - plot(ax, xlim, exps, param_dict, rgn) - - -# 4 -def plot_net_atm_energy_imbalance(ax, xlim, exps, rgn): - print("Plot 4: plot_net_atm_energy_imbalance") - param_dict = { - "2nd_var": False, - "axhline_y": None, - "check_exp_ocean": False, - "check_exp_vol": False, - "check_exp_year": True, - "default_ylim": [-0.3, 0.3], - "do_add_line": True, - "do_add_trend": False, - "format": "%4.2f", - "glb_only": False, - "lw": 1.0, - "ohc": False, - "set_axhline": False, - "set_legend": True, - "shorten_year": False, - "title": "Net atm energy imbalance (restom-ressurf)", - "use_getmoc": False, - "var": lambda exp: np.array(exp["annual"]["RESTOM"][0]) - - np.array(exp["annual"]["RESSURF"][0]), - "verbose": False, - "vol": False, - "ylabel": "W m-2", - } - plot(ax, xlim, exps, param_dict, rgn) - - -# 5 -def plot_change_ohc(ax, xlim, exps, rgn): - print("Plot 5: plot_change_ohc") - param_dict = { - "2nd_var": False, - "axhline_y": 0, - "check_exp_ocean": True, - "check_exp_vol": False, - "check_exp_year": False, - "default_ylim": [-0.3e24, 0.9e24], - "do_add_line": False, - "do_add_trend": True, - "format": "%4.2f", - "glb_only": True, - "lw": 1.5, - "ohc": True, - "set_axhline": True, - "set_legend": True, - "shorten_year": True, - "title": "Change in ocean heat content", - "use_getmoc": False, - "var": lambda exp: np.array(exp["annual"]["ohc"]), - "verbose": False, - "vol": False, - "ylabel": "J", - } - plot(ax, xlim, exps, param_dict, rgn) - - -# 6 -def plot_max_moc(ax, xlim, exps, rgn): - print("Plot 6: plot_max_moc") - param_dict = { - "2nd_var": False, - "axhline_y": 10, - "check_exp_ocean": False, - "check_exp_vol": False, - "check_exp_year": False, - "default_ylim": [4, 22], - "do_add_line": False, - "do_add_trend": True, - "format": "%4.2f", - "glb_only": True, - "lw": 1.5, - "ohc": False, - "set_axhline": True, - "set_legend": True, - "shorten_year": False, - "title": "Max MOC Atlantic streamfunction at 26.5N", - "use_getmoc": True, - "var": None, - "verbose": True, - "vol": None, - "ylabel": "Sv", - } - plot(ax, xlim, exps, param_dict, rgn) - - -# 7 -def plot_change_sea_level(ax, xlim, exps, rgn): - print("Plot 7: plot_change_sea_level") - param_dict = { - "2nd_var": False, - "axhline_y": None, - "check_exp_ocean": False, - "check_exp_vol": True, - "check_exp_year": True, - "default_ylim": [4, 22], - "do_add_line": False, - "do_add_trend": True, - "format": "%5.3f", - "glb_only": True, - "lw": 1.5, - "ohc": False, - "set_axhline": False, - "set_legend": True, - "shorten_year": True, - "title": "Change in sea level", - "use_getmoc": False, - "var": lambda exp: ( - 1e3 - * np.array(exp["annual"]["volume"]) - / (4.0 * math.pi * (6371229.0) ** 2 * 0.7) - ), - "verbose": True, - "vol": True, - "ylabel": "mm", - } - plot(ax, xlim, exps, param_dict, rgn) - - -# 8 -def plot_net_atm_water_imbalance(ax, xlim, exps, rgn): - print("Plot 8: plot_net_atm_water_imbalance") - param_dict = { - "2nd_var": False, - "axhline_y": None, - "check_exp_ocean": False, - "check_exp_vol": False, - "check_exp_year": False, - "default_ylim": [-1, 1], - "do_add_line": True, - "do_add_trend": False, - "format": "%5.4f", - "glb_only": False, - "lw": 1.0, - "ohc": False, - "set_axhline": False, - "set_legend": True, - "shorten_year": False, - "title": "Net atm water imbalance (evap-prec)", - "use_getmoc": False, - "var": lambda exp: ( - 365 - * 86400 - * ( - np.array(exp["annual"]["QFLX"][0]) - - 1e3 - * ( - np.array(exp["annual"]["PRECC"][0]) - + np.array(exp["annual"]["PRECL"][0]) - ) - ) - ), - "verbose": False, - "vol": False, - "ylabel": "mm yr-1", - } - plot(ax, xlim, exps, param_dict, rgn) - - -# Generic plot function -def plot_generic(ax, xlim, exps, var_name, rgn): - print(f"plot_generic for {var_name}") - param_dict = { - "2nd_var": False, - "axhline_y": 0, - "check_exp_ocean": False, - "check_exp_vol": False, - "check_exp_year": True, - "default_ylim": [], - "do_add_line": True, - "do_add_trend": True, - "format": "%4.2f", - "glb_only": False, - "lw": 1.0, - "ohc": False, - "set_axhline": False, - "set_legend": True, - "shorten_year": False, - "title": var_name, - "use_getmoc": False, - "var": lambda exp: np.array(exp["annual"][var_name][0]), - "verbose": False, - "vol": False, - "ylabel": lambda exp: np.array(exp["annual"][var_name][1]), - } - plot(ax, xlim, exps, param_dict, rgn) - - -# FIXME: C901 'plot' is too complex (19) -def plot(ax, xlim, exps, param_dict, rgn): # noqa: C901 - if param_dict["glb_only"] and (rgn != "glb"): - return - ax.set_xlim(xlim) - extreme_values = [] - for exp in exps: - # Relevant to "Plot 5: plot_change_ohc" - if param_dict["check_exp_ocean"] and (exp["ocean"] is None): - continue - # Relevant to "Plot 7: plot_change_sea_level" - # This must be checked before plot 6, - # otherwise, `param_dict["var"]` will be run, - # but `exp["annual"]["volume"]` won't exist. - if param_dict["check_exp_vol"] and (exp["vol"] is None): - continue - # Relevant to "Plot 6: plot_max_moc" - if param_dict["use_getmoc"]: - if exp["moc"]: - [year, var] = getmoc(exp["moc"]) - else: - continue - else: - year = np.array(exp["annual"]["year"]) + exp["yoffset"] - var = param_dict["var"](exp) - extreme_values.append(np.amax(var)) - extreme_values.append(np.amin(var)) - if param_dict["shorten_year"]: - year = year[: len(var)] - try: - ax.plot( - year, - var, - lw=param_dict["lw"], - marker=None, - c=exp["color"], - label=exp["name"], - ) - except Exception: - raise RuntimeError(f"{param_dict['title']} could not be plotted.") - if param_dict["2nd_var"]: - # Specifically for plot_toa_radiation - # TODO: if more plots require a 2nd variable, we can change `var` to be a list, - # but that will be a more significant refactoring. - var = np.array(exp["annual"]["FLUT"][0]) - ax.plot(year, var, lw=1.0, marker=None, ls=":", c=exp["color"]) - continue - if param_dict["check_exp_year"] and exp["yr"] is None: - continue - elif param_dict["do_add_line"] or param_dict["do_add_trend"]: - for yrs in exp["yr"]: - if param_dict["do_add_line"]: - add_line( - year, - var, - yrs[0], - yrs[1], - format=param_dict["format"], - ax=ax, - lw=2 * param_dict["lw"], - color=exp["color"], - ) - if param_dict["do_add_trend"]: - add_trend( - year, - var, - yrs[0], - yrs[1], - format=param_dict["format"], - ax=ax, - lw=2 * param_dict["lw"], - color=exp["color"], - ohc=param_dict["ohc"], - verbose=param_dict["verbose"], - vol=param_dict["vol"], - ) - ylim = get_ylim(param_dict["default_ylim"], extreme_values) - ax.set_ylim(ylim) - if param_dict["set_axhline"]: - ax.axhline(y=param_dict["axhline_y"], lw=1, c="0.5") - ax.set_title(param_dict["title"]) - ax.set_xlabel("Year") - units = param_dict["ylabel"] - c = callable(units) - if c: - units = units(exps[0]) - ax.set_ylabel(units) - if param_dict["set_legend"]: - ax.legend(loc="best") - - -PLOT_DICT = { - "net_toa_flux_restom": plot_net_toa_flux_restom, - "global_surface_air_temperature": plot_global_surface_air_temperature, - "toa_radiation": plot_toa_radiation, - "net_atm_energy_imbalance": plot_net_atm_energy_imbalance, - "change_ohc": plot_change_ohc, # only glb - "max_moc": plot_max_moc, # only glb - "change_sea_level": plot_change_sea_level, # only glb - "net_atm_water_imbalance": plot_net_atm_water_imbalance, -} - - -def param_get_list(param_value): - if param_value == "None": - return [] - else: - return param_value.split(",") - - -def set_var( - exp: Dict[str, Any], - exp_key: str, - var_list: List[str], - valid_vars: List[str], - invalid_vars: List[str], - rgn: str, -) -> None: - if exp[exp_key] is not None: - ts = TS(exp[exp_key]) - for var in var_list: - try: - v: xarray.core.dataarray.DataArray - units: Optional[str] - v, units = ts.globalAnnual(var) - valid_vars.append(str(var)) - except Exception as e: - print(e) - print(f"globalAnnual failed. Invalid var = {var}") - invalid_vars.append(str(var)) - continue - if v.sizes["rgn"] > 1: - # number of years x 3 regions = v.shape - # 3 regions = global, northern hemisphere, southern hemisphere - # We get here if we used the updated `ts` task - # (using `rgn_avg` rather than `glb_avg`). - if rgn == "glb": - n = 0 - elif rgn == "n": - n = 1 - elif rgn == "s": - n = 2 - else: - raise RuntimeError(f"Invalid rgn={rgn}") - v = v.isel(rgn=n) # Just use nth region - elif rgn != "glb": - # v only has one dimension -- glb. - # Therefore it is not possible to get n or s plots. - raise RuntimeError( - f"var={var} only has global data. Cannot process rgn={rgn}" - ) - exp["annual"][var] = (v, units) - if "year" not in exp["annual"]: - years: np.ndarray[cftime.DatetimeNoLeap] = v.coords["time"].values - exp["annual"]["year"] = [x.year for x in years] - del ts - - -def make_plot_pdfs( - figstr, rgn, component, xlim, exps, plot_list, valid_plots, invalid_plots -): - num_plots = len(plot_list) - if num_plots == 0: - return - nrows = 4 - ncols = 2 - plots_per_page = nrows * ncols - num_pages = math.ceil(num_plots / plots_per_page) - - counter = 0 - # https://stackoverflow.com/questions/58738992/save-multiple-figures-with-subplots-into-a-pdf-with-multiple-pages - pdf = matplotlib.backends.backend_pdf.PdfPages(f"{figstr}_{rgn}_{component}.pdf") - for page in range(num_pages): - fig = plt.figure(1, figsize=[13.5, 16.5]) - fig.suptitle(f"{figstr}_{rgn}_{component}") - for j in range(plots_per_page): - # The final page doesn't need to be filled out with plots. - if counter >= num_plots: - break - ax = plt.subplot(nrows, ncols, j + 1) - if component == "original": - try: - plot_function = PLOT_DICT[plot_list[counter]] - except KeyError: - raise KeyError(f"Invalid plot name: {plot_list[counter]}") - try: - plot_function(ax, xlim, exps, rgn) - valid_plots.append(plot_list[counter]) - except Exception: - traceback.print_exc() - plot_name = plot_list[counter] - required_vars = [] - if plot_name == "net_toa_flux_restom": - required_vars = ["RESTOM"] - elif plot_name == "net_atm_energy_imbalance": - required_vars = ["RESTOM", "RESSURF"] - elif plot_name == "global_surface_air_temperature": - required_vars = ["TREFHT"] - elif plot_name == "toa_radiation": - required_vars = ["FSNTOA", "FLUT"] - elif plot_name == "net_atm_water_imbalance": - required_vars = ["PRECC", "PRECL", "QFLX"] - print( - f"Failed plot_function for {plot_name}. Check that {required_vars} are available." - ) - invalid_plots.append(plot_name) - counter += 1 - else: - try: - plot_name = plot_list[counter] - plot_generic(ax, xlim, exps, plot_name, rgn) - valid_plots.append(plot_name) - except Exception: - traceback.print_exc() - print(f"plot_generic failed. Invalid plot={plot_name}") - invalid_plots.append(plot_name) - counter += 1 - - fig.tight_layout() - pdf.savefig(1) - if num_pages > 1: - fig.savefig(f"{figstr}_{rgn}_{component}_{page}.png", dpi=150) - else: - fig.savefig(f"{figstr}_{rgn}_{component}.png", dpi=150) - plt.clf() - pdf.close() - - -# ----------------------------------------------------------------------------- -# FIXME: C901 'run' is too complex (19) -def run(parameters, rgn): # noqa: C901 - # These are the "Tableau 20" colors as RGB. - t20: List[Tuple[float, float, float]] = [ - (31, 119, 180), - (174, 199, 232), - (255, 127, 14), - (255, 187, 120), - (44, 160, 44), - (152, 223, 138), - (214, 39, 40), - (255, 152, 150), - (148, 103, 189), - (197, 176, 213), - (140, 86, 75), - (196, 156, 148), - (227, 119, 194), - (247, 182, 210), - (127, 127, 127), - (199, 199, 199), - (188, 189, 34), - (219, 219, 141), - (23, 190, 207), - (158, 218, 229), - ] - # Scale the RGB values to the [0, 1] range, which is the format matplotlib accepts. - for i in range(len(t20)): - r, g, b = t20[i] - t20[i] = (r / 255.0, g / 255.0, b / 255.0) - - # "Tableau 10" uses every other color - t10 = [] - for i in range(0, len(t20), 2): - t10.append(t20[i]) - - # ----------------------------------------------------------------------------- - # --- Atmos data --- - - # Experiments - case_dir = parameters[1] - experiment_name = parameters[2] - figstr = parameters[3] - year1 = int(parameters[4]) - year2 = int(parameters[5]) - color = parameters[6] - ts_num_years = parameters[7] - plots_original = param_get_list(parameters[8]) - if parameters[9].lower() == "false": - atmosphere_only = False - else: - atmosphere_only = True - plots_atm = param_get_list(parameters[10]) - plots_ice = param_get_list(parameters[11]) - plots_lnd = param_get_list(parameters[12]) - plots_ocn = param_get_list(parameters[13]) - vars_original = [] - if "net_toa_flux_restom" or "net_atm_energy_imbalance" in plots_original: - vars_original.append("RESTOM") - if "net_atm_energy_imbalance" in plots_original: - vars_original.append("RESSURF") - if "global_surface_air_temperature" in plots_original: - vars_original.append("TREFHT") - if "toa_radiation" in plots_original: - vars_original.append("FSNTOA") - vars_original.append("FLUT") - if "net_atm_water_imbalance" in plots_original: - vars_original.append("PRECC") - vars_original.append("PRECL") - vars_original.append("QFLX") - use_atmos = plots_atm or plots_original - has_original_ocn_plots = ( - ("change_ohc" in plots_original) - or ("max_moc" in plots_original) - or ("change_sea_level" in plots_original) - ) - use_ocn = plots_ocn or (not atmosphere_only and has_original_ocn_plots) - exps: List[Dict[str, Any]] = [ - { - "atmos": ( - f"{case_dir}/post/atm/glb/ts/monthly/{ts_num_years}yr/" - if use_atmos - else None - ), - "ice": ( - f"{case_dir}/post/ice/glb/ts/monthly/{ts_num_years}yr/" - if plots_ice - else None - ), - "land": ( - f"{case_dir}/post/lnd/glb/ts/monthly/{ts_num_years}yr/" - if plots_lnd - else None - ), - "ocean": ( - f"{case_dir}/post/ocn/glb/ts/monthly/{ts_num_years}yr/" - if use_ocn - else None - ), - "moc": ( - f"{case_dir}/post/ocn/glb/ts/monthly/{ts_num_years}yr/" - if use_ocn - else None - ), - "vol": ( - f"{case_dir}/post/ocn/glb/ts/monthly/{ts_num_years}yr/" - if use_ocn - else None - ), - "name": experiment_name, - "yoffset": 0.0, - "yr": ([year1, year2],), - "color": f"{color}", - } - ] - - valid_vars: List[str] = [] - invalid_vars: List[str] = [] - - # Read data - exp: Dict[str, Any] - for exp in exps: - exp["annual"] = {} - - # Use vars_original rather than plots_original, - # since the plots have different names than the variables - set_var(exp, "atmos", vars_original, valid_vars, invalid_vars, rgn) - set_var(exp, "atmos", plots_atm, valid_vars, invalid_vars, rgn) - set_var(exp, "ice", plots_ice, valid_vars, invalid_vars, rgn) - set_var(exp, "land", plots_lnd, valid_vars, invalid_vars, rgn) - set_var(exp, "ocean", plots_ocn, valid_vars, invalid_vars, rgn) - - # Optionally read ohc - if exp["ocean"] is not None: - ts = TS(exp["ocean"]) - exp["annual"]["ohc"], _ = ts.globalAnnual("ohc") - # annomalies with respect to first year - exp["annual"]["ohc"][:] = exp["annual"]["ohc"][:] - exp["annual"]["ohc"][0] - - if exp["vol"] is not None: - ts = TS(exp["vol"]) - exp["annual"]["volume"], _ = ts.globalAnnual("volume") - # annomalies with respect to first year - exp["annual"]["volume"][:] = ( - exp["annual"]["volume"][:] - exp["annual"]["volume"][0] - ) - - print( - f"{rgn} region globalAnnual was computed successfully for these variables: {valid_vars}" - ) - print( - f"{rgn} region globalAnnual could not be computed for these variables: {invalid_vars}" - ) - - # ----------------------------------------------------------------------------- - # --- Generate plots --- - - xlim = [float(year1), float(year2)] - - valid_plots: List[str] = [] - invalid_plots: List[str] = [] - - make_plot_pdfs( - figstr, rgn, "original", xlim, exps, plots_original, valid_plots, invalid_plots - ) - make_plot_pdfs( - figstr, rgn, "atm", xlim, exps, plots_atm, valid_plots, invalid_plots - ) - make_plot_pdfs( - figstr, rgn, "ice", xlim, exps, plots_ice, valid_plots, invalid_plots - ) - make_plot_pdfs( - figstr, rgn, "lnd", xlim, exps, plots_lnd, valid_plots, invalid_plots - ) - make_plot_pdfs( - figstr, rgn, "ocn", xlim, exps, plots_ocn, valid_plots, invalid_plots - ) - - print(f"These {rgn} region plots generated successfully: {valid_plots}") - print( - f"These {rgn} region plots could not be generated successfully: {invalid_plots}" - ) - - -def run_by_region(parameters): - regions = parameters[14].split(",") - for rgn in regions: - if rgn.lower() in ["glb", "global"]: - rgn = "glb" - elif rgn.lower() in ["n", "north", "northern"]: - rgn = "n" - elif rgn.lower() in ["s", "south", "southern"]: - rgn = "s" - else: - raise RuntimeError(f"Invalid rgn={rgn}") - run(parameters, rgn) - - -if __name__ == "__main__": - run_by_region(sys.argv) diff --git a/zppy/templates/global_time_series.bash b/zppy/templates/global_time_series.bash index 22dee4d7..8b0e79b8 100644 --- a/zppy/templates/global_time_series.bash +++ b/zppy/templates/global_time_series.bash @@ -17,64 +17,9 @@ cd {{ scriptDir }} echo "RUNNING ${id}" > {{ prefix }}.status # Generate global time series plots - -# Names -moc_file={{ moc_file }} -experiment_name={{ experiment_name }} -figstr={{ figstr }} -case={{ case }} - -# Years -start_yr={{ year1 }} -end_yr={{ year2 }} -ts_num_years={{ ts_num_years }} - -# Paths -www={{ www }} -case_dir={{ output }} -global_ts_dir={{ global_time_series_dir }} - ################################################################################ -export CDMS_NO_MPI=true - -use_atm={{ use_atm }} -use_lnd={{ use_lnd }} - -use_ocn={{ use_ocn }} -if [[ ${use_ocn,,} == "true" ]]; then - echo 'Create ocean time series' - cd ${global_ts_dir} - mkdir -p ${case_dir}/post/ocn/glb/ts/monthly/${ts_num_years}yr - input={{ input }}/{{ input_subdir }} - python ocean_month.py ${input} ${case_dir} ${start_yr} ${end_yr} ${ts_num_years} - if [ $? != 0 ]; then - cd {{ scriptDir }} - echo 'ERROR (3)' > {{ prefix }}.status - exit 3 - fi - - echo 'Copy moc file' - cd ${case_dir}/post/analysis/mpas_analysis/cache/timeseries/moc - cp ${moc_file} ../../../../../ocn/glb/ts/monthly/${ts_num_years}yr/ - if [ $? != 0 ]; then - cd {{ scriptDir }} - echo 'ERROR (5)' > {{ prefix }}.status - exit 5 - fi - -fi - -echo 'Update time series figures' -cd ${global_ts_dir} -atmosphere_only={{ atmosphere_only }} -python coupled_global.py ${case_dir} ${experiment_name} ${figstr} ${start_yr} ${end_yr} {{ color }} ${ts_num_years} {{ plots_original }} ${atmosphere_only,,} {{ plots_atm }} {{ plots_ice }} {{ plots_lnd }} {{ plots_ocn }} {{ regions }} -if [ $? != 0 ]; then - cd {{ scriptDir }} - echo 'ERROR (6)' > {{ prefix }}.status - exit 6 -fi - +zppy-interfaces global-time-series --use_ocn={{ use_ocn }} --global_ts_dir={{ global_time_series_dir }} --input={{ input }} --input_subdir={{ input_subdir }} --moc_file={{ moc_file }} --case_dir={{ output }} --experiment_name={{ experiment_name }} --figstr={{ figstr }} --color={{ color }} --ts_num_years={{ ts_num_years }} --plots_original={{ plots_original }} --atmosphere_only={{ atmosphere_only }} --plots_atm={{ plots_atm }} --plots_ice={{ plots_ice }} --plots_lnd={{ plots_lnd }} --plots_ocn={{ plots_ocn }} --regions={{ regions }} --start_yr={{ year1 }} --end_yr={{ year2 }} echo 'Copy images to directory' results_dir={{ prefix }}_results @@ -84,6 +29,9 @@ cp *.pdf ${results_dir_absolute_path} cp *.png ${results_dir_absolute_path} ################################################################################ +case={{ case }} +www={{ www }} + # Copy output to web server echo echo ===== COPY FILES TO WEB SERVER ===== diff --git a/zppy/templates/ocean_month.py b/zppy/templates/ocean_month.py deleted file mode 100644 index 75a09dba..00000000 --- a/zppy/templates/ocean_month.py +++ /dev/null @@ -1,139 +0,0 @@ -# Compute time series of ocean heat content (ohc) using MPAS-O output - -import glob -import sys -from datetime import datetime - -import numpy as np -from mpas_tools.cime.constants import constants -from netCDF4 import Dataset, chartostring, date2num - -# Years to process -start_yr = int(sys.argv[3]) -end_yr = int(sys.argv[4]) -ts_num_years = int(sys.argv[5]) - -# Run directories -path_in = sys.argv[1] -case_dir = sys.argv[2] -path_out = "{}/post/ocn/glb/ts/monthly/{}yr".format(case_dir, ts_num_years) - -# Ocean constants -# specific heat [J/(kg*degC)] -cp = constants["SHR_CONST_CPSW"] -# [kg/m3] -rho = constants["SHR_CONST_RHOSW"] -# [J/(degC*m3)] -fac = rho * cp - -# Time units, calendar -tcalendar = "noleap" -tunits = f"days since {start_yr:04d}-01-01 00:00:00" - -# Loop over year sets -for y in range(start_yr, end_yr, ts_num_years): - - year1 = y - year2 = y + ts_num_years - 1 - files = [] - for year in range(year1, year2 + 1): - print("year=", year) - inFiles = "%s/*mpaso.hist.am.timeSeriesStatsMonthly.%04d-??-??.nc" % ( - path_in, - year, - ) - files.extend(sorted(glob.glob(inFiles))) - out = "%s/mpaso.glb.%04d01-%04d12.nc" % (path_out, year1, year2) - - # Create output file - fout = Dataset(out, "w", format="NETCDF4_CLASSIC") - fout.createDimension("time", None) - fout.createDimension("nbnd", 2) - - time = fout.createVariable("time", "f8", ("time",)) - time.long_name = "time" - time.units = tunits - time.calendar = tcalendar - time.bounds = "time_bnds" - - time_bnds = fout.createVariable("time_bnds", "f8", ("time", "nbnd")) - time_bnds.long_name = "time interval endpoints" - - ohc = fout.createVariable("ohc", "f8", ("time",)) - ohc.long_name = "total ocean heat content" - ohc.units = "J" - - volume = fout.createVariable("volume", "f8", ("time",)) - volume.long_name = "sum of the volumeCell variable over the full domain, used to normalize global statistics" - volume.units = "m^3" - - # OHC from monthly time series - itime = 0 - for file in files: - - # Open current input file - print(file) - f = Dataset(file, "r") - - # Time variables - xtime_startMonthly = chartostring(f.variables["xtime_startMonthly"][:]) - xtime_endMonthly = chartostring(f.variables["xtime_endMonthly"][:]) - - # Convert to datetime objects (assuming 0 UTC boundary) - date_start = np.array( - [datetime.strptime(x[0:10], "%Y-%m-%d") for x in xtime_startMonthly] - ) - date_end = np.array( - [datetime.strptime(x[0:10], "%Y-%m-%d") for x in xtime_endMonthly] - ) - - # Convert to netCDF4 time - tstart = date2num(date_start, tunits, tcalendar) - tend = date2num(date_end, tunits, tcalendar) - t = 0.5 * (tstart + tend) - - # Variables needed to compute global OHC - iregion = 6 # global average region - sumLayerMaskValue = f.variables[ - "timeMonthly_avg_avgValueWithinOceanLayerRegion_sumLayerMaskValue" - ][:, iregion, :] - avgLayerArea = f.variables[ - "timeMonthly_avg_avgValueWithinOceanLayerRegion_avgLayerArea" - ][:, iregion, :] - avgLayerThickness = f.variables[ - "timeMonthly_avg_avgValueWithinOceanLayerRegion_avgLayerThickness" - ][:, iregion, :] - avgLayerTemperature = f.variables[ - "timeMonthly_avg_avgValueWithinOceanLayerRegion_avgLayerTemperature" - ][:, iregion, :] - - # volumeCellGlobal - volumeCell = f.variables["timeMonthly_avg_volumeCellGlobal"][:] - - # Close current input file - f.close() - - # Compute OHC - layerArea = sumLayerMaskValue * avgLayerArea - layerVolume = layerArea * avgLayerThickness - tmp = layerVolume * avgLayerTemperature - ohc_tot = fac * np.sum(tmp, axis=1) - - # Diagnostics printout - for i in range(len(date_start)): - print( - "Start, End, OHC = %s (%s), %s (%s), %e" - % (date_start[i], tstart[i], date_end[i], tend[i], ohc_tot[i]) - ) - - # Write data - time[itime:] = t - time_bnds[itime:, 0] = tstart - time_bnds[itime:, 1] = tend - ohc[itime:] = ohc_tot - volume[itime:] = volumeCell - - itime = itime + len(t) - - # Close output file - fout.close() diff --git a/zppy/templates/readTS.py b/zppy/templates/readTS.py deleted file mode 100644 index 16a9031e..00000000 --- a/zppy/templates/readTS.py +++ /dev/null @@ -1,78 +0,0 @@ -from typing import Optional, Tuple - -import xarray -import xcdat # noqa: F401 - - -class TS(object): - def __init__(self, directory): - - self.directory: str = directory - - # `directory` will be of the form `{case_dir}/post//glb/ts/monthly/{ts_num_years}yr/` - self.f: xarray.core.dataset.Dataset = xcdat.open_mfdataset( - f"{directory}*.nc", center_times=True - ) - - def __del__(self): - - self.f.close() - - def globalAnnual( - self, var: str - ) -> Tuple[xarray.core.dataarray.DataArray, Optional[str]]: - - v: xarray.core.dataarray.DataArray - units: Optional[str] = None - - # Constants, from AMWG diagnostics - Lv = 2.501e6 - Lf = 3.337e5 - - # Is this a derived variable? - if var == "RESTOM": - - FSNT, _ = self.globalAnnual("FSNT") - FLNT, _ = self.globalAnnual("FLNT") - v = FSNT - FLNT - - elif var == "RESTOA": - - print("NOT READY") - FSNTOA, _ = self.globalAnnual("FSNTOA") - FLUT, _ = self.globalAnnual("FLUT") - v = FSNTOA - FLUT - - elif var == "LHFLX": - - QFLX, _ = self.globalAnnual("QFLX") - PRECC, _ = self.globalAnnual("PRECC") - PRECL, _ = self.globalAnnual("PRECL") - PRECSC, _ = self.globalAnnual("PRECSC") - PRECSL, _ = self.globalAnnual("PRECSL") - v = (Lv + Lf) * QFLX - Lf * 1.0e3 * (PRECC + PRECL - PRECSC - PRECSL) - - elif var == "RESSURF": - - FSNS, _ = self.globalAnnual("FSNS") - FLNS, _ = self.globalAnnual("FLNS") - SHFLX, _ = self.globalAnnual("SHFLX") - LHFLX, _ = self.globalAnnual("LHFLX") - v = FSNS - FLNS - SHFLX - LHFLX - - elif var == "PREC": - - PRECC, _ = self.globalAnnual("PRECC") - PRECL, _ = self.globalAnnual("PRECL") - v = 1.0e3 * (PRECC + PRECL) - - else: - # Non-derived variables - - annual_average_dataset_for_var: xarray.core.dataset.Dataset = ( - self.f.temporal.group_average(var, "year") - ) - v = annual_average_dataset_for_var.data_vars[var] - units = v.units - - return v, units From ceddedcbda1e2d177fe423bd2c9bb1eaf689bd65 Mon Sep 17 00:00:00 2001 From: Ryan Forsyth Date: Mon, 4 Nov 2024 20:16:21 -0600 Subject: [PATCH 02/13] Better organize dirs --- zppy/defaults/default.ini | 4 ++-- zppy/{templates => examples}/e3sm_diags/lat_lon_conus.cfg | 0 zppy/templates/bundle.bash | 2 +- zppy/templates/climo.bash | 2 +- zppy/templates/e3sm_diags.bash | 2 +- zppy/templates/global_time_series.bash | 2 +- zppy/templates/ilamb.bash | 2 +- .../{ => inclusions}/e3sm_to_cmip/default_metadata.json | 0 zppy/templates/{ => inclusions}/ilamb/cmip.cfg | 0 zppy/templates/{ => inclusions}/ilamb/ilamb.cfg | 0 zppy/templates/{ => inclusions}/slurm_header.sh | 0 zppy/templates/mpas_analysis.bash | 2 +- zppy/templates/tc_analysis.bash | 2 +- zppy/templates/ts.bash | 2 +- 14 files changed, 10 insertions(+), 10 deletions(-) rename zppy/{templates => examples}/e3sm_diags/lat_lon_conus.cfg (100%) rename zppy/templates/{ => inclusions}/e3sm_to_cmip/default_metadata.json (100%) rename zppy/templates/{ => inclusions}/ilamb/cmip.cfg (100%) rename zppy/templates/{ => inclusions}/ilamb/ilamb.cfg (100%) rename zppy/templates/{ => inclusions}/slurm_header.sh (100%) diff --git a/zppy/defaults/default.ini b/zppy/defaults/default.ini index 9bf5bdce..83120818 100644 --- a/zppy/defaults/default.ini +++ b/zppy/defaults/default.ini @@ -106,7 +106,7 @@ input_component = string(default="") [ts] area_nm = string(default="area") -cmip_metadata = string(default="e3sm_to_cmip/default_metadata.json") +cmip_metadata = string(default="inclusions/e3sm_to_cmip/default_metadata.json") # Days per file dpf = integer(default=30) extra_vars = string(default="") @@ -327,7 +327,7 @@ ts_years = string_list(default=list("")) # `years = "1-100",` would plot years 1 to 100 on the graphs. [ilamb] -cfg = string(default="ilamb/cmip.cfg") +cfg = string(default="inclusions/ilamb/cmip.cfg") # observational data path, default uses mache's "diagnostics_base_path" ilamb_obs = string(default="") # for land_only run diff --git a/zppy/templates/e3sm_diags/lat_lon_conus.cfg b/zppy/examples/e3sm_diags/lat_lon_conus.cfg similarity index 100% rename from zppy/templates/e3sm_diags/lat_lon_conus.cfg rename to zppy/examples/e3sm_diags/lat_lon_conus.cfg diff --git a/zppy/templates/bundle.bash b/zppy/templates/bundle.bash index 94f35f74..7ac01532 100644 --- a/zppy/templates/bundle.bash +++ b/zppy/templates/bundle.bash @@ -1,5 +1,5 @@ #!/bin/bash -{% include 'slurm_header.sh' %} +{% include 'inclusions/slurm_header.sh' %} # Turn on debug output if needed debug={{ debug }} diff --git a/zppy/templates/climo.bash b/zppy/templates/climo.bash index 64e3d00c..2af5cf5f 100644 --- a/zppy/templates/climo.bash +++ b/zppy/templates/climo.bash @@ -1,5 +1,5 @@ #!/bin/bash -{% include 'slurm_header.sh' %} +{% include 'inclusions/slurm_header.sh' %} {{ environment_commands }} # Turn on debug output if needed diff --git a/zppy/templates/e3sm_diags.bash b/zppy/templates/e3sm_diags.bash index b94dbd43..83a98a46 100644 --- a/zppy/templates/e3sm_diags.bash +++ b/zppy/templates/e3sm_diags.bash @@ -1,5 +1,5 @@ #!/bin/bash -{% include 'slurm_header.sh' %} +{% include 'inclusions/slurm_header.sh' %} {{ environment_commands }} diff --git a/zppy/templates/global_time_series.bash b/zppy/templates/global_time_series.bash index 8b0e79b8..b6bfc50a 100644 --- a/zppy/templates/global_time_series.bash +++ b/zppy/templates/global_time_series.bash @@ -1,5 +1,5 @@ #!/bin/bash -{% include 'slurm_header.sh' %} +{% include 'inclusions/slurm_header.sh' %} {{ environment_commands }} # Turn on debug output if needed diff --git a/zppy/templates/ilamb.bash b/zppy/templates/ilamb.bash index 4f584b9d..c65aa984 100644 --- a/zppy/templates/ilamb.bash +++ b/zppy/templates/ilamb.bash @@ -1,5 +1,5 @@ #!/bin/bash -{% include 'slurm_header.sh' %} +{% include 'inclusions/slurm_header.sh' %} {{ environment_commands }} diff --git a/zppy/templates/e3sm_to_cmip/default_metadata.json b/zppy/templates/inclusions/e3sm_to_cmip/default_metadata.json similarity index 100% rename from zppy/templates/e3sm_to_cmip/default_metadata.json rename to zppy/templates/inclusions/e3sm_to_cmip/default_metadata.json diff --git a/zppy/templates/ilamb/cmip.cfg b/zppy/templates/inclusions/ilamb/cmip.cfg similarity index 100% rename from zppy/templates/ilamb/cmip.cfg rename to zppy/templates/inclusions/ilamb/cmip.cfg diff --git a/zppy/templates/ilamb/ilamb.cfg b/zppy/templates/inclusions/ilamb/ilamb.cfg similarity index 100% rename from zppy/templates/ilamb/ilamb.cfg rename to zppy/templates/inclusions/ilamb/ilamb.cfg diff --git a/zppy/templates/slurm_header.sh b/zppy/templates/inclusions/slurm_header.sh similarity index 100% rename from zppy/templates/slurm_header.sh rename to zppy/templates/inclusions/slurm_header.sh diff --git a/zppy/templates/mpas_analysis.bash b/zppy/templates/mpas_analysis.bash index 15191738..e0b5d29a 100644 --- a/zppy/templates/mpas_analysis.bash +++ b/zppy/templates/mpas_analysis.bash @@ -1,5 +1,5 @@ #!/bin/bash -{% include 'slurm_header.sh' %} +{% include 'inclusions/slurm_header.sh' %} {{ environment_commands }} # Additional settings for MPAS-Analysis diff --git a/zppy/templates/tc_analysis.bash b/zppy/templates/tc_analysis.bash index 57740ae2..55b1fcb2 100644 --- a/zppy/templates/tc_analysis.bash +++ b/zppy/templates/tc_analysis.bash @@ -1,5 +1,5 @@ #!/bin/bash -{% include 'slurm_header.sh' %} +{% include 'inclusions/slurm_header.sh' %} {{ environment_commands }} diff --git a/zppy/templates/ts.bash b/zppy/templates/ts.bash index 7141e60a..30ac3a3b 100644 --- a/zppy/templates/ts.bash +++ b/zppy/templates/ts.bash @@ -1,5 +1,5 @@ #!/bin/bash -{% include 'slurm_header.sh' %} +{% include 'inclusions/slurm_header.sh' %} {{ environment_commands }} # Turn on debug output if needed From 7e0339bba40ee01f9bd503bd244a8826094a01e8 Mon Sep 17 00:00:00 2001 From: Ryan Forsyth Date: Tue, 5 Nov 2024 10:36:14 -0600 Subject: [PATCH 03/13] Update --- ...lobal_time_series_setup_only_chrysalis.cfg | 49 +++++++++++++++++++ ...min_case_global_time_series_setup_only.cfg | 49 +++++++++++++++++++ tests/integration/utils.py | 1 + zppy/global_time_series.py | 7 --- 4 files changed, 99 insertions(+), 7 deletions(-) create mode 100644 tests/integration/generated/test_min_case_global_time_series_setup_only_chrysalis.cfg create mode 100644 tests/integration/template_min_case_global_time_series_setup_only.cfg diff --git a/tests/integration/generated/test_min_case_global_time_series_setup_only_chrysalis.cfg b/tests/integration/generated/test_min_case_global_time_series_setup_only_chrysalis.cfg new file mode 100644 index 00000000..fb8a33aa --- /dev/null +++ b/tests/integration/generated/test_min_case_global_time_series_setup_only_chrysalis.cfg @@ -0,0 +1,49 @@ +[default] +case = "v3.LR.historical_0051" +constraint = "" +dry_run = "False" +environment_commands = "" +input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 +input_subdir = archive/atm/hist +mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_global_time_series_setup_only_output/unique_id/v3.LR.historical_0051" +partition = "debug" +qos = "regular" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_global_time_series_setup_only_www/unique_id" + +[ts] +active = True +e3sm_to_cmip_environment_commands = "" +walltime = "00:30:00" + + [[ atm_monthly_glb ]] + # Note global average won't work for 3D variables. + frequency = "monthly" + input_files = "eam.h0" + input_subdir = "archive/atm/hist" + mapping_file = "glb" + years = "1985:1995:5", + +[mpas_analysis] +active = True +anomalyRefYear = 1985 +climo_years = "1985-1989", "1990-1995", +enso_years = "1985-1989", "1990-1995", +mesh = "IcoswISC30E3r5" +parallelTaskCount = 6 +partition = "compute" +qos = "regular" +shortTermArchive = True +ts_years = "1985-1989", "1985-1995", +walltime = "00:30:00" + +# [global_time_series] +# active = True +# climo_years = "1985-1989", "1990-1995", +# experiment_name = "v3.LR.historical_0051" +# figstr = "v3.LR.historical_0051" +# moc_file=mocTimeSeries_1985-1995.nc +# ts_num_years = 5 +# ts_years = "1985-1989", "1985-1995", +# walltime = "00:30:00" +# years = "1985-1995", diff --git a/tests/integration/template_min_case_global_time_series_setup_only.cfg b/tests/integration/template_min_case_global_time_series_setup_only.cfg new file mode 100644 index 00000000..040586dd --- /dev/null +++ b/tests/integration/template_min_case_global_time_series_setup_only.cfg @@ -0,0 +1,49 @@ +[default] +case = "#expand case_name#" +constraint = "#expand constraint#" +dry_run = "#expand dry_run#" +environment_commands = "#expand environment_commands#" +input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/#expand case_name# +input_subdir = archive/atm/hist +mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" +output = "#expand user_output#zppy_min_case_global_time_series_setup_only_output/#expand unique_id#/#expand case_name#" +partition = "#expand partition_short#" +qos = "#expand qos_short#" +www = "#expand user_www#zppy_min_case_global_time_series_setup_only_www/#expand unique_id#" + +[ts] +active = True +e3sm_to_cmip_environment_commands = "#expand e3sm_to_cmip_environment_commands#" +walltime = "00:30:00" + + [[ atm_monthly_glb ]] + # Note global average won't work for 3D variables. + frequency = "monthly" + input_files = "eam.h0" + input_subdir = "archive/atm/hist" + mapping_file = "glb" + years = "1985:1995:5", + +[mpas_analysis] +active = True +anomalyRefYear = 1985 +climo_years = "1985-1989", "1990-1995", +enso_years = "1985-1989", "1990-1995", +mesh = "IcoswISC30E3r5" +parallelTaskCount = 6 +partition = "#expand partition_long#" +qos = "#expand qos_long#" +shortTermArchive = True +ts_years = "1985-1989", "1985-1995", +walltime = "#expand mpas_analysis_walltime#" + +# [global_time_series] +# active = True +# climo_years = "1985-1989", "1990-1995", +# experiment_name = "#expand case_name#" +# figstr = "#expand case_name#" +# moc_file=mocTimeSeries_1985-1995.nc +# ts_num_years = 5 +# ts_years = "1985-1989", "1985-1995", +# walltime = "00:30:00" +# years = "1985-1995", diff --git a/tests/integration/utils.py b/tests/integration/utils.py index 77f2f890..6204d915 100644 --- a/tests/integration/utils.py +++ b/tests/integration/utils.py @@ -309,6 +309,7 @@ def generate_cfgs(unified_testing=False, dry_run=False): "min_case_global_time_series_custom", "min_case_global_time_series_original_8_no_ocn", "min_case_global_time_series_original_8", + "min_case_global_time_series_setup_only", "min_case_ilamb_land_only", "min_case_ilamb", "min_case_mpas_analysis", diff --git a/zppy/global_time_series.py b/zppy/global_time_series.py index 674c8187..b66fba6f 100644 --- a/zppy/global_time_series.py +++ b/zppy/global_time_series.py @@ -49,13 +49,6 @@ def global_time_series(config, script_dir, existing_bundles, job_ids_file): c["global_time_series_dir"] = os.path.join(script_dir, f"{prefix}_dir") if not os.path.exists(c["global_time_series_dir"]): os.mkdir(c["global_time_series_dir"]) - scripts = ["coupled_global.py", "readTS.py", "ocean_month.py"] - for script in scripts: - script_template = template_env.get_template(script) - script_file = os.path.join(c["global_time_series_dir"], script) - with open(script_file, "w") as f: - f.write(script_template.render(**c)) - make_executable(script_file) # Create script with open(bash_file, "w") as f: f.write(template.render(**c)) From 70c07fb705e9a4c72b5f93ce62ffc19fd2ac3c04 Mon Sep 17 00:00:00 2001 From: Ryan Forsyth Date: Tue, 5 Nov 2024 17:24:23 -0600 Subject: [PATCH 04/13] Trying to run zi-global-time-series --- ...est_min_case_add_dependencies_chrysalis.cfg | 4 ++-- ...n_case_carryover_dependencies_chrysalis.cfg | 8 ++++---- ...se_e3sm_diags_depend_on_climo_chrysalis.cfg | 4 ++-- ...m_diags_depend_on_climo_mvm_1_chrysalis.cfg | 4 ++-- ...m_diags_depend_on_climo_mvm_2_chrysalis.cfg | 6 +++--- ..._case_e3sm_diags_depend_on_ts_chrysalis.cfg | 4 ++-- ...e3sm_diags_depend_on_ts_mvm_1_chrysalis.cfg | 4 ++-- ...e3sm_diags_depend_on_ts_mvm_2_chrysalis.cfg | 6 +++--- ...case_e3sm_diags_diurnal_cycle_chrysalis.cfg | 4 ++-- ...3sm_diags_diurnal_cycle_mvm_1_chrysalis.cfg | 4 ++-- ...3sm_diags_diurnal_cycle_mvm_2_chrysalis.cfg | 6 +++--- ...e3sm_diags_lat_lon_land_mvm_1_chrysalis.cfg | 4 ++-- ...e3sm_diags_lat_lon_land_mvm_2_chrysalis.cfg | 6 +++--- ...in_case_e3sm_diags_streamflow_chrysalis.cfg | 4 ++-- ...e_e3sm_diags_streamflow_mvm_1_chrysalis.cfg | 4 ++-- ...e_e3sm_diags_streamflow_mvm_2_chrysalis.cfg | 6 +++--- ...n_case_e3sm_diags_tc_analysis_chrysalis.cfg | 6 +++--- ..._e3sm_diags_tc_analysis_mvm_1_chrysalis.cfg | 6 +++--- ..._e3sm_diags_tc_analysis_mvm_2_chrysalis.cfg | 8 ++++---- ...sm_diags_tc_analysis_parallel_chrysalis.cfg | 6 +++--- ...sm_diags_tropical_subseasonal_chrysalis.cfg | 4 ++-- ...gs_tropical_subseasonal_mvm_1_chrysalis.cfg | 4 ++-- ...gs_tropical_subseasonal_mvm_2_chrysalis.cfg | 6 +++--- ...ase_global_time_series_custom_chrysalis.cfg | 4 ++-- ...global_time_series_original_8_chrysalis.cfg | 5 +++-- ...time_series_original_8_no_ocn_chrysalis.cfg | 4 ++-- ...global_time_series_setup_only_chrysalis.cfg | 4 ++-- .../test_min_case_ilamb_chrysalis.cfg | 4 ++-- ...test_min_case_ilamb_land_only_chrysalis.cfg | 4 ++-- .../test_min_case_mpas_analysis_chrysalis.cfg | 4 ++-- ...se_tc_analysis_simultaneous_1_chrysalis.cfg | 6 +++--- ...se_tc_analysis_simultaneous_2_chrysalis.cfg | 6 +++--- .../test_weekly_bundles_chrysalis.cfg | 8 ++++---- .../test_weekly_comprehensive_v2_chrysalis.cfg | 10 +++++----- .../test_weekly_comprehensive_v3_chrysalis.cfg | 18 +++++++++--------- .../update_weekly_expected_files_chrysalis.sh | 6 +++--- ..._min_case_global_time_series_original_8.cfg | 1 + tests/integration/utils.py | 2 +- zppy/templates/global_time_series.bash | 5 +++-- 39 files changed, 106 insertions(+), 103 deletions(-) diff --git a/tests/integration/generated/test_min_case_add_dependencies_chrysalis.cfg b/tests/integration/generated/test_min_case_add_dependencies_chrysalis.cfg index 2656fa7a..6cf5c2a2 100644 --- a/tests/integration/generated/test_min_case_add_dependencies_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_add_dependencies_chrysalis.cfg @@ -14,12 +14,12 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_add_dependencies_output/unique_id/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_add_dependencies_output/test-642-working-env-20241105/v3.LR.historical_0051" partition = "debug" qos = "regular" # ts is in 5 year increments ts_num_years = 5 -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_add_dependencies_www/unique_id" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_add_dependencies_www/test-642-working-env-20241105" # We want to produce diagnostics for 10 years. years = "1985:1995:10", diff --git a/tests/integration/generated/test_min_case_carryover_dependencies_chrysalis.cfg b/tests/integration/generated/test_min_case_carryover_dependencies_chrysalis.cfg index 721faaf9..d7dee131 100644 --- a/tests/integration/generated/test_min_case_carryover_dependencies_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_carryover_dependencies_chrysalis.cfg @@ -29,10 +29,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_carryover_dependencies_output/unique_id/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_carryover_dependencies_output/test-642-working-env-20241105/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_carryover_dependencies_www/unique_id" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_carryover_dependencies_www/test-642-working-env-20241105" years = "1985:1989:2", [climo] @@ -106,7 +106,7 @@ walltime = "00:30:00" # [tc_analysis] # # The second run should run in parallel with the first run. # active = True -# scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_min_case_carryover_dependencies_scratch/unique_id/v3.LR.historical_0051" +# scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_min_case_carryover_dependencies_scratch/test-642-working-env-20241105/v3.LR.historical_0051" # walltime = "00:30:00" [e3sm_diags] @@ -144,7 +144,7 @@ years = "1987:1989:2" partition = "compute" qos = "regular" ref_name = "v3.LR.historical_0051" - reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_carryover_dependencies_output/unique_id/v3.LR.historical_0051/post/atm/180x360_aave/clim" + reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_carryover_dependencies_output/test-642-working-env-20241105/v3.LR.historical_0051/post/atm/180x360_aave/clim" run_type = "model_vs_model" sets = "lat_lon", short_ref_name = "same simulation" diff --git a/tests/integration/generated/test_min_case_e3sm_diags_depend_on_climo_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_depend_on_climo_chrysalis.cfg index e8b4b4e0..9b4a0eb6 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_depend_on_climo_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_depend_on_climo_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_climo_output/unique_id/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_climo_output/test-642-working-env-20241105/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_climo_www/unique_id" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_climo_www/test-642-working-env-20241105" years = "1985:1989:4", [climo] diff --git a/tests/integration/generated/test_min_case_e3sm_diags_depend_on_climo_mvm_1_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_depend_on_climo_mvm_1_chrysalis.cfg index dab95aba..631c3121 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_depend_on_climo_mvm_1_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_depend_on_climo_mvm_1_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_climo_mvm_1_output/unique_id/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_climo_mvm_1_output/test-642-working-env-20241105/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_climo_mvm_1_www/unique_id" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_climo_mvm_1_www/test-642-working-env-20241105" years = "1985:1989:4", [climo] diff --git a/tests/integration/generated/test_min_case_e3sm_diags_depend_on_climo_mvm_2_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_depend_on_climo_mvm_2_chrysalis.cfg index 06e067dc..baacff0b 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_depend_on_climo_mvm_2_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_depend_on_climo_mvm_2_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_climo_mvm_2_output/unique_id/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_climo_mvm_2_output/test-642-working-env-20241105/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_climo_mvm_2_www/unique_id" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_climo_mvm_2_www/test-642-working-env-20241105" years = "1995:1999:4", [climo] @@ -42,7 +42,7 @@ walltime = "5:00:00" ref_start_yr = 1985 ref_years = "1985-1988", # Use _1 as reference - reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_climo_mvm_1_output/unique_id/v3.LR.historical_0051/post/atm/180x360_aave/clim" + reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_climo_mvm_1_output/test-642-working-env-20241105/v3.LR.historical_0051/post/atm/180x360_aave/clim" run_type = "model_vs_model" sets = "lat_lon","zonal_mean_xy","zonal_mean_2d","polar","cosp_histogram","meridional_mean_2d","annual_cycle_zonal_mean","zonal_mean_2d_stratosphere","aerosol_aeronet","aerosol_budget", short_ref_name = "v3.LR.historical_0051" diff --git a/tests/integration/generated/test_min_case_e3sm_diags_depend_on_ts_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_depend_on_ts_chrysalis.cfg index 9e47abd2..ad430520 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_depend_on_ts_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_depend_on_ts_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_ts_output/unique_id/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_ts_output/test-642-working-env-20241105/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_ts_www/unique_id" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_ts_www/test-642-working-env-20241105" years = "1985:1989:4", [ts] diff --git a/tests/integration/generated/test_min_case_e3sm_diags_depend_on_ts_mvm_1_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_depend_on_ts_mvm_1_chrysalis.cfg index fdb3025a..29d95d65 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_depend_on_ts_mvm_1_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_depend_on_ts_mvm_1_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_ts_mvm_1_output/unique_id/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_ts_mvm_1_output/test-642-working-env-20241105/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_ts_mvm_1_www/unique_id" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_ts_mvm_1_www/test-642-working-env-20241105" years = "1985:1989:4", [ts] diff --git a/tests/integration/generated/test_min_case_e3sm_diags_depend_on_ts_mvm_2_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_depend_on_ts_mvm_2_chrysalis.cfg index cc085aa1..adeafc7a 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_depend_on_ts_mvm_2_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_depend_on_ts_mvm_2_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_ts_mvm_2_output/unique_id/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_ts_mvm_2_output/test-642-working-env-20241105/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_ts_mvm_2_www/unique_id" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_ts_mvm_2_www/test-642-working-env-20241105" years = "1995:1999:4", [ts] @@ -44,7 +44,7 @@ walltime = "5:00:00" ref_start_yr = 1985 ref_years = "1985-1988", # Use _1 as reference - reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_ts_mvm_1_output/unique_id/v3.LR.historical_0051/post/atm/180x360_aave/clim" + reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_ts_mvm_1_output/test-642-working-env-20241105/v3.LR.historical_0051/post/atm/180x360_aave/clim" run_type = "model_vs_model" sets = "enso_diags","qbo", short_ref_name = "v3.LR.historical_0051" diff --git a/tests/integration/generated/test_min_case_e3sm_diags_diurnal_cycle_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_diurnal_cycle_chrysalis.cfg index 11e9983f..0e1c41ab 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_diurnal_cycle_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_diurnal_cycle_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_diurnal_cycle_output/unique_id/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_diurnal_cycle_output/test-642-working-env-20241105/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_diurnal_cycle_www/unique_id" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_diurnal_cycle_www/test-642-working-env-20241105" years = "1985:1989:4", [climo] diff --git a/tests/integration/generated/test_min_case_e3sm_diags_diurnal_cycle_mvm_1_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_diurnal_cycle_mvm_1_chrysalis.cfg index 0160066c..9c3d7cf2 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_diurnal_cycle_mvm_1_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_diurnal_cycle_mvm_1_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_diurnal_cycle_mvm_1_output/unique_id/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_diurnal_cycle_mvm_1_output/test-642-working-env-20241105/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_diurnal_cycle_mvm_1_www/unique_id" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_diurnal_cycle_mvm_1_www/test-642-working-env-20241105" years = "1985:1989:4", [climo] diff --git a/tests/integration/generated/test_min_case_e3sm_diags_diurnal_cycle_mvm_2_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_diurnal_cycle_mvm_2_chrysalis.cfg index 251d82c3..9ff3de07 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_diurnal_cycle_mvm_2_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_diurnal_cycle_mvm_2_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_diurnal_cycle_mvm_2_output/unique_id/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_diurnal_cycle_mvm_2_output/test-642-working-env-20241105/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_diurnal_cycle_mvm_2_www/unique_id" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_diurnal_cycle_mvm_2_www/test-642-working-env-20241105" years = "1995:1999:4", [climo] @@ -40,7 +40,7 @@ walltime = "5:00:00" ref_name = "v3.LR.historical_0051" ref_years = "1985-1988", # Use _1 as reference - reference_data_path_climo_diurnal = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_diurnal_cycle_mvm_1_output/unique_id/v3.LR.historical_0051/post/atm/180x360_aave/clim_diurnal_8xdaily" + reference_data_path_climo_diurnal = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_diurnal_cycle_mvm_1_output/test-642-working-env-20241105/v3.LR.historical_0051/post/atm/180x360_aave/clim_diurnal_8xdaily" run_type = "model_vs_model" sets = "diurnal_cycle", short_ref_name = "v3.LR.historical_0051" diff --git a/tests/integration/generated/test_min_case_e3sm_diags_lat_lon_land_mvm_1_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_lat_lon_land_mvm_1_chrysalis.cfg index f8074879..cbf22365 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_lat_lon_land_mvm_1_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_lat_lon_land_mvm_1_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_lat_lon_land_mvm_1_output/unique_id/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_lat_lon_land_mvm_1_output/test-642-working-env-20241105/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_lat_lon_land_mvm_1_www/unique_id" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_lat_lon_land_mvm_1_www/test-642-working-env-20241105" years = "1985:1989:4", [climo] diff --git a/tests/integration/generated/test_min_case_e3sm_diags_lat_lon_land_mvm_2_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_lat_lon_land_mvm_2_chrysalis.cfg index 723e6c43..cd5cd8a2 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_lat_lon_land_mvm_2_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_lat_lon_land_mvm_2_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_lat_lon_land_mvm_2_output/unique_id/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_lat_lon_land_mvm_2_output/test-642-working-env-20241105/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_lat_lon_land_mvm_2_www/unique_id" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_lat_lon_land_mvm_2_www/test-642-working-env-20241105" years = "1995:1999:4", [climo] @@ -41,7 +41,7 @@ walltime = "5:00:00" ref_start_yr = 1985 ref_years = "1985-1988", # Use _1 as reference - reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_lat_lon_land_mvm_1_output/unique_id/v3.LR.historical_0051/post/lnd/180x360_aave/clim" + reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_lat_lon_land_mvm_1_output/test-642-working-env-20241105/v3.LR.historical_0051/post/lnd/180x360_aave/clim" run_type = "model_vs_model" sets = "lat_lon_land", short_ref_name = "v3.LR.historical_0051" diff --git a/tests/integration/generated/test_min_case_e3sm_diags_streamflow_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_streamflow_chrysalis.cfg index 9a82f303..d31e0330 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_streamflow_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_streamflow_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_streamflow_output/unique_id/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_streamflow_output/test-642-working-env-20241105/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_streamflow_www/unique_id" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_streamflow_www/test-642-working-env-20241105" years = "1985:1989:4", [ts] diff --git a/tests/integration/generated/test_min_case_e3sm_diags_streamflow_mvm_1_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_streamflow_mvm_1_chrysalis.cfg index bb8de9cf..0c570327 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_streamflow_mvm_1_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_streamflow_mvm_1_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_streamflow_mvm_1_output/unique_id/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_streamflow_mvm_1_output/test-642-working-env-20241105/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_streamflow_mvm_1_www/unique_id" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_streamflow_mvm_1_www/test-642-working-env-20241105" years = "1985:1989:4", [ts] diff --git a/tests/integration/generated/test_min_case_e3sm_diags_streamflow_mvm_2_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_streamflow_mvm_2_chrysalis.cfg index 147d851f..a335c302 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_streamflow_mvm_2_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_streamflow_mvm_2_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_streamflow_mvm_2_output/unique_id/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_streamflow_mvm_2_output/test-642-working-env-20241105/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_streamflow_mvm_2_www/unique_id" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_streamflow_mvm_2_www/test-642-working-env-20241105" years = "1995:1999:4", [ts] @@ -45,7 +45,7 @@ walltime = "5:00:00" ref_start_yr = 1985 ref_years = "1985-1988", # Use _1 as reference - reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_streamflow_mvm_1_output/unique_id/v3.LR.historical_0051/post/atm/180x360_aave/clim" + reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_streamflow_mvm_1_output/test-642-working-env-20241105/v3.LR.historical_0051/post/atm/180x360_aave/clim" # reference_data_path_ts_rof determined automatically run_type = "model_vs_model" sets="streamflow" diff --git a/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_chrysalis.cfg index df05210a..92146154 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_chrysalis.cfg @@ -6,15 +6,15 @@ environment_commands = "" input = /lcrc/group/e3sm/ac.forsyth2//E3SMv2/v2.LR.historical_0201 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_output/unique_id/v2.LR.historical_0201" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_output/test-642-working-env-20241105/v2.LR.historical_0201" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_www/unique_id" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_www/test-642-working-env-20241105" years = "1985:1987:2", [tc_analysis] active = True -scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_scratch/unique_id/v2.LR.historical_0201" +scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_scratch/test-642-working-env-20241105/v2.LR.historical_0201" walltime = "00:30:00" [e3sm_diags] diff --git a/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_mvm_1_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_mvm_1_chrysalis.cfg index aa29ad07..f043c101 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_mvm_1_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_mvm_1_chrysalis.cfg @@ -6,13 +6,13 @@ environment_commands = "" input = /lcrc/group/e3sm/ac.forsyth2//E3SMv2/v2.LR.historical_0201 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_mvm_1_output/unique_id/v2.LR.historical_0201" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_mvm_1_output/test-642-working-env-20241105/v2.LR.historical_0201" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_mvm_2_www/unique_id" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_mvm_2_www/test-642-working-env-20241105" years = "1985:1987:2", [tc_analysis] active = True -scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_mvm_1_scratch/unique_id/v2.LR.historical_0201" +scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_mvm_1_scratch/test-642-working-env-20241105/v2.LR.historical_0201" walltime = "00:30:00" diff --git a/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_mvm_2_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_mvm_2_chrysalis.cfg index a226f2ef..5faca1c5 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_mvm_2_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_mvm_2_chrysalis.cfg @@ -7,15 +7,15 @@ environment_commands = "" input = /lcrc/group/e3sm/ac.forsyth2//E3SMv2/v2.LR.historical_0201 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_mvm_2_output/unique_id/v2.LR.historical_0201" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_mvm_2_output/test-642-working-env-20241105/v2.LR.historical_0201" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_mvm_2_www/unique_id" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_mvm_2_www/test-642-working-env-20241105" years = "1995:1997:2", [tc_analysis] active = True -scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_mvm_2_scratch/unique_id/v2.LR.historical_0201" +scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_mvm_2_scratch/test-642-working-env-20241105/v2.LR.historical_0201" walltime = "00:30:00" [e3sm_diags] @@ -38,7 +38,7 @@ walltime = "5:00:00" ref_start_yr = 1985 ref_years = "1985-1986", # Use _1 as reference - reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_mvm_1_output/unique_id/v2.LR.historical_0201/post/atm/180x360_aave/clim" + reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_mvm_1_output/test-642-working-env-20241105/v2.LR.historical_0201/post/atm/180x360_aave/clim" # reference_data_path_tc determined automatically run_type = "model_vs_model" sets = "tc_analysis", diff --git a/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_parallel_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_parallel_chrysalis.cfg index c3a7e505..bd772186 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_parallel_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_parallel_chrysalis.cfg @@ -6,15 +6,15 @@ environment_commands = "" input = /lcrc/group/e3sm/ac.forsyth2//E3SMv2/v2.LR.historical_0201 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_parallel_output/unique_id/v2.LR.historical_0201" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_parallel_output/test-642-working-env-20241105/v2.LR.historical_0201" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_parallel_www/unique_id" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_parallel_www/test-642-working-env-20241105" years = "1985:1989:2", [tc_analysis] active = True -scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_parallel_scratch/unique_id/v2.LR.historical_0201" +scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_parallel_scratch/test-642-working-env-20241105/v2.LR.historical_0201" walltime = "00:30:00" [e3sm_diags] diff --git a/tests/integration/generated/test_min_case_e3sm_diags_tropical_subseasonal_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_tropical_subseasonal_chrysalis.cfg index feaa8fe1..7e15ee56 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_tropical_subseasonal_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_tropical_subseasonal_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tropical_subseasonal_output/unique_id/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tropical_subseasonal_output/test-642-working-env-20241105/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_tropical_subseasonal_www/unique_id" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_tropical_subseasonal_www/test-642-working-env-20241105" years = "1985:1989:4", [ts] diff --git a/tests/integration/generated/test_min_case_e3sm_diags_tropical_subseasonal_mvm_1_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_tropical_subseasonal_mvm_1_chrysalis.cfg index 7e9a2d31..a4400dca 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_tropical_subseasonal_mvm_1_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_tropical_subseasonal_mvm_1_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tropical_subseasonal_mvm_1_output/unique_id/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tropical_subseasonal_mvm_1_output/test-642-working-env-20241105/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_tropical_subseasonal_mvm_1_www/unique_id" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_tropical_subseasonal_mvm_1_www/test-642-working-env-20241105" years = "1985:1989:4", [ts] diff --git a/tests/integration/generated/test_min_case_e3sm_diags_tropical_subseasonal_mvm_2_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_tropical_subseasonal_mvm_2_chrysalis.cfg index 233569cc..503e8e55 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_tropical_subseasonal_mvm_2_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_tropical_subseasonal_mvm_2_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tropical_subseasonal_mvm_2_output/unique_id/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tropical_subseasonal_mvm_2_output/test-642-working-env-20241105/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_tropical_subseasonal_mvm_2_www/unique_id" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_tropical_subseasonal_mvm_2_www/test-642-working-env-20241105" years = "1995:1999:4", [ts] @@ -44,7 +44,7 @@ walltime = "5:00:00" ref_start_yr = 1985 ref_years = "1985-1988", # Use _1 as reference - reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tropical_subseasonal_mvm_1_output/unique_id/v3.LR.historical_0051/post/atm/180x360_aave/clim" + reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tropical_subseasonal_mvm_1_output/test-642-working-env-20241105/v3.LR.historical_0051/post/atm/180x360_aave/clim" # reference_data_path_daily is determined automatically run_type = "model_vs_model" sets = "tropical_subseasonal", diff --git a/tests/integration/generated/test_min_case_global_time_series_custom_chrysalis.cfg b/tests/integration/generated/test_min_case_global_time_series_custom_chrysalis.cfg index 3a648737..de9e344c 100644 --- a/tests/integration/generated/test_min_case_global_time_series_custom_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_global_time_series_custom_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_global_time_series_custom_output/unique_id/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_global_time_series_custom_output/test-642-working-env-20241105/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_global_time_series_custom_www/unique_id" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_global_time_series_custom_www/test-642-working-env-20241105" [ts] active = True diff --git a/tests/integration/generated/test_min_case_global_time_series_original_8_chrysalis.cfg b/tests/integration/generated/test_min_case_global_time_series_original_8_chrysalis.cfg index d1395bb3..ebb7b77e 100644 --- a/tests/integration/generated/test_min_case_global_time_series_original_8_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_global_time_series_original_8_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_global_time_series_original_8_output/unique_id/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_global_time_series_original_8_output/test-642-working-env-20241105/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_global_time_series_original_8_www/unique_id" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_global_time_series_original_8_www/test-642-working-env-20241105" [ts] active = True @@ -40,6 +40,7 @@ walltime = "00:30:00" [global_time_series] active = True climo_years = "1985-1989", "1990-1995", +environment_commands = "source /home/ac.forsyth2/miniconda3/etc/profile.d/conda.sh; conda activate zppy-interfaces-dev-20241104" # TODO: Set zi_environment_commands in utils.py experiment_name = "v3.LR.historical_0051" figstr = "v3.LR.historical_0051" moc_file=mocTimeSeries_1985-1995.nc diff --git a/tests/integration/generated/test_min_case_global_time_series_original_8_no_ocn_chrysalis.cfg b/tests/integration/generated/test_min_case_global_time_series_original_8_no_ocn_chrysalis.cfg index 188b041b..2ffe44be 100644 --- a/tests/integration/generated/test_min_case_global_time_series_original_8_no_ocn_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_global_time_series_original_8_no_ocn_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_global_time_series_original_8_no_ocn_output/unique_id/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_global_time_series_original_8_no_ocn_output/test-642-working-env-20241105/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_global_time_series_original_8_no_ocn_www/unique_id" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_global_time_series_original_8_no_ocn_www/test-642-working-env-20241105" [ts] active = True diff --git a/tests/integration/generated/test_min_case_global_time_series_setup_only_chrysalis.cfg b/tests/integration/generated/test_min_case_global_time_series_setup_only_chrysalis.cfg index fb8a33aa..fe647e33 100644 --- a/tests/integration/generated/test_min_case_global_time_series_setup_only_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_global_time_series_setup_only_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_global_time_series_setup_only_output/unique_id/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_global_time_series_setup_only_output/test-642-working-env-20241105/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_global_time_series_setup_only_www/unique_id" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_global_time_series_setup_only_www/test-642-working-env-20241105" [ts] active = True diff --git a/tests/integration/generated/test_min_case_ilamb_chrysalis.cfg b/tests/integration/generated/test_min_case_ilamb_chrysalis.cfg index 2c361140..40a86cbc 100644 --- a/tests/integration/generated/test_min_case_ilamb_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_ilamb_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_ilamb_output/unique_id/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_ilamb_output/test-642-working-env-20241105/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_ilamb_www/unique_id" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_ilamb_www/test-642-working-env-20241105" [ts] active = True diff --git a/tests/integration/generated/test_min_case_ilamb_land_only_chrysalis.cfg b/tests/integration/generated/test_min_case_ilamb_land_only_chrysalis.cfg index 89b08f57..6784cfc6 100644 --- a/tests/integration/generated/test_min_case_ilamb_land_only_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_ilamb_land_only_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_ilamb_land_only_output/unique_id/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_ilamb_land_only_output/test-642-working-env-20241105/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_ilamb_land_only_www/unique_id" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_ilamb_land_only_www/test-642-working-env-20241105" [ts] active = True diff --git a/tests/integration/generated/test_min_case_mpas_analysis_chrysalis.cfg b/tests/integration/generated/test_min_case_mpas_analysis_chrysalis.cfg index 0cf4232b..ca56e0cb 100644 --- a/tests/integration/generated/test_min_case_mpas_analysis_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_mpas_analysis_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_mpas_analysis_output/unique_id/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_mpas_analysis_output/test-642-working-env-20241105/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_mpas_analysis_www/unique_id" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_mpas_analysis_www/test-642-working-env-20241105" [mpas_analysis] active = True diff --git a/tests/integration/generated/test_min_case_tc_analysis_simultaneous_1_chrysalis.cfg b/tests/integration/generated/test_min_case_tc_analysis_simultaneous_1_chrysalis.cfg index 41de5e34..0e2aeeee 100644 --- a/tests/integration/generated/test_min_case_tc_analysis_simultaneous_1_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_tc_analysis_simultaneous_1_chrysalis.cfg @@ -6,13 +6,13 @@ environment_commands = "" input = /lcrc/group/e3sm/ac.forsyth2//E3SMv2/v2.LR.historical_0201 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_tc_analysis_simultaneous_1_output/unique_id/v2.LR.historical_0201" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_tc_analysis_simultaneous_1_output/test-642-working-env-20241105/v2.LR.historical_0201" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_tc_analysis_simultaneous_1_www/unique_id" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_tc_analysis_simultaneous_1_www/test-642-working-env-20241105" years = "1985:1987:2", [tc_analysis] active = True -scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_min_case_tc_analysis_simultaneous_1_scratch/unique_id/v2.LR.historical_0201" +scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_min_case_tc_analysis_simultaneous_1_scratch/test-642-working-env-20241105/v2.LR.historical_0201" walltime = "00:30:00" diff --git a/tests/integration/generated/test_min_case_tc_analysis_simultaneous_2_chrysalis.cfg b/tests/integration/generated/test_min_case_tc_analysis_simultaneous_2_chrysalis.cfg index 71880091..c9ee5501 100644 --- a/tests/integration/generated/test_min_case_tc_analysis_simultaneous_2_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_tc_analysis_simultaneous_2_chrysalis.cfg @@ -8,13 +8,13 @@ environment_commands = "" input = /lcrc/group/e3sm/ac.forsyth2//E3SMv2/v2.LR.historical_0201 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_tc_analysis_simultaneous_2_output/unique_id/v2.LR.historical_0201" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_tc_analysis_simultaneous_2_output/test-642-working-env-20241105/v2.LR.historical_0201" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_tc_analysis_simultaneous_2_www/unique_id" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_tc_analysis_simultaneous_2_www/test-642-working-env-20241105" years = "1985:1987:2", [tc_analysis] active = True -scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_min_case_tc_analysis_simultaneous_2_scratch/unique_id/v2.LR.historical_0201" +scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_min_case_tc_analysis_simultaneous_2_scratch/test-642-working-env-20241105/v2.LR.historical_0201" walltime = "00:30:00" diff --git a/tests/integration/generated/test_weekly_bundles_chrysalis.cfg b/tests/integration/generated/test_weekly_bundles_chrysalis.cfg index a16129e3..e92baaed 100644 --- a/tests/integration/generated/test_weekly_bundles_chrysalis.cfg +++ b/tests/integration/generated/test_weekly_bundles_chrysalis.cfg @@ -30,11 +30,11 @@ input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" # To run this test, edit `output` and `www` in this file, along with `actual_images_dir` in test_bundles.py -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_bundles_output/unique_id/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_bundles_output/test-642-working-env-20241105/v3.LR.historical_0051" partition = "compute" qos = "regular" walltime = "07:00:00" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_weekly_bundles_www/unique_id" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_weekly_bundles_www/test-642-working-env-20241105" [bundle] @@ -99,7 +99,7 @@ years = "1985:1989:2", # [tc_analysis] # active = True # bundle = "bundle3" # Let bundle1 finish first because "e3sm_diags: atm_monthly_180x360_aave_mvm" requires "ts: atm_monthly_180x360_aave" -# scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_weekly_bundles_scratch/unique_id/v3.LR.historical_0051" +# scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_weekly_bundles_scratch/test-642-working-env-20241105/v3.LR.historical_0051" # years = "1985:1989:2", [e3sm_diags] @@ -127,7 +127,7 @@ years = "1985:1989:2", ref_name = "v3.LR.historical_0051" ref_start_yr = 1985 ref_years = "1985-1986", - reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_bundles_output/unique_id/v3.LR.historical_0051/post/atm/180x360_aave/clim" + reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_bundles_output/test-642-working-env-20241105/v3.LR.historical_0051/post/atm/180x360_aave/clim" run_type = "model_vs_model" # TODO: Add "tc_analysis" back in after empty dat is resolved. sets = "polar","enso_diags","streamflow", diff --git a/tests/integration/generated/test_weekly_comprehensive_v2_chrysalis.cfg b/tests/integration/generated/test_weekly_comprehensive_v2_chrysalis.cfg index b1bd857b..0f25f1fc 100644 --- a/tests/integration/generated/test_weekly_comprehensive_v2_chrysalis.cfg +++ b/tests/integration/generated/test_weekly_comprehensive_v2_chrysalis.cfg @@ -7,10 +7,10 @@ fail_on_dependency_skip = True input = /lcrc/group/e3sm/ac.forsyth2//E3SMv2/v2.LR.historical_0201 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v2_output/unique_id/v2.LR.historical_0201" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v2_output/test-642-working-env-20241105/v2.LR.historical_0201" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_weekly_comprehensive_v2_www/unique_id" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_weekly_comprehensive_v2_www/test-642-working-env-20241105" years = "1980:1984:2", [climo] @@ -86,7 +86,7 @@ walltime = "00:30:00" [tc_analysis] active = True -scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_weekly_comprehensive_v2_scratch/unique_id/v2.LR.historical_0201" +scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_weekly_comprehensive_v2_scratch/test-642-working-env-20241105/v2.LR.historical_0201" walltime = "00:30:00" [e3sm_diags] @@ -127,7 +127,7 @@ years = "1982:1984:2", partition = "compute" qos = "regular" ref_name = "v2.LR.historical_0201" - reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v2_output/unique_id/v2.LR.historical_0201/post/atm/180x360_aave/clim" + reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v2_output/test-642-working-env-20241105/v2.LR.historical_0201/post/atm/180x360_aave/clim" run_type = "model_vs_model" short_ref_name = "same simulation" swap_test_ref = False @@ -144,7 +144,7 @@ years = "1982:1984:2", partition = "compute" qos = "regular" ref_name = "v2.LR.historical_0201" - reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v2_output/unique_id/v2.LR.historical_0201/post/lnd/180x360_aave/clim" + reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v2_output/test-642-working-env-20241105/v2.LR.historical_0201/post/lnd/180x360_aave/clim" run_type = "model_vs_model" sets = "lat_lon_land", short_ref_name = "same simulation" diff --git a/tests/integration/generated/test_weekly_comprehensive_v3_chrysalis.cfg b/tests/integration/generated/test_weekly_comprehensive_v3_chrysalis.cfg index 62aac29c..f16f0d0a 100644 --- a/tests/integration/generated/test_weekly_comprehensive_v3_chrysalis.cfg +++ b/tests/integration/generated/test_weekly_comprehensive_v3_chrysalis.cfg @@ -9,10 +9,10 @@ guess_section_parameters = False input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v3_output/unique_id/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v3_output/test-642-working-env-20241105/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_weekly_comprehensive_v3_www/unique_id" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_weekly_comprehensive_v3_www/test-642-working-env-20241105" years = "1985:1989:2", [climo] @@ -91,7 +91,7 @@ walltime = "00:30:00" # TODO: Add "tc_analysis" back in after empty dat is resolved. # [tc_analysis] # active = True -# scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_weekly_comprehensive_v3_scratch/unique_id/v3.LR.historical_0051" +# scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_weekly_comprehensive_v3_scratch/test-642-working-env-20241105/v3.LR.historical_0051" # walltime = "00:30:00" [e3sm_diags] @@ -152,16 +152,16 @@ tc_obs = "/lcrc/group/e3sm/diagnostics/observations/Atm/tc-analysis/" tag = "model_vs_model" ts_num_years_ref = 2 # Reference paths - reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v3_output/unique_id/v3.LR.historical_0051/post/atm/180x360_aave/clim" + reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v3_output/test-642-working-env-20241105/v3.LR.historical_0051/post/atm/180x360_aave/clim" # mvm streamflow only gauges_path = "/lcrc/group/e3sm/diagnostics/observations/Atm/time-series/GSIM/GSIM_catchment_characteristics_all_1km2.csv" - reference_data_path_ts_rof = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v3_output/unique_id/v3.LR.historical_0051/post/rof/native/ts/monthly" + reference_data_path_ts_rof = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v3_output/test-642-working-env-20241105/v3.LR.historical_0051/post/rof/native/ts/monthly" # mvm diurnal_cycle only - reference_data_path_climo_diurnal = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v3_output/unique_id/v3.LR.historical_0051/post/atm/180x360_aave/clim_diurnal_8xdaily" + reference_data_path_climo_diurnal = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v3_output/test-642-working-env-20241105/v3.LR.historical_0051/post/atm/180x360_aave/clim_diurnal_8xdaily" # mvm "enso_diags", "qbo", "area_mean_time_series" - reference_data_path_ts = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v3_output/unique_id/v3.LR.historical_0051/post/atm/180x360_aave/ts/monthly" + reference_data_path_ts = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v3_output/test-642-working-env-20241105/v3.LR.historical_0051/post/atm/180x360_aave/ts/monthly" # mvm tropical_subseasonal only - reference_data_path_ts_daily = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v3_output/unique_id/v3.LR.historical_0051/post/atm/180x360_aave/ts/daily" + reference_data_path_ts_daily = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v3_output/test-642-working-env-20241105/v3.LR.historical_0051/post/atm/180x360_aave/ts/daily" [[ lnd_monthly_mvm_lnd ]] # Test model-vs-model using the same files as the reference @@ -177,7 +177,7 @@ tc_obs = "/lcrc/group/e3sm/diagnostics/observations/Atm/tc-analysis/" tag = "model_vs_model" ts_num_years_ref = 2 # Reference paths - reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v3_output/unique_id/v3.LR.historical_0051/post/lnd/180x360_aave/clim" + reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v3_output/test-642-working-env-20241105/v3.LR.historical_0051/post/lnd/180x360_aave/clim" [mpas_analysis] diff --git a/tests/integration/generated/update_weekly_expected_files_chrysalis.sh b/tests/integration/generated/update_weekly_expected_files_chrysalis.sh index a2967214..bb19aa41 100755 --- a/tests/integration/generated/update_weekly_expected_files_chrysalis.sh +++ b/tests/integration/generated/update_weekly_expected_files_chrysalis.sh @@ -9,13 +9,13 @@ do # Your output will now become the new expectation. # Copy output so you don't have to rerun zppy to generate the output. if [[ "${test_name,,}" == "comprehensive_v2" ]]; then - cp -r /lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_weekly_${test_name}_www/unique_id/v2.LR.historical_0201 /lcrc/group/e3sm/public_html/zppy_test_resources/expected_${test_name} + cp -r /lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_weekly_${test_name}_www/test-642-working-env-20241105/v2.LR.historical_0201 /lcrc/group/e3sm/public_html/zppy_test_resources/expected_${test_name} else - cp -r /lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_weekly_${test_name}_www/unique_id/v3.LR.historical_0051 /lcrc/group/e3sm/public_html/zppy_test_resources/expected_${test_name} + cp -r /lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_weekly_${test_name}_www/test-642-working-env-20241105/v3.LR.historical_0051 /lcrc/group/e3sm/public_html/zppy_test_resources/expected_${test_name} fi if [[ "${test_name,,}" == "bundles" ]]; then mkdir -p /lcrc/group/e3sm/public_html/zppy_test_resources/expected_bundles/bundle_files - cp -r /lcrc/group/e3sm/ac.forsyth2/zppy_weekly_bundles_output/unique_id/v3.LR.historical_0051/post/scripts/bundle*.bash /lcrc/group/e3sm/public_html/zppy_test_resources/expected_bundles/bundle_files + cp -r /lcrc/group/e3sm/ac.forsyth2/zppy_weekly_bundles_output/test-642-working-env-20241105/v3.LR.historical_0051/post/scripts/bundle*.bash /lcrc/group/e3sm/public_html/zppy_test_resources/expected_bundles/bundle_files fi zppy_top_level=$(pwd) cd /lcrc/group/e3sm/public_html/zppy_test_resources/expected_${test_name} diff --git a/tests/integration/template_min_case_global_time_series_original_8.cfg b/tests/integration/template_min_case_global_time_series_original_8.cfg index 177f7ad8..97396a52 100644 --- a/tests/integration/template_min_case_global_time_series_original_8.cfg +++ b/tests/integration/template_min_case_global_time_series_original_8.cfg @@ -40,6 +40,7 @@ walltime = "#expand mpas_analysis_walltime#" [global_time_series] active = True climo_years = "1985-1989", "1990-1995", +environment_commands = "source /home/ac.forsyth2/miniconda3/etc/profile.d/conda.sh; conda activate zppy-interfaces-dev-20241104" # TODO: Set zi_environment_commands in utils.py experiment_name = "#expand case_name#" figstr = "#expand case_name#" moc_file=mocTimeSeries_1985-1995.nc diff --git a/tests/integration/utils.py b/tests/integration/utils.py index 6204d915..dd331c7d 100644 --- a/tests/integration/utils.py +++ b/tests/integration/utils.py @@ -7,7 +7,7 @@ from mache import MachineInfo from PIL import Image, ImageChops, ImageDraw -UNIQUE_ID = "unique_id" +UNIQUE_ID = "test-642-working-env-20241105" # Image checking ########################################################## diff --git a/zppy/templates/global_time_series.bash b/zppy/templates/global_time_series.bash index b6bfc50a..01ab8f7a 100644 --- a/zppy/templates/global_time_series.bash +++ b/zppy/templates/global_time_series.bash @@ -18,11 +18,12 @@ echo "RUNNING ${id}" > {{ prefix }}.status # Generate global time series plots ################################################################################ +results_dir={{ prefix }}_results -zppy-interfaces global-time-series --use_ocn={{ use_ocn }} --global_ts_dir={{ global_time_series_dir }} --input={{ input }} --input_subdir={{ input_subdir }} --moc_file={{ moc_file }} --case_dir={{ output }} --experiment_name={{ experiment_name }} --figstr={{ figstr }} --color={{ color }} --ts_num_years={{ ts_num_years }} --plots_original={{ plots_original }} --atmosphere_only={{ atmosphere_only }} --plots_atm={{ plots_atm }} --plots_ice={{ plots_ice }} --plots_lnd={{ plots_lnd }} --plots_ocn={{ plots_ocn }} --regions={{ regions }} --start_yr={{ year1 }} --end_yr={{ year2 }} +zi-global-time-series --use_ocn {{ use_ocn }} --global_ts_dir {{ global_time_series_dir }} --input {{ input }} --input_subdir {{ input_subdir }} --moc_file {{ moc_file }} --case_dir {{ output }} --experiment_name {{ experiment_name }} --figstr {{ figstr }} --color {{ color }} --ts_num_years {{ ts_num_years }} --plots_original {{ plots_original }} --atmosphere_only {{ atmosphere_only }} --plots_atm {{ plots_atm }} --plots_ice {{ plots_ice }} --plots_lnd {{ plots_lnd }} --plots_ocn {{ plots_ocn }} --regions {{ regions }} --results_dir ${results_dir} --start_yr {{ year1 }} --end_yr {{ year2 }} echo 'Copy images to directory' -results_dir={{ prefix }}_results + results_dir_absolute_path={{ scriptDir }}/${results_dir} mkdir -p ${results_dir_absolute_path} cp *.pdf ${results_dir_absolute_path} From 106919bcf1d2513a7230c520aacf22159dbae83e Mon Sep 17 00:00:00 2001 From: Ryan Forsyth Date: Thu, 21 Nov 2024 12:45:47 -0600 Subject: [PATCH 05/13] zppy calling zi works --- ...est_min_case_add_dependencies_chrysalis.cfg | 4 ++-- ...n_case_carryover_dependencies_chrysalis.cfg | 8 ++++---- ...se_e3sm_diags_depend_on_climo_chrysalis.cfg | 4 ++-- ...m_diags_depend_on_climo_mvm_1_chrysalis.cfg | 4 ++-- ...m_diags_depend_on_climo_mvm_2_chrysalis.cfg | 6 +++--- ..._case_e3sm_diags_depend_on_ts_chrysalis.cfg | 4 ++-- ...e3sm_diags_depend_on_ts_mvm_1_chrysalis.cfg | 4 ++-- ...e3sm_diags_depend_on_ts_mvm_2_chrysalis.cfg | 6 +++--- ...case_e3sm_diags_diurnal_cycle_chrysalis.cfg | 4 ++-- ...3sm_diags_diurnal_cycle_mvm_1_chrysalis.cfg | 4 ++-- ...3sm_diags_diurnal_cycle_mvm_2_chrysalis.cfg | 6 +++--- ...e3sm_diags_lat_lon_land_mvm_1_chrysalis.cfg | 4 ++-- ...e3sm_diags_lat_lon_land_mvm_2_chrysalis.cfg | 6 +++--- ...in_case_e3sm_diags_streamflow_chrysalis.cfg | 4 ++-- ...e_e3sm_diags_streamflow_mvm_1_chrysalis.cfg | 4 ++-- ...e_e3sm_diags_streamflow_mvm_2_chrysalis.cfg | 6 +++--- ...n_case_e3sm_diags_tc_analysis_chrysalis.cfg | 6 +++--- ..._e3sm_diags_tc_analysis_mvm_1_chrysalis.cfg | 6 +++--- ..._e3sm_diags_tc_analysis_mvm_2_chrysalis.cfg | 8 ++++---- ...sm_diags_tc_analysis_parallel_chrysalis.cfg | 6 +++--- ...sm_diags_tropical_subseasonal_chrysalis.cfg | 4 ++-- ...gs_tropical_subseasonal_mvm_1_chrysalis.cfg | 4 ++-- ...gs_tropical_subseasonal_mvm_2_chrysalis.cfg | 6 +++--- ...ase_global_time_series_custom_chrysalis.cfg | 4 ++-- ...global_time_series_original_8_chrysalis.cfg | 6 +++--- ...time_series_original_8_no_ocn_chrysalis.cfg | 4 ++-- ...global_time_series_setup_only_chrysalis.cfg | 4 ++-- .../test_min_case_ilamb_chrysalis.cfg | 4 ++-- ...test_min_case_ilamb_land_only_chrysalis.cfg | 4 ++-- .../test_min_case_mpas_analysis_chrysalis.cfg | 4 ++-- ...se_tc_analysis_simultaneous_1_chrysalis.cfg | 6 +++--- ...se_tc_analysis_simultaneous_2_chrysalis.cfg | 6 +++--- .../test_weekly_bundles_chrysalis.cfg | 8 ++++---- .../test_weekly_comprehensive_v2_chrysalis.cfg | 10 +++++----- .../test_weekly_comprehensive_v3_chrysalis.cfg | 18 +++++++++--------- .../update_weekly_expected_files_chrysalis.sh | 6 +++--- ..._min_case_global_time_series_original_8.cfg | 2 +- tests/integration/utils.py | 2 +- zppy/templates/global_time_series.bash | 9 +++------ 39 files changed, 106 insertions(+), 109 deletions(-) diff --git a/tests/integration/generated/test_min_case_add_dependencies_chrysalis.cfg b/tests/integration/generated/test_min_case_add_dependencies_chrysalis.cfg index 6cf5c2a2..57cffc6e 100644 --- a/tests/integration/generated/test_min_case_add_dependencies_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_add_dependencies_chrysalis.cfg @@ -14,12 +14,12 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_add_dependencies_output/test-642-working-env-20241105/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_add_dependencies_output/test-642-working-env-20241121/v3.LR.historical_0051" partition = "debug" qos = "regular" # ts is in 5 year increments ts_num_years = 5 -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_add_dependencies_www/test-642-working-env-20241105" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_add_dependencies_www/test-642-working-env-20241121" # We want to produce diagnostics for 10 years. years = "1985:1995:10", diff --git a/tests/integration/generated/test_min_case_carryover_dependencies_chrysalis.cfg b/tests/integration/generated/test_min_case_carryover_dependencies_chrysalis.cfg index d7dee131..36b9f93a 100644 --- a/tests/integration/generated/test_min_case_carryover_dependencies_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_carryover_dependencies_chrysalis.cfg @@ -29,10 +29,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_carryover_dependencies_output/test-642-working-env-20241105/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_carryover_dependencies_output/test-642-working-env-20241121/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_carryover_dependencies_www/test-642-working-env-20241105" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_carryover_dependencies_www/test-642-working-env-20241121" years = "1985:1989:2", [climo] @@ -106,7 +106,7 @@ walltime = "00:30:00" # [tc_analysis] # # The second run should run in parallel with the first run. # active = True -# scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_min_case_carryover_dependencies_scratch/test-642-working-env-20241105/v3.LR.historical_0051" +# scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_min_case_carryover_dependencies_scratch/test-642-working-env-20241121/v3.LR.historical_0051" # walltime = "00:30:00" [e3sm_diags] @@ -144,7 +144,7 @@ years = "1987:1989:2" partition = "compute" qos = "regular" ref_name = "v3.LR.historical_0051" - reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_carryover_dependencies_output/test-642-working-env-20241105/v3.LR.historical_0051/post/atm/180x360_aave/clim" + reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_carryover_dependencies_output/test-642-working-env-20241121/v3.LR.historical_0051/post/atm/180x360_aave/clim" run_type = "model_vs_model" sets = "lat_lon", short_ref_name = "same simulation" diff --git a/tests/integration/generated/test_min_case_e3sm_diags_depend_on_climo_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_depend_on_climo_chrysalis.cfg index 9b4a0eb6..88b9f509 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_depend_on_climo_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_depend_on_climo_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_climo_output/test-642-working-env-20241105/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_climo_output/test-642-working-env-20241121/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_climo_www/test-642-working-env-20241105" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_climo_www/test-642-working-env-20241121" years = "1985:1989:4", [climo] diff --git a/tests/integration/generated/test_min_case_e3sm_diags_depend_on_climo_mvm_1_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_depend_on_climo_mvm_1_chrysalis.cfg index 631c3121..de41ab5b 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_depend_on_climo_mvm_1_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_depend_on_climo_mvm_1_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_climo_mvm_1_output/test-642-working-env-20241105/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_climo_mvm_1_output/test-642-working-env-20241121/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_climo_mvm_1_www/test-642-working-env-20241105" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_climo_mvm_1_www/test-642-working-env-20241121" years = "1985:1989:4", [climo] diff --git a/tests/integration/generated/test_min_case_e3sm_diags_depend_on_climo_mvm_2_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_depend_on_climo_mvm_2_chrysalis.cfg index baacff0b..25cbfaad 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_depend_on_climo_mvm_2_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_depend_on_climo_mvm_2_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_climo_mvm_2_output/test-642-working-env-20241105/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_climo_mvm_2_output/test-642-working-env-20241121/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_climo_mvm_2_www/test-642-working-env-20241105" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_climo_mvm_2_www/test-642-working-env-20241121" years = "1995:1999:4", [climo] @@ -42,7 +42,7 @@ walltime = "5:00:00" ref_start_yr = 1985 ref_years = "1985-1988", # Use _1 as reference - reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_climo_mvm_1_output/test-642-working-env-20241105/v3.LR.historical_0051/post/atm/180x360_aave/clim" + reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_climo_mvm_1_output/test-642-working-env-20241121/v3.LR.historical_0051/post/atm/180x360_aave/clim" run_type = "model_vs_model" sets = "lat_lon","zonal_mean_xy","zonal_mean_2d","polar","cosp_histogram","meridional_mean_2d","annual_cycle_zonal_mean","zonal_mean_2d_stratosphere","aerosol_aeronet","aerosol_budget", short_ref_name = "v3.LR.historical_0051" diff --git a/tests/integration/generated/test_min_case_e3sm_diags_depend_on_ts_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_depend_on_ts_chrysalis.cfg index ad430520..23345ecf 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_depend_on_ts_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_depend_on_ts_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_ts_output/test-642-working-env-20241105/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_ts_output/test-642-working-env-20241121/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_ts_www/test-642-working-env-20241105" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_ts_www/test-642-working-env-20241121" years = "1985:1989:4", [ts] diff --git a/tests/integration/generated/test_min_case_e3sm_diags_depend_on_ts_mvm_1_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_depend_on_ts_mvm_1_chrysalis.cfg index 29d95d65..4000c832 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_depend_on_ts_mvm_1_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_depend_on_ts_mvm_1_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_ts_mvm_1_output/test-642-working-env-20241105/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_ts_mvm_1_output/test-642-working-env-20241121/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_ts_mvm_1_www/test-642-working-env-20241105" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_ts_mvm_1_www/test-642-working-env-20241121" years = "1985:1989:4", [ts] diff --git a/tests/integration/generated/test_min_case_e3sm_diags_depend_on_ts_mvm_2_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_depend_on_ts_mvm_2_chrysalis.cfg index adeafc7a..0918673e 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_depend_on_ts_mvm_2_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_depend_on_ts_mvm_2_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_ts_mvm_2_output/test-642-working-env-20241105/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_ts_mvm_2_output/test-642-working-env-20241121/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_ts_mvm_2_www/test-642-working-env-20241105" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_ts_mvm_2_www/test-642-working-env-20241121" years = "1995:1999:4", [ts] @@ -44,7 +44,7 @@ walltime = "5:00:00" ref_start_yr = 1985 ref_years = "1985-1988", # Use _1 as reference - reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_ts_mvm_1_output/test-642-working-env-20241105/v3.LR.historical_0051/post/atm/180x360_aave/clim" + reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_ts_mvm_1_output/test-642-working-env-20241121/v3.LR.historical_0051/post/atm/180x360_aave/clim" run_type = "model_vs_model" sets = "enso_diags","qbo", short_ref_name = "v3.LR.historical_0051" diff --git a/tests/integration/generated/test_min_case_e3sm_diags_diurnal_cycle_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_diurnal_cycle_chrysalis.cfg index 0e1c41ab..918a767d 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_diurnal_cycle_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_diurnal_cycle_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_diurnal_cycle_output/test-642-working-env-20241105/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_diurnal_cycle_output/test-642-working-env-20241121/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_diurnal_cycle_www/test-642-working-env-20241105" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_diurnal_cycle_www/test-642-working-env-20241121" years = "1985:1989:4", [climo] diff --git a/tests/integration/generated/test_min_case_e3sm_diags_diurnal_cycle_mvm_1_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_diurnal_cycle_mvm_1_chrysalis.cfg index 9c3d7cf2..801f896d 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_diurnal_cycle_mvm_1_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_diurnal_cycle_mvm_1_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_diurnal_cycle_mvm_1_output/test-642-working-env-20241105/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_diurnal_cycle_mvm_1_output/test-642-working-env-20241121/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_diurnal_cycle_mvm_1_www/test-642-working-env-20241105" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_diurnal_cycle_mvm_1_www/test-642-working-env-20241121" years = "1985:1989:4", [climo] diff --git a/tests/integration/generated/test_min_case_e3sm_diags_diurnal_cycle_mvm_2_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_diurnal_cycle_mvm_2_chrysalis.cfg index 9ff3de07..3f04032d 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_diurnal_cycle_mvm_2_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_diurnal_cycle_mvm_2_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_diurnal_cycle_mvm_2_output/test-642-working-env-20241105/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_diurnal_cycle_mvm_2_output/test-642-working-env-20241121/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_diurnal_cycle_mvm_2_www/test-642-working-env-20241105" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_diurnal_cycle_mvm_2_www/test-642-working-env-20241121" years = "1995:1999:4", [climo] @@ -40,7 +40,7 @@ walltime = "5:00:00" ref_name = "v3.LR.historical_0051" ref_years = "1985-1988", # Use _1 as reference - reference_data_path_climo_diurnal = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_diurnal_cycle_mvm_1_output/test-642-working-env-20241105/v3.LR.historical_0051/post/atm/180x360_aave/clim_diurnal_8xdaily" + reference_data_path_climo_diurnal = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_diurnal_cycle_mvm_1_output/test-642-working-env-20241121/v3.LR.historical_0051/post/atm/180x360_aave/clim_diurnal_8xdaily" run_type = "model_vs_model" sets = "diurnal_cycle", short_ref_name = "v3.LR.historical_0051" diff --git a/tests/integration/generated/test_min_case_e3sm_diags_lat_lon_land_mvm_1_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_lat_lon_land_mvm_1_chrysalis.cfg index cbf22365..03ff62b2 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_lat_lon_land_mvm_1_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_lat_lon_land_mvm_1_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_lat_lon_land_mvm_1_output/test-642-working-env-20241105/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_lat_lon_land_mvm_1_output/test-642-working-env-20241121/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_lat_lon_land_mvm_1_www/test-642-working-env-20241105" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_lat_lon_land_mvm_1_www/test-642-working-env-20241121" years = "1985:1989:4", [climo] diff --git a/tests/integration/generated/test_min_case_e3sm_diags_lat_lon_land_mvm_2_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_lat_lon_land_mvm_2_chrysalis.cfg index cd5cd8a2..af44248a 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_lat_lon_land_mvm_2_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_lat_lon_land_mvm_2_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_lat_lon_land_mvm_2_output/test-642-working-env-20241105/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_lat_lon_land_mvm_2_output/test-642-working-env-20241121/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_lat_lon_land_mvm_2_www/test-642-working-env-20241105" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_lat_lon_land_mvm_2_www/test-642-working-env-20241121" years = "1995:1999:4", [climo] @@ -41,7 +41,7 @@ walltime = "5:00:00" ref_start_yr = 1985 ref_years = "1985-1988", # Use _1 as reference - reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_lat_lon_land_mvm_1_output/test-642-working-env-20241105/v3.LR.historical_0051/post/lnd/180x360_aave/clim" + reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_lat_lon_land_mvm_1_output/test-642-working-env-20241121/v3.LR.historical_0051/post/lnd/180x360_aave/clim" run_type = "model_vs_model" sets = "lat_lon_land", short_ref_name = "v3.LR.historical_0051" diff --git a/tests/integration/generated/test_min_case_e3sm_diags_streamflow_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_streamflow_chrysalis.cfg index d31e0330..48d75f13 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_streamflow_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_streamflow_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_streamflow_output/test-642-working-env-20241105/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_streamflow_output/test-642-working-env-20241121/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_streamflow_www/test-642-working-env-20241105" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_streamflow_www/test-642-working-env-20241121" years = "1985:1989:4", [ts] diff --git a/tests/integration/generated/test_min_case_e3sm_diags_streamflow_mvm_1_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_streamflow_mvm_1_chrysalis.cfg index 0c570327..1c4a48bf 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_streamflow_mvm_1_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_streamflow_mvm_1_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_streamflow_mvm_1_output/test-642-working-env-20241105/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_streamflow_mvm_1_output/test-642-working-env-20241121/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_streamflow_mvm_1_www/test-642-working-env-20241105" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_streamflow_mvm_1_www/test-642-working-env-20241121" years = "1985:1989:4", [ts] diff --git a/tests/integration/generated/test_min_case_e3sm_diags_streamflow_mvm_2_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_streamflow_mvm_2_chrysalis.cfg index a335c302..bc733298 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_streamflow_mvm_2_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_streamflow_mvm_2_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_streamflow_mvm_2_output/test-642-working-env-20241105/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_streamflow_mvm_2_output/test-642-working-env-20241121/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_streamflow_mvm_2_www/test-642-working-env-20241105" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_streamflow_mvm_2_www/test-642-working-env-20241121" years = "1995:1999:4", [ts] @@ -45,7 +45,7 @@ walltime = "5:00:00" ref_start_yr = 1985 ref_years = "1985-1988", # Use _1 as reference - reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_streamflow_mvm_1_output/test-642-working-env-20241105/v3.LR.historical_0051/post/atm/180x360_aave/clim" + reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_streamflow_mvm_1_output/test-642-working-env-20241121/v3.LR.historical_0051/post/atm/180x360_aave/clim" # reference_data_path_ts_rof determined automatically run_type = "model_vs_model" sets="streamflow" diff --git a/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_chrysalis.cfg index 92146154..344b4323 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_chrysalis.cfg @@ -6,15 +6,15 @@ environment_commands = "" input = /lcrc/group/e3sm/ac.forsyth2//E3SMv2/v2.LR.historical_0201 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_output/test-642-working-env-20241105/v2.LR.historical_0201" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_output/test-642-working-env-20241121/v2.LR.historical_0201" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_www/test-642-working-env-20241105" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_www/test-642-working-env-20241121" years = "1985:1987:2", [tc_analysis] active = True -scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_scratch/test-642-working-env-20241105/v2.LR.historical_0201" +scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_scratch/test-642-working-env-20241121/v2.LR.historical_0201" walltime = "00:30:00" [e3sm_diags] diff --git a/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_mvm_1_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_mvm_1_chrysalis.cfg index f043c101..5f53199e 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_mvm_1_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_mvm_1_chrysalis.cfg @@ -6,13 +6,13 @@ environment_commands = "" input = /lcrc/group/e3sm/ac.forsyth2//E3SMv2/v2.LR.historical_0201 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_mvm_1_output/test-642-working-env-20241105/v2.LR.historical_0201" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_mvm_1_output/test-642-working-env-20241121/v2.LR.historical_0201" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_mvm_2_www/test-642-working-env-20241105" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_mvm_2_www/test-642-working-env-20241121" years = "1985:1987:2", [tc_analysis] active = True -scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_mvm_1_scratch/test-642-working-env-20241105/v2.LR.historical_0201" +scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_mvm_1_scratch/test-642-working-env-20241121/v2.LR.historical_0201" walltime = "00:30:00" diff --git a/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_mvm_2_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_mvm_2_chrysalis.cfg index 5faca1c5..2389c0ce 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_mvm_2_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_mvm_2_chrysalis.cfg @@ -7,15 +7,15 @@ environment_commands = "" input = /lcrc/group/e3sm/ac.forsyth2//E3SMv2/v2.LR.historical_0201 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_mvm_2_output/test-642-working-env-20241105/v2.LR.historical_0201" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_mvm_2_output/test-642-working-env-20241121/v2.LR.historical_0201" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_mvm_2_www/test-642-working-env-20241105" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_mvm_2_www/test-642-working-env-20241121" years = "1995:1997:2", [tc_analysis] active = True -scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_mvm_2_scratch/test-642-working-env-20241105/v2.LR.historical_0201" +scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_mvm_2_scratch/test-642-working-env-20241121/v2.LR.historical_0201" walltime = "00:30:00" [e3sm_diags] @@ -38,7 +38,7 @@ walltime = "5:00:00" ref_start_yr = 1985 ref_years = "1985-1986", # Use _1 as reference - reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_mvm_1_output/test-642-working-env-20241105/v2.LR.historical_0201/post/atm/180x360_aave/clim" + reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_mvm_1_output/test-642-working-env-20241121/v2.LR.historical_0201/post/atm/180x360_aave/clim" # reference_data_path_tc determined automatically run_type = "model_vs_model" sets = "tc_analysis", diff --git a/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_parallel_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_parallel_chrysalis.cfg index bd772186..02403950 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_parallel_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_parallel_chrysalis.cfg @@ -6,15 +6,15 @@ environment_commands = "" input = /lcrc/group/e3sm/ac.forsyth2//E3SMv2/v2.LR.historical_0201 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_parallel_output/test-642-working-env-20241105/v2.LR.historical_0201" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_parallel_output/test-642-working-env-20241121/v2.LR.historical_0201" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_parallel_www/test-642-working-env-20241105" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_parallel_www/test-642-working-env-20241121" years = "1985:1989:2", [tc_analysis] active = True -scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_parallel_scratch/test-642-working-env-20241105/v2.LR.historical_0201" +scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_parallel_scratch/test-642-working-env-20241121/v2.LR.historical_0201" walltime = "00:30:00" [e3sm_diags] diff --git a/tests/integration/generated/test_min_case_e3sm_diags_tropical_subseasonal_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_tropical_subseasonal_chrysalis.cfg index 7e15ee56..3e9136fe 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_tropical_subseasonal_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_tropical_subseasonal_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tropical_subseasonal_output/test-642-working-env-20241105/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tropical_subseasonal_output/test-642-working-env-20241121/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_tropical_subseasonal_www/test-642-working-env-20241105" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_tropical_subseasonal_www/test-642-working-env-20241121" years = "1985:1989:4", [ts] diff --git a/tests/integration/generated/test_min_case_e3sm_diags_tropical_subseasonal_mvm_1_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_tropical_subseasonal_mvm_1_chrysalis.cfg index a4400dca..adebe9d1 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_tropical_subseasonal_mvm_1_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_tropical_subseasonal_mvm_1_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tropical_subseasonal_mvm_1_output/test-642-working-env-20241105/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tropical_subseasonal_mvm_1_output/test-642-working-env-20241121/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_tropical_subseasonal_mvm_1_www/test-642-working-env-20241105" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_tropical_subseasonal_mvm_1_www/test-642-working-env-20241121" years = "1985:1989:4", [ts] diff --git a/tests/integration/generated/test_min_case_e3sm_diags_tropical_subseasonal_mvm_2_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_tropical_subseasonal_mvm_2_chrysalis.cfg index 503e8e55..428a7173 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_tropical_subseasonal_mvm_2_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_tropical_subseasonal_mvm_2_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tropical_subseasonal_mvm_2_output/test-642-working-env-20241105/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tropical_subseasonal_mvm_2_output/test-642-working-env-20241121/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_tropical_subseasonal_mvm_2_www/test-642-working-env-20241105" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_tropical_subseasonal_mvm_2_www/test-642-working-env-20241121" years = "1995:1999:4", [ts] @@ -44,7 +44,7 @@ walltime = "5:00:00" ref_start_yr = 1985 ref_years = "1985-1988", # Use _1 as reference - reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tropical_subseasonal_mvm_1_output/test-642-working-env-20241105/v3.LR.historical_0051/post/atm/180x360_aave/clim" + reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tropical_subseasonal_mvm_1_output/test-642-working-env-20241121/v3.LR.historical_0051/post/atm/180x360_aave/clim" # reference_data_path_daily is determined automatically run_type = "model_vs_model" sets = "tropical_subseasonal", diff --git a/tests/integration/generated/test_min_case_global_time_series_custom_chrysalis.cfg b/tests/integration/generated/test_min_case_global_time_series_custom_chrysalis.cfg index de9e344c..5c2b5228 100644 --- a/tests/integration/generated/test_min_case_global_time_series_custom_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_global_time_series_custom_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_global_time_series_custom_output/test-642-working-env-20241105/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_global_time_series_custom_output/test-642-working-env-20241121/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_global_time_series_custom_www/test-642-working-env-20241105" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_global_time_series_custom_www/test-642-working-env-20241121" [ts] active = True diff --git a/tests/integration/generated/test_min_case_global_time_series_original_8_chrysalis.cfg b/tests/integration/generated/test_min_case_global_time_series_original_8_chrysalis.cfg index ebb7b77e..351435a5 100644 --- a/tests/integration/generated/test_min_case_global_time_series_original_8_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_global_time_series_original_8_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_global_time_series_original_8_output/test-642-working-env-20241105/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_global_time_series_original_8_output/test-642-working-env-20241121/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_global_time_series_original_8_www/test-642-working-env-20241105" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_global_time_series_original_8_www/test-642-working-env-20241121" [ts] active = True @@ -40,7 +40,7 @@ walltime = "00:30:00" [global_time_series] active = True climo_years = "1985-1989", "1990-1995", -environment_commands = "source /home/ac.forsyth2/miniconda3/etc/profile.d/conda.sh; conda activate zppy-interfaces-dev-20241104" # TODO: Set zi_environment_commands in utils.py +environment_commands = "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate zppy_interfaces_dev_pr_1_20241121" # TODO: Set zi_environment_commands in utils.py experiment_name = "v3.LR.historical_0051" figstr = "v3.LR.historical_0051" moc_file=mocTimeSeries_1985-1995.nc diff --git a/tests/integration/generated/test_min_case_global_time_series_original_8_no_ocn_chrysalis.cfg b/tests/integration/generated/test_min_case_global_time_series_original_8_no_ocn_chrysalis.cfg index 2ffe44be..ac1a8a00 100644 --- a/tests/integration/generated/test_min_case_global_time_series_original_8_no_ocn_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_global_time_series_original_8_no_ocn_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_global_time_series_original_8_no_ocn_output/test-642-working-env-20241105/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_global_time_series_original_8_no_ocn_output/test-642-working-env-20241121/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_global_time_series_original_8_no_ocn_www/test-642-working-env-20241105" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_global_time_series_original_8_no_ocn_www/test-642-working-env-20241121" [ts] active = True diff --git a/tests/integration/generated/test_min_case_global_time_series_setup_only_chrysalis.cfg b/tests/integration/generated/test_min_case_global_time_series_setup_only_chrysalis.cfg index fe647e33..1b89c136 100644 --- a/tests/integration/generated/test_min_case_global_time_series_setup_only_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_global_time_series_setup_only_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_global_time_series_setup_only_output/test-642-working-env-20241105/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_global_time_series_setup_only_output/test-642-working-env-20241121/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_global_time_series_setup_only_www/test-642-working-env-20241105" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_global_time_series_setup_only_www/test-642-working-env-20241121" [ts] active = True diff --git a/tests/integration/generated/test_min_case_ilamb_chrysalis.cfg b/tests/integration/generated/test_min_case_ilamb_chrysalis.cfg index 40a86cbc..e310a375 100644 --- a/tests/integration/generated/test_min_case_ilamb_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_ilamb_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_ilamb_output/test-642-working-env-20241105/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_ilamb_output/test-642-working-env-20241121/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_ilamb_www/test-642-working-env-20241105" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_ilamb_www/test-642-working-env-20241121" [ts] active = True diff --git a/tests/integration/generated/test_min_case_ilamb_land_only_chrysalis.cfg b/tests/integration/generated/test_min_case_ilamb_land_only_chrysalis.cfg index 6784cfc6..5d70d56e 100644 --- a/tests/integration/generated/test_min_case_ilamb_land_only_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_ilamb_land_only_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_ilamb_land_only_output/test-642-working-env-20241105/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_ilamb_land_only_output/test-642-working-env-20241121/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_ilamb_land_only_www/test-642-working-env-20241105" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_ilamb_land_only_www/test-642-working-env-20241121" [ts] active = True diff --git a/tests/integration/generated/test_min_case_mpas_analysis_chrysalis.cfg b/tests/integration/generated/test_min_case_mpas_analysis_chrysalis.cfg index ca56e0cb..665def29 100644 --- a/tests/integration/generated/test_min_case_mpas_analysis_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_mpas_analysis_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_mpas_analysis_output/test-642-working-env-20241105/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_mpas_analysis_output/test-642-working-env-20241121/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_mpas_analysis_www/test-642-working-env-20241105" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_mpas_analysis_www/test-642-working-env-20241121" [mpas_analysis] active = True diff --git a/tests/integration/generated/test_min_case_tc_analysis_simultaneous_1_chrysalis.cfg b/tests/integration/generated/test_min_case_tc_analysis_simultaneous_1_chrysalis.cfg index 0e2aeeee..5be268a2 100644 --- a/tests/integration/generated/test_min_case_tc_analysis_simultaneous_1_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_tc_analysis_simultaneous_1_chrysalis.cfg @@ -6,13 +6,13 @@ environment_commands = "" input = /lcrc/group/e3sm/ac.forsyth2//E3SMv2/v2.LR.historical_0201 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_tc_analysis_simultaneous_1_output/test-642-working-env-20241105/v2.LR.historical_0201" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_tc_analysis_simultaneous_1_output/test-642-working-env-20241121/v2.LR.historical_0201" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_tc_analysis_simultaneous_1_www/test-642-working-env-20241105" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_tc_analysis_simultaneous_1_www/test-642-working-env-20241121" years = "1985:1987:2", [tc_analysis] active = True -scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_min_case_tc_analysis_simultaneous_1_scratch/test-642-working-env-20241105/v2.LR.historical_0201" +scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_min_case_tc_analysis_simultaneous_1_scratch/test-642-working-env-20241121/v2.LR.historical_0201" walltime = "00:30:00" diff --git a/tests/integration/generated/test_min_case_tc_analysis_simultaneous_2_chrysalis.cfg b/tests/integration/generated/test_min_case_tc_analysis_simultaneous_2_chrysalis.cfg index c9ee5501..dd38f033 100644 --- a/tests/integration/generated/test_min_case_tc_analysis_simultaneous_2_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_tc_analysis_simultaneous_2_chrysalis.cfg @@ -8,13 +8,13 @@ environment_commands = "" input = /lcrc/group/e3sm/ac.forsyth2//E3SMv2/v2.LR.historical_0201 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_tc_analysis_simultaneous_2_output/test-642-working-env-20241105/v2.LR.historical_0201" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_tc_analysis_simultaneous_2_output/test-642-working-env-20241121/v2.LR.historical_0201" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_tc_analysis_simultaneous_2_www/test-642-working-env-20241105" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_tc_analysis_simultaneous_2_www/test-642-working-env-20241121" years = "1985:1987:2", [tc_analysis] active = True -scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_min_case_tc_analysis_simultaneous_2_scratch/test-642-working-env-20241105/v2.LR.historical_0201" +scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_min_case_tc_analysis_simultaneous_2_scratch/test-642-working-env-20241121/v2.LR.historical_0201" walltime = "00:30:00" diff --git a/tests/integration/generated/test_weekly_bundles_chrysalis.cfg b/tests/integration/generated/test_weekly_bundles_chrysalis.cfg index e92baaed..48576357 100644 --- a/tests/integration/generated/test_weekly_bundles_chrysalis.cfg +++ b/tests/integration/generated/test_weekly_bundles_chrysalis.cfg @@ -30,11 +30,11 @@ input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" # To run this test, edit `output` and `www` in this file, along with `actual_images_dir` in test_bundles.py -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_bundles_output/test-642-working-env-20241105/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_bundles_output/test-642-working-env-20241121/v3.LR.historical_0051" partition = "compute" qos = "regular" walltime = "07:00:00" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_weekly_bundles_www/test-642-working-env-20241105" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_weekly_bundles_www/test-642-working-env-20241121" [bundle] @@ -99,7 +99,7 @@ years = "1985:1989:2", # [tc_analysis] # active = True # bundle = "bundle3" # Let bundle1 finish first because "e3sm_diags: atm_monthly_180x360_aave_mvm" requires "ts: atm_monthly_180x360_aave" -# scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_weekly_bundles_scratch/test-642-working-env-20241105/v3.LR.historical_0051" +# scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_weekly_bundles_scratch/test-642-working-env-20241121/v3.LR.historical_0051" # years = "1985:1989:2", [e3sm_diags] @@ -127,7 +127,7 @@ years = "1985:1989:2", ref_name = "v3.LR.historical_0051" ref_start_yr = 1985 ref_years = "1985-1986", - reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_bundles_output/test-642-working-env-20241105/v3.LR.historical_0051/post/atm/180x360_aave/clim" + reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_bundles_output/test-642-working-env-20241121/v3.LR.historical_0051/post/atm/180x360_aave/clim" run_type = "model_vs_model" # TODO: Add "tc_analysis" back in after empty dat is resolved. sets = "polar","enso_diags","streamflow", diff --git a/tests/integration/generated/test_weekly_comprehensive_v2_chrysalis.cfg b/tests/integration/generated/test_weekly_comprehensive_v2_chrysalis.cfg index 0f25f1fc..ebf1f326 100644 --- a/tests/integration/generated/test_weekly_comprehensive_v2_chrysalis.cfg +++ b/tests/integration/generated/test_weekly_comprehensive_v2_chrysalis.cfg @@ -7,10 +7,10 @@ fail_on_dependency_skip = True input = /lcrc/group/e3sm/ac.forsyth2//E3SMv2/v2.LR.historical_0201 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v2_output/test-642-working-env-20241105/v2.LR.historical_0201" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v2_output/test-642-working-env-20241121/v2.LR.historical_0201" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_weekly_comprehensive_v2_www/test-642-working-env-20241105" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_weekly_comprehensive_v2_www/test-642-working-env-20241121" years = "1980:1984:2", [climo] @@ -86,7 +86,7 @@ walltime = "00:30:00" [tc_analysis] active = True -scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_weekly_comprehensive_v2_scratch/test-642-working-env-20241105/v2.LR.historical_0201" +scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_weekly_comprehensive_v2_scratch/test-642-working-env-20241121/v2.LR.historical_0201" walltime = "00:30:00" [e3sm_diags] @@ -127,7 +127,7 @@ years = "1982:1984:2", partition = "compute" qos = "regular" ref_name = "v2.LR.historical_0201" - reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v2_output/test-642-working-env-20241105/v2.LR.historical_0201/post/atm/180x360_aave/clim" + reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v2_output/test-642-working-env-20241121/v2.LR.historical_0201/post/atm/180x360_aave/clim" run_type = "model_vs_model" short_ref_name = "same simulation" swap_test_ref = False @@ -144,7 +144,7 @@ years = "1982:1984:2", partition = "compute" qos = "regular" ref_name = "v2.LR.historical_0201" - reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v2_output/test-642-working-env-20241105/v2.LR.historical_0201/post/lnd/180x360_aave/clim" + reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v2_output/test-642-working-env-20241121/v2.LR.historical_0201/post/lnd/180x360_aave/clim" run_type = "model_vs_model" sets = "lat_lon_land", short_ref_name = "same simulation" diff --git a/tests/integration/generated/test_weekly_comprehensive_v3_chrysalis.cfg b/tests/integration/generated/test_weekly_comprehensive_v3_chrysalis.cfg index f16f0d0a..a27c6699 100644 --- a/tests/integration/generated/test_weekly_comprehensive_v3_chrysalis.cfg +++ b/tests/integration/generated/test_weekly_comprehensive_v3_chrysalis.cfg @@ -9,10 +9,10 @@ guess_section_parameters = False input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v3_output/test-642-working-env-20241105/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v3_output/test-642-working-env-20241121/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_weekly_comprehensive_v3_www/test-642-working-env-20241105" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_weekly_comprehensive_v3_www/test-642-working-env-20241121" years = "1985:1989:2", [climo] @@ -91,7 +91,7 @@ walltime = "00:30:00" # TODO: Add "tc_analysis" back in after empty dat is resolved. # [tc_analysis] # active = True -# scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_weekly_comprehensive_v3_scratch/test-642-working-env-20241105/v3.LR.historical_0051" +# scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_weekly_comprehensive_v3_scratch/test-642-working-env-20241121/v3.LR.historical_0051" # walltime = "00:30:00" [e3sm_diags] @@ -152,16 +152,16 @@ tc_obs = "/lcrc/group/e3sm/diagnostics/observations/Atm/tc-analysis/" tag = "model_vs_model" ts_num_years_ref = 2 # Reference paths - reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v3_output/test-642-working-env-20241105/v3.LR.historical_0051/post/atm/180x360_aave/clim" + reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v3_output/test-642-working-env-20241121/v3.LR.historical_0051/post/atm/180x360_aave/clim" # mvm streamflow only gauges_path = "/lcrc/group/e3sm/diagnostics/observations/Atm/time-series/GSIM/GSIM_catchment_characteristics_all_1km2.csv" - reference_data_path_ts_rof = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v3_output/test-642-working-env-20241105/v3.LR.historical_0051/post/rof/native/ts/monthly" + reference_data_path_ts_rof = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v3_output/test-642-working-env-20241121/v3.LR.historical_0051/post/rof/native/ts/monthly" # mvm diurnal_cycle only - reference_data_path_climo_diurnal = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v3_output/test-642-working-env-20241105/v3.LR.historical_0051/post/atm/180x360_aave/clim_diurnal_8xdaily" + reference_data_path_climo_diurnal = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v3_output/test-642-working-env-20241121/v3.LR.historical_0051/post/atm/180x360_aave/clim_diurnal_8xdaily" # mvm "enso_diags", "qbo", "area_mean_time_series" - reference_data_path_ts = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v3_output/test-642-working-env-20241105/v3.LR.historical_0051/post/atm/180x360_aave/ts/monthly" + reference_data_path_ts = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v3_output/test-642-working-env-20241121/v3.LR.historical_0051/post/atm/180x360_aave/ts/monthly" # mvm tropical_subseasonal only - reference_data_path_ts_daily = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v3_output/test-642-working-env-20241105/v3.LR.historical_0051/post/atm/180x360_aave/ts/daily" + reference_data_path_ts_daily = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v3_output/test-642-working-env-20241121/v3.LR.historical_0051/post/atm/180x360_aave/ts/daily" [[ lnd_monthly_mvm_lnd ]] # Test model-vs-model using the same files as the reference @@ -177,7 +177,7 @@ tc_obs = "/lcrc/group/e3sm/diagnostics/observations/Atm/tc-analysis/" tag = "model_vs_model" ts_num_years_ref = 2 # Reference paths - reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v3_output/test-642-working-env-20241105/v3.LR.historical_0051/post/lnd/180x360_aave/clim" + reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v3_output/test-642-working-env-20241121/v3.LR.historical_0051/post/lnd/180x360_aave/clim" [mpas_analysis] diff --git a/tests/integration/generated/update_weekly_expected_files_chrysalis.sh b/tests/integration/generated/update_weekly_expected_files_chrysalis.sh index bb19aa41..20298189 100755 --- a/tests/integration/generated/update_weekly_expected_files_chrysalis.sh +++ b/tests/integration/generated/update_weekly_expected_files_chrysalis.sh @@ -9,13 +9,13 @@ do # Your output will now become the new expectation. # Copy output so you don't have to rerun zppy to generate the output. if [[ "${test_name,,}" == "comprehensive_v2" ]]; then - cp -r /lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_weekly_${test_name}_www/test-642-working-env-20241105/v2.LR.historical_0201 /lcrc/group/e3sm/public_html/zppy_test_resources/expected_${test_name} + cp -r /lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_weekly_${test_name}_www/test-642-working-env-20241121/v2.LR.historical_0201 /lcrc/group/e3sm/public_html/zppy_test_resources/expected_${test_name} else - cp -r /lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_weekly_${test_name}_www/test-642-working-env-20241105/v3.LR.historical_0051 /lcrc/group/e3sm/public_html/zppy_test_resources/expected_${test_name} + cp -r /lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_weekly_${test_name}_www/test-642-working-env-20241121/v3.LR.historical_0051 /lcrc/group/e3sm/public_html/zppy_test_resources/expected_${test_name} fi if [[ "${test_name,,}" == "bundles" ]]; then mkdir -p /lcrc/group/e3sm/public_html/zppy_test_resources/expected_bundles/bundle_files - cp -r /lcrc/group/e3sm/ac.forsyth2/zppy_weekly_bundles_output/test-642-working-env-20241105/v3.LR.historical_0051/post/scripts/bundle*.bash /lcrc/group/e3sm/public_html/zppy_test_resources/expected_bundles/bundle_files + cp -r /lcrc/group/e3sm/ac.forsyth2/zppy_weekly_bundles_output/test-642-working-env-20241121/v3.LR.historical_0051/post/scripts/bundle*.bash /lcrc/group/e3sm/public_html/zppy_test_resources/expected_bundles/bundle_files fi zppy_top_level=$(pwd) cd /lcrc/group/e3sm/public_html/zppy_test_resources/expected_${test_name} diff --git a/tests/integration/template_min_case_global_time_series_original_8.cfg b/tests/integration/template_min_case_global_time_series_original_8.cfg index 97396a52..01ca5f3d 100644 --- a/tests/integration/template_min_case_global_time_series_original_8.cfg +++ b/tests/integration/template_min_case_global_time_series_original_8.cfg @@ -40,7 +40,7 @@ walltime = "#expand mpas_analysis_walltime#" [global_time_series] active = True climo_years = "1985-1989", "1990-1995", -environment_commands = "source /home/ac.forsyth2/miniconda3/etc/profile.d/conda.sh; conda activate zppy-interfaces-dev-20241104" # TODO: Set zi_environment_commands in utils.py +environment_commands = "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate zppy_interfaces_dev_pr_1_20241121" # TODO: Set zi_environment_commands in utils.py experiment_name = "#expand case_name#" figstr = "#expand case_name#" moc_file=mocTimeSeries_1985-1995.nc diff --git a/tests/integration/utils.py b/tests/integration/utils.py index dd331c7d..4d221a5c 100644 --- a/tests/integration/utils.py +++ b/tests/integration/utils.py @@ -7,7 +7,7 @@ from mache import MachineInfo from PIL import Image, ImageChops, ImageDraw -UNIQUE_ID = "test-642-working-env-20241105" +UNIQUE_ID = "test-642-working-env-20241121" # Image checking ########################################################## diff --git a/zppy/templates/global_time_series.bash b/zppy/templates/global_time_series.bash index 01ab8f7a..0dffb958 100644 --- a/zppy/templates/global_time_series.bash +++ b/zppy/templates/global_time_series.bash @@ -20,14 +20,11 @@ echo "RUNNING ${id}" > {{ prefix }}.status ################################################################################ results_dir={{ prefix }}_results -zi-global-time-series --use_ocn {{ use_ocn }} --global_ts_dir {{ global_time_series_dir }} --input {{ input }} --input_subdir {{ input_subdir }} --moc_file {{ moc_file }} --case_dir {{ output }} --experiment_name {{ experiment_name }} --figstr {{ figstr }} --color {{ color }} --ts_num_years {{ ts_num_years }} --plots_original {{ plots_original }} --atmosphere_only {{ atmosphere_only }} --plots_atm {{ plots_atm }} --plots_ice {{ plots_ice }} --plots_lnd {{ plots_lnd }} --plots_ocn {{ plots_ocn }} --regions {{ regions }} --results_dir ${results_dir} --start_yr {{ year1 }} --end_yr {{ year2 }} +zi-global-time-series --use_ocn {{ use_ocn }} --input {{ input }} --input_subdir {{ input_subdir }} --moc_file {{ moc_file }} --case_dir {{ output }} --experiment_name {{ experiment_name }} --figstr {{ figstr }} --color {{ color }} --ts_num_years {{ ts_num_years }} --plots_original {{ plots_original }} --atmosphere_only {{ atmosphere_only }} --plots_atm {{ plots_atm }} --plots_ice {{ plots_ice }} --plots_lnd {{ plots_lnd }} --plots_ocn {{ plots_ocn }} --nrows 4 --ncols 2 --results_dir ${results_dir} --regions {{ regions }} --start_yr {{ year1 }} --end_yr {{ year2 }} echo 'Copy images to directory' - -results_dir_absolute_path={{ scriptDir }}/${results_dir} -mkdir -p ${results_dir_absolute_path} -cp *.pdf ${results_dir_absolute_path} -cp *.png ${results_dir_absolute_path} +cp *.pdf ${global_time_series_dir} +cp *.png ${global_time_series_dir} ################################################################################ case={{ case }} From 8a6a76ac89f38bb1698e4198ac920cafbbc39563 Mon Sep 17 00:00:00 2001 From: Ryan Forsyth Date: Thu, 21 Nov 2024 13:11:12 -0600 Subject: [PATCH 06/13] Plots generating via zppy --- zppy/global_time_series.py | 4 ---- zppy/templates/global_time_series.bash | 7 +++++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/zppy/global_time_series.py b/zppy/global_time_series.py index b66fba6f..3e3fa96e 100644 --- a/zppy/global_time_series.py +++ b/zppy/global_time_series.py @@ -45,10 +45,6 @@ def global_time_series(config, script_dir, existing_bundles, job_ids_file): if skip: continue determine_components(c) - # Load useful scripts - c["global_time_series_dir"] = os.path.join(script_dir, f"{prefix}_dir") - if not os.path.exists(c["global_time_series_dir"]): - os.mkdir(c["global_time_series_dir"]) # Create script with open(bash_file, "w") as f: f.write(template.render(**c)) diff --git a/zppy/templates/global_time_series.bash b/zppy/templates/global_time_series.bash index 0dffb958..1a4ebdf8 100644 --- a/zppy/templates/global_time_series.bash +++ b/zppy/templates/global_time_series.bash @@ -23,8 +23,11 @@ results_dir={{ prefix }}_results zi-global-time-series --use_ocn {{ use_ocn }} --input {{ input }} --input_subdir {{ input_subdir }} --moc_file {{ moc_file }} --case_dir {{ output }} --experiment_name {{ experiment_name }} --figstr {{ figstr }} --color {{ color }} --ts_num_years {{ ts_num_years }} --plots_original {{ plots_original }} --atmosphere_only {{ atmosphere_only }} --plots_atm {{ plots_atm }} --plots_ice {{ plots_ice }} --plots_lnd {{ plots_lnd }} --plots_ocn {{ plots_ocn }} --nrows 4 --ncols 2 --results_dir ${results_dir} --regions {{ regions }} --start_yr {{ year1 }} --end_yr {{ year2 }} echo 'Copy images to directory' -cp *.pdf ${global_time_series_dir} -cp *.png ${global_time_series_dir} +results_dir={{ prefix }}_results +results_dir_absolute_path={{ scriptDir }}/${results_dir} +mkdir -p ${results_dir_absolute_path} +cp ${results_dir}/*.pdf ${results_dir_absolute_path} +cp ${results_dir}/*.png ${results_dir_absolute_path} ################################################################################ case={{ case }} From 506416daa6fd050b20f8ef78f88525d2215f22e3 Mon Sep 17 00:00:00 2001 From: Ryan Forsyth Date: Thu, 21 Nov 2024 13:25:53 -0600 Subject: [PATCH 07/13] Updates --- ...st_min_case_add_dependencies_chrysalis.cfg | 4 +- ..._case_carryover_dependencies_chrysalis.cfg | 8 +-- ...e_e3sm_diags_depend_on_climo_chrysalis.cfg | 4 +- ..._diags_depend_on_climo_mvm_1_chrysalis.cfg | 4 +- ..._diags_depend_on_climo_mvm_2_chrysalis.cfg | 6 +-- ...case_e3sm_diags_depend_on_ts_chrysalis.cfg | 4 +- ...3sm_diags_depend_on_ts_mvm_1_chrysalis.cfg | 4 +- ...3sm_diags_depend_on_ts_mvm_2_chrysalis.cfg | 6 +-- ...ase_e3sm_diags_diurnal_cycle_chrysalis.cfg | 4 +- ...sm_diags_diurnal_cycle_mvm_1_chrysalis.cfg | 4 +- ...sm_diags_diurnal_cycle_mvm_2_chrysalis.cfg | 6 +-- ...3sm_diags_lat_lon_land_mvm_1_chrysalis.cfg | 4 +- ...3sm_diags_lat_lon_land_mvm_2_chrysalis.cfg | 6 +-- ...n_case_e3sm_diags_streamflow_chrysalis.cfg | 4 +- ..._e3sm_diags_streamflow_mvm_1_chrysalis.cfg | 4 +- ..._e3sm_diags_streamflow_mvm_2_chrysalis.cfg | 6 +-- ..._case_e3sm_diags_tc_analysis_chrysalis.cfg | 6 +-- ...e3sm_diags_tc_analysis_mvm_1_chrysalis.cfg | 6 +-- ...e3sm_diags_tc_analysis_mvm_2_chrysalis.cfg | 8 +-- ...m_diags_tc_analysis_parallel_chrysalis.cfg | 6 +-- ...m_diags_tropical_subseasonal_chrysalis.cfg | 4 +- ...s_tropical_subseasonal_mvm_1_chrysalis.cfg | 4 +- ...s_tropical_subseasonal_mvm_2_chrysalis.cfg | 6 +-- ...se_global_time_series_custom_chrysalis.cfg | 5 +- ...lobal_time_series_original_8_chrysalis.cfg | 6 +-- ...ime_series_original_8_no_ocn_chrysalis.cfg | 5 +- .../test_min_case_ilamb_chrysalis.cfg | 4 +- ...est_min_case_ilamb_land_only_chrysalis.cfg | 4 +- .../test_min_case_mpas_analysis_chrysalis.cfg | 4 +- ...e_tc_analysis_simultaneous_1_chrysalis.cfg | 6 +-- ...e_tc_analysis_simultaneous_2_chrysalis.cfg | 6 +-- .../test_weekly_bundles_chrysalis.cfg | 9 ++-- ...test_weekly_comprehensive_v2_chrysalis.cfg | 11 +++-- ...test_weekly_comprehensive_v3_chrysalis.cfg | 19 +++---- .../update_weekly_expected_files_chrysalis.sh | 6 +-- ...ate_min_case_global_time_series_custom.cfg | 1 + ...min_case_global_time_series_original_8.cfg | 2 +- ...e_global_time_series_original_8_no_ocn.cfg | 1 + ...min_case_global_time_series_setup_only.cfg | 49 ------------------- tests/integration/template_weekly_bundles.cfg | 1 + .../template_weekly_comprehensive_v2.cfg | 1 + .../template_weekly_comprehensive_v3.cfg | 1 + tests/integration/utils.py | 6 ++- zppy/templates/global_time_series.bash | 1 - 44 files changed, 114 insertions(+), 152 deletions(-) delete mode 100644 tests/integration/template_min_case_global_time_series_setup_only.cfg diff --git a/tests/integration/generated/test_min_case_add_dependencies_chrysalis.cfg b/tests/integration/generated/test_min_case_add_dependencies_chrysalis.cfg index 57cffc6e..2656fa7a 100644 --- a/tests/integration/generated/test_min_case_add_dependencies_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_add_dependencies_chrysalis.cfg @@ -14,12 +14,12 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_add_dependencies_output/test-642-working-env-20241121/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_add_dependencies_output/unique_id/v3.LR.historical_0051" partition = "debug" qos = "regular" # ts is in 5 year increments ts_num_years = 5 -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_add_dependencies_www/test-642-working-env-20241121" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_add_dependencies_www/unique_id" # We want to produce diagnostics for 10 years. years = "1985:1995:10", diff --git a/tests/integration/generated/test_min_case_carryover_dependencies_chrysalis.cfg b/tests/integration/generated/test_min_case_carryover_dependencies_chrysalis.cfg index 36b9f93a..721faaf9 100644 --- a/tests/integration/generated/test_min_case_carryover_dependencies_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_carryover_dependencies_chrysalis.cfg @@ -29,10 +29,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_carryover_dependencies_output/test-642-working-env-20241121/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_carryover_dependencies_output/unique_id/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_carryover_dependencies_www/test-642-working-env-20241121" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_carryover_dependencies_www/unique_id" years = "1985:1989:2", [climo] @@ -106,7 +106,7 @@ walltime = "00:30:00" # [tc_analysis] # # The second run should run in parallel with the first run. # active = True -# scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_min_case_carryover_dependencies_scratch/test-642-working-env-20241121/v3.LR.historical_0051" +# scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_min_case_carryover_dependencies_scratch/unique_id/v3.LR.historical_0051" # walltime = "00:30:00" [e3sm_diags] @@ -144,7 +144,7 @@ years = "1987:1989:2" partition = "compute" qos = "regular" ref_name = "v3.LR.historical_0051" - reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_carryover_dependencies_output/test-642-working-env-20241121/v3.LR.historical_0051/post/atm/180x360_aave/clim" + reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_carryover_dependencies_output/unique_id/v3.LR.historical_0051/post/atm/180x360_aave/clim" run_type = "model_vs_model" sets = "lat_lon", short_ref_name = "same simulation" diff --git a/tests/integration/generated/test_min_case_e3sm_diags_depend_on_climo_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_depend_on_climo_chrysalis.cfg index 88b9f509..e8b4b4e0 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_depend_on_climo_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_depend_on_climo_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_climo_output/test-642-working-env-20241121/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_climo_output/unique_id/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_climo_www/test-642-working-env-20241121" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_climo_www/unique_id" years = "1985:1989:4", [climo] diff --git a/tests/integration/generated/test_min_case_e3sm_diags_depend_on_climo_mvm_1_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_depend_on_climo_mvm_1_chrysalis.cfg index de41ab5b..dab95aba 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_depend_on_climo_mvm_1_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_depend_on_climo_mvm_1_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_climo_mvm_1_output/test-642-working-env-20241121/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_climo_mvm_1_output/unique_id/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_climo_mvm_1_www/test-642-working-env-20241121" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_climo_mvm_1_www/unique_id" years = "1985:1989:4", [climo] diff --git a/tests/integration/generated/test_min_case_e3sm_diags_depend_on_climo_mvm_2_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_depend_on_climo_mvm_2_chrysalis.cfg index 25cbfaad..06e067dc 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_depend_on_climo_mvm_2_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_depend_on_climo_mvm_2_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_climo_mvm_2_output/test-642-working-env-20241121/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_climo_mvm_2_output/unique_id/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_climo_mvm_2_www/test-642-working-env-20241121" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_climo_mvm_2_www/unique_id" years = "1995:1999:4", [climo] @@ -42,7 +42,7 @@ walltime = "5:00:00" ref_start_yr = 1985 ref_years = "1985-1988", # Use _1 as reference - reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_climo_mvm_1_output/test-642-working-env-20241121/v3.LR.historical_0051/post/atm/180x360_aave/clim" + reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_climo_mvm_1_output/unique_id/v3.LR.historical_0051/post/atm/180x360_aave/clim" run_type = "model_vs_model" sets = "lat_lon","zonal_mean_xy","zonal_mean_2d","polar","cosp_histogram","meridional_mean_2d","annual_cycle_zonal_mean","zonal_mean_2d_stratosphere","aerosol_aeronet","aerosol_budget", short_ref_name = "v3.LR.historical_0051" diff --git a/tests/integration/generated/test_min_case_e3sm_diags_depend_on_ts_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_depend_on_ts_chrysalis.cfg index 23345ecf..9e47abd2 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_depend_on_ts_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_depend_on_ts_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_ts_output/test-642-working-env-20241121/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_ts_output/unique_id/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_ts_www/test-642-working-env-20241121" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_ts_www/unique_id" years = "1985:1989:4", [ts] diff --git a/tests/integration/generated/test_min_case_e3sm_diags_depend_on_ts_mvm_1_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_depend_on_ts_mvm_1_chrysalis.cfg index 4000c832..fdb3025a 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_depend_on_ts_mvm_1_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_depend_on_ts_mvm_1_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_ts_mvm_1_output/test-642-working-env-20241121/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_ts_mvm_1_output/unique_id/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_ts_mvm_1_www/test-642-working-env-20241121" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_ts_mvm_1_www/unique_id" years = "1985:1989:4", [ts] diff --git a/tests/integration/generated/test_min_case_e3sm_diags_depend_on_ts_mvm_2_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_depend_on_ts_mvm_2_chrysalis.cfg index 0918673e..cc085aa1 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_depend_on_ts_mvm_2_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_depend_on_ts_mvm_2_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_ts_mvm_2_output/test-642-working-env-20241121/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_ts_mvm_2_output/unique_id/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_ts_mvm_2_www/test-642-working-env-20241121" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_ts_mvm_2_www/unique_id" years = "1995:1999:4", [ts] @@ -44,7 +44,7 @@ walltime = "5:00:00" ref_start_yr = 1985 ref_years = "1985-1988", # Use _1 as reference - reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_ts_mvm_1_output/test-642-working-env-20241121/v3.LR.historical_0051/post/atm/180x360_aave/clim" + reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_depend_on_ts_mvm_1_output/unique_id/v3.LR.historical_0051/post/atm/180x360_aave/clim" run_type = "model_vs_model" sets = "enso_diags","qbo", short_ref_name = "v3.LR.historical_0051" diff --git a/tests/integration/generated/test_min_case_e3sm_diags_diurnal_cycle_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_diurnal_cycle_chrysalis.cfg index 918a767d..11e9983f 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_diurnal_cycle_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_diurnal_cycle_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_diurnal_cycle_output/test-642-working-env-20241121/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_diurnal_cycle_output/unique_id/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_diurnal_cycle_www/test-642-working-env-20241121" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_diurnal_cycle_www/unique_id" years = "1985:1989:4", [climo] diff --git a/tests/integration/generated/test_min_case_e3sm_diags_diurnal_cycle_mvm_1_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_diurnal_cycle_mvm_1_chrysalis.cfg index 801f896d..0160066c 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_diurnal_cycle_mvm_1_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_diurnal_cycle_mvm_1_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_diurnal_cycle_mvm_1_output/test-642-working-env-20241121/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_diurnal_cycle_mvm_1_output/unique_id/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_diurnal_cycle_mvm_1_www/test-642-working-env-20241121" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_diurnal_cycle_mvm_1_www/unique_id" years = "1985:1989:4", [climo] diff --git a/tests/integration/generated/test_min_case_e3sm_diags_diurnal_cycle_mvm_2_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_diurnal_cycle_mvm_2_chrysalis.cfg index 3f04032d..251d82c3 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_diurnal_cycle_mvm_2_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_diurnal_cycle_mvm_2_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_diurnal_cycle_mvm_2_output/test-642-working-env-20241121/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_diurnal_cycle_mvm_2_output/unique_id/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_diurnal_cycle_mvm_2_www/test-642-working-env-20241121" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_diurnal_cycle_mvm_2_www/unique_id" years = "1995:1999:4", [climo] @@ -40,7 +40,7 @@ walltime = "5:00:00" ref_name = "v3.LR.historical_0051" ref_years = "1985-1988", # Use _1 as reference - reference_data_path_climo_diurnal = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_diurnal_cycle_mvm_1_output/test-642-working-env-20241121/v3.LR.historical_0051/post/atm/180x360_aave/clim_diurnal_8xdaily" + reference_data_path_climo_diurnal = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_diurnal_cycle_mvm_1_output/unique_id/v3.LR.historical_0051/post/atm/180x360_aave/clim_diurnal_8xdaily" run_type = "model_vs_model" sets = "diurnal_cycle", short_ref_name = "v3.LR.historical_0051" diff --git a/tests/integration/generated/test_min_case_e3sm_diags_lat_lon_land_mvm_1_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_lat_lon_land_mvm_1_chrysalis.cfg index 03ff62b2..f8074879 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_lat_lon_land_mvm_1_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_lat_lon_land_mvm_1_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_lat_lon_land_mvm_1_output/test-642-working-env-20241121/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_lat_lon_land_mvm_1_output/unique_id/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_lat_lon_land_mvm_1_www/test-642-working-env-20241121" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_lat_lon_land_mvm_1_www/unique_id" years = "1985:1989:4", [climo] diff --git a/tests/integration/generated/test_min_case_e3sm_diags_lat_lon_land_mvm_2_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_lat_lon_land_mvm_2_chrysalis.cfg index af44248a..723e6c43 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_lat_lon_land_mvm_2_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_lat_lon_land_mvm_2_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_lat_lon_land_mvm_2_output/test-642-working-env-20241121/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_lat_lon_land_mvm_2_output/unique_id/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_lat_lon_land_mvm_2_www/test-642-working-env-20241121" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_lat_lon_land_mvm_2_www/unique_id" years = "1995:1999:4", [climo] @@ -41,7 +41,7 @@ walltime = "5:00:00" ref_start_yr = 1985 ref_years = "1985-1988", # Use _1 as reference - reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_lat_lon_land_mvm_1_output/test-642-working-env-20241121/v3.LR.historical_0051/post/lnd/180x360_aave/clim" + reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_lat_lon_land_mvm_1_output/unique_id/v3.LR.historical_0051/post/lnd/180x360_aave/clim" run_type = "model_vs_model" sets = "lat_lon_land", short_ref_name = "v3.LR.historical_0051" diff --git a/tests/integration/generated/test_min_case_e3sm_diags_streamflow_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_streamflow_chrysalis.cfg index 48d75f13..9a82f303 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_streamflow_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_streamflow_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_streamflow_output/test-642-working-env-20241121/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_streamflow_output/unique_id/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_streamflow_www/test-642-working-env-20241121" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_streamflow_www/unique_id" years = "1985:1989:4", [ts] diff --git a/tests/integration/generated/test_min_case_e3sm_diags_streamflow_mvm_1_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_streamflow_mvm_1_chrysalis.cfg index 1c4a48bf..bb8de9cf 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_streamflow_mvm_1_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_streamflow_mvm_1_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_streamflow_mvm_1_output/test-642-working-env-20241121/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_streamflow_mvm_1_output/unique_id/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_streamflow_mvm_1_www/test-642-working-env-20241121" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_streamflow_mvm_1_www/unique_id" years = "1985:1989:4", [ts] diff --git a/tests/integration/generated/test_min_case_e3sm_diags_streamflow_mvm_2_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_streamflow_mvm_2_chrysalis.cfg index bc733298..147d851f 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_streamflow_mvm_2_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_streamflow_mvm_2_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_streamflow_mvm_2_output/test-642-working-env-20241121/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_streamflow_mvm_2_output/unique_id/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_streamflow_mvm_2_www/test-642-working-env-20241121" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_streamflow_mvm_2_www/unique_id" years = "1995:1999:4", [ts] @@ -45,7 +45,7 @@ walltime = "5:00:00" ref_start_yr = 1985 ref_years = "1985-1988", # Use _1 as reference - reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_streamflow_mvm_1_output/test-642-working-env-20241121/v3.LR.historical_0051/post/atm/180x360_aave/clim" + reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_streamflow_mvm_1_output/unique_id/v3.LR.historical_0051/post/atm/180x360_aave/clim" # reference_data_path_ts_rof determined automatically run_type = "model_vs_model" sets="streamflow" diff --git a/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_chrysalis.cfg index 344b4323..df05210a 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_chrysalis.cfg @@ -6,15 +6,15 @@ environment_commands = "" input = /lcrc/group/e3sm/ac.forsyth2//E3SMv2/v2.LR.historical_0201 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_output/test-642-working-env-20241121/v2.LR.historical_0201" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_output/unique_id/v2.LR.historical_0201" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_www/test-642-working-env-20241121" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_www/unique_id" years = "1985:1987:2", [tc_analysis] active = True -scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_scratch/test-642-working-env-20241121/v2.LR.historical_0201" +scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_scratch/unique_id/v2.LR.historical_0201" walltime = "00:30:00" [e3sm_diags] diff --git a/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_mvm_1_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_mvm_1_chrysalis.cfg index 5f53199e..aa29ad07 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_mvm_1_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_mvm_1_chrysalis.cfg @@ -6,13 +6,13 @@ environment_commands = "" input = /lcrc/group/e3sm/ac.forsyth2//E3SMv2/v2.LR.historical_0201 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_mvm_1_output/test-642-working-env-20241121/v2.LR.historical_0201" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_mvm_1_output/unique_id/v2.LR.historical_0201" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_mvm_2_www/test-642-working-env-20241121" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_mvm_2_www/unique_id" years = "1985:1987:2", [tc_analysis] active = True -scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_mvm_1_scratch/test-642-working-env-20241121/v2.LR.historical_0201" +scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_mvm_1_scratch/unique_id/v2.LR.historical_0201" walltime = "00:30:00" diff --git a/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_mvm_2_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_mvm_2_chrysalis.cfg index 2389c0ce..a226f2ef 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_mvm_2_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_mvm_2_chrysalis.cfg @@ -7,15 +7,15 @@ environment_commands = "" input = /lcrc/group/e3sm/ac.forsyth2//E3SMv2/v2.LR.historical_0201 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_mvm_2_output/test-642-working-env-20241121/v2.LR.historical_0201" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_mvm_2_output/unique_id/v2.LR.historical_0201" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_mvm_2_www/test-642-working-env-20241121" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_mvm_2_www/unique_id" years = "1995:1997:2", [tc_analysis] active = True -scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_mvm_2_scratch/test-642-working-env-20241121/v2.LR.historical_0201" +scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_mvm_2_scratch/unique_id/v2.LR.historical_0201" walltime = "00:30:00" [e3sm_diags] @@ -38,7 +38,7 @@ walltime = "5:00:00" ref_start_yr = 1985 ref_years = "1985-1986", # Use _1 as reference - reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_mvm_1_output/test-642-working-env-20241121/v2.LR.historical_0201/post/atm/180x360_aave/clim" + reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_mvm_1_output/unique_id/v2.LR.historical_0201/post/atm/180x360_aave/clim" # reference_data_path_tc determined automatically run_type = "model_vs_model" sets = "tc_analysis", diff --git a/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_parallel_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_parallel_chrysalis.cfg index 02403950..c3a7e505 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_parallel_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_parallel_chrysalis.cfg @@ -6,15 +6,15 @@ environment_commands = "" input = /lcrc/group/e3sm/ac.forsyth2//E3SMv2/v2.LR.historical_0201 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_parallel_output/test-642-working-env-20241121/v2.LR.historical_0201" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_parallel_output/unique_id/v2.LR.historical_0201" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_parallel_www/test-642-working-env-20241121" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_parallel_www/unique_id" years = "1985:1989:2", [tc_analysis] active = True -scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_parallel_scratch/test-642-working-env-20241121/v2.LR.historical_0201" +scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_min_case_e3sm_diags_tc_analysis_parallel_scratch/unique_id/v2.LR.historical_0201" walltime = "00:30:00" [e3sm_diags] diff --git a/tests/integration/generated/test_min_case_e3sm_diags_tropical_subseasonal_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_tropical_subseasonal_chrysalis.cfg index 3e9136fe..feaa8fe1 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_tropical_subseasonal_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_tropical_subseasonal_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tropical_subseasonal_output/test-642-working-env-20241121/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tropical_subseasonal_output/unique_id/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_tropical_subseasonal_www/test-642-working-env-20241121" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_tropical_subseasonal_www/unique_id" years = "1985:1989:4", [ts] diff --git a/tests/integration/generated/test_min_case_e3sm_diags_tropical_subseasonal_mvm_1_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_tropical_subseasonal_mvm_1_chrysalis.cfg index adebe9d1..7e9a2d31 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_tropical_subseasonal_mvm_1_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_tropical_subseasonal_mvm_1_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tropical_subseasonal_mvm_1_output/test-642-working-env-20241121/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tropical_subseasonal_mvm_1_output/unique_id/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_tropical_subseasonal_mvm_1_www/test-642-working-env-20241121" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_tropical_subseasonal_mvm_1_www/unique_id" years = "1985:1989:4", [ts] diff --git a/tests/integration/generated/test_min_case_e3sm_diags_tropical_subseasonal_mvm_2_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_tropical_subseasonal_mvm_2_chrysalis.cfg index 428a7173..233569cc 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_tropical_subseasonal_mvm_2_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_tropical_subseasonal_mvm_2_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tropical_subseasonal_mvm_2_output/test-642-working-env-20241121/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tropical_subseasonal_mvm_2_output/unique_id/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_tropical_subseasonal_mvm_2_www/test-642-working-env-20241121" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_e3sm_diags_tropical_subseasonal_mvm_2_www/unique_id" years = "1995:1999:4", [ts] @@ -44,7 +44,7 @@ walltime = "5:00:00" ref_start_yr = 1985 ref_years = "1985-1988", # Use _1 as reference - reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tropical_subseasonal_mvm_1_output/test-642-working-env-20241121/v3.LR.historical_0051/post/atm/180x360_aave/clim" + reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_e3sm_diags_tropical_subseasonal_mvm_1_output/unique_id/v3.LR.historical_0051/post/atm/180x360_aave/clim" # reference_data_path_daily is determined automatically run_type = "model_vs_model" sets = "tropical_subseasonal", diff --git a/tests/integration/generated/test_min_case_global_time_series_custom_chrysalis.cfg b/tests/integration/generated/test_min_case_global_time_series_custom_chrysalis.cfg index 5c2b5228..aef72de6 100644 --- a/tests/integration/generated/test_min_case_global_time_series_custom_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_global_time_series_custom_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_global_time_series_custom_output/test-642-working-env-20241121/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_global_time_series_custom_output/unique_id/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_global_time_series_custom_www/test-642-working-env-20241121" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_global_time_series_custom_www/unique_id" [ts] active = True @@ -34,6 +34,7 @@ years = "1985:1995:5", [global_time_series] active = True +environment_commands = "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate zppy_interfaces_dev_pr_1_20241121" experiment_name = "v3.LR.historical_0051" figstr = "v3.LR.historical_0051" plots_original="" diff --git a/tests/integration/generated/test_min_case_global_time_series_original_8_chrysalis.cfg b/tests/integration/generated/test_min_case_global_time_series_original_8_chrysalis.cfg index 351435a5..cfafc9a7 100644 --- a/tests/integration/generated/test_min_case_global_time_series_original_8_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_global_time_series_original_8_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_global_time_series_original_8_output/test-642-working-env-20241121/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_global_time_series_original_8_output/unique_id/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_global_time_series_original_8_www/test-642-working-env-20241121" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_global_time_series_original_8_www/unique_id" [ts] active = True @@ -40,7 +40,7 @@ walltime = "00:30:00" [global_time_series] active = True climo_years = "1985-1989", "1990-1995", -environment_commands = "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate zppy_interfaces_dev_pr_1_20241121" # TODO: Set zi_environment_commands in utils.py +environment_commands = "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate zppy_interfaces_dev_pr_1_20241121" experiment_name = "v3.LR.historical_0051" figstr = "v3.LR.historical_0051" moc_file=mocTimeSeries_1985-1995.nc diff --git a/tests/integration/generated/test_min_case_global_time_series_original_8_no_ocn_chrysalis.cfg b/tests/integration/generated/test_min_case_global_time_series_original_8_no_ocn_chrysalis.cfg index ac1a8a00..86389e0d 100644 --- a/tests/integration/generated/test_min_case_global_time_series_original_8_no_ocn_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_global_time_series_original_8_no_ocn_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_global_time_series_original_8_no_ocn_output/test-642-working-env-20241121/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_global_time_series_original_8_no_ocn_output/unique_id/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_global_time_series_original_8_no_ocn_www/test-642-working-env-20241121" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_global_time_series_original_8_no_ocn_www/unique_id" [ts] active = True @@ -26,6 +26,7 @@ walltime = "00:30:00" [global_time_series] active = True +environment_commands = "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate zppy_interfaces_dev_pr_1_20241121" experiment_name = "v3.LR.historical_0051" figstr = "v3.LR.historical_0051" plots_original="net_toa_flux_restom,global_surface_air_temperature,toa_radiation,net_atm_energy_imbalance,net_atm_water_imbalance" diff --git a/tests/integration/generated/test_min_case_ilamb_chrysalis.cfg b/tests/integration/generated/test_min_case_ilamb_chrysalis.cfg index e310a375..2c361140 100644 --- a/tests/integration/generated/test_min_case_ilamb_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_ilamb_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_ilamb_output/test-642-working-env-20241121/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_ilamb_output/unique_id/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_ilamb_www/test-642-working-env-20241121" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_ilamb_www/unique_id" [ts] active = True diff --git a/tests/integration/generated/test_min_case_ilamb_land_only_chrysalis.cfg b/tests/integration/generated/test_min_case_ilamb_land_only_chrysalis.cfg index 5d70d56e..89b08f57 100644 --- a/tests/integration/generated/test_min_case_ilamb_land_only_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_ilamb_land_only_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_ilamb_land_only_output/test-642-working-env-20241121/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_ilamb_land_only_output/unique_id/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_ilamb_land_only_www/test-642-working-env-20241121" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_ilamb_land_only_www/unique_id" [ts] active = True diff --git a/tests/integration/generated/test_min_case_mpas_analysis_chrysalis.cfg b/tests/integration/generated/test_min_case_mpas_analysis_chrysalis.cfg index 665def29..0cf4232b 100644 --- a/tests/integration/generated/test_min_case_mpas_analysis_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_mpas_analysis_chrysalis.cfg @@ -6,10 +6,10 @@ environment_commands = "" input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_mpas_analysis_output/test-642-working-env-20241121/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_mpas_analysis_output/unique_id/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_mpas_analysis_www/test-642-working-env-20241121" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_mpas_analysis_www/unique_id" [mpas_analysis] active = True diff --git a/tests/integration/generated/test_min_case_tc_analysis_simultaneous_1_chrysalis.cfg b/tests/integration/generated/test_min_case_tc_analysis_simultaneous_1_chrysalis.cfg index 5be268a2..41de5e34 100644 --- a/tests/integration/generated/test_min_case_tc_analysis_simultaneous_1_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_tc_analysis_simultaneous_1_chrysalis.cfg @@ -6,13 +6,13 @@ environment_commands = "" input = /lcrc/group/e3sm/ac.forsyth2//E3SMv2/v2.LR.historical_0201 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_tc_analysis_simultaneous_1_output/test-642-working-env-20241121/v2.LR.historical_0201" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_tc_analysis_simultaneous_1_output/unique_id/v2.LR.historical_0201" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_tc_analysis_simultaneous_1_www/test-642-working-env-20241121" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_tc_analysis_simultaneous_1_www/unique_id" years = "1985:1987:2", [tc_analysis] active = True -scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_min_case_tc_analysis_simultaneous_1_scratch/test-642-working-env-20241121/v2.LR.historical_0201" +scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_min_case_tc_analysis_simultaneous_1_scratch/unique_id/v2.LR.historical_0201" walltime = "00:30:00" diff --git a/tests/integration/generated/test_min_case_tc_analysis_simultaneous_2_chrysalis.cfg b/tests/integration/generated/test_min_case_tc_analysis_simultaneous_2_chrysalis.cfg index dd38f033..71880091 100644 --- a/tests/integration/generated/test_min_case_tc_analysis_simultaneous_2_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_tc_analysis_simultaneous_2_chrysalis.cfg @@ -8,13 +8,13 @@ environment_commands = "" input = /lcrc/group/e3sm/ac.forsyth2//E3SMv2/v2.LR.historical_0201 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_tc_analysis_simultaneous_2_output/test-642-working-env-20241121/v2.LR.historical_0201" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_tc_analysis_simultaneous_2_output/unique_id/v2.LR.historical_0201" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_tc_analysis_simultaneous_2_www/test-642-working-env-20241121" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_tc_analysis_simultaneous_2_www/unique_id" years = "1985:1987:2", [tc_analysis] active = True -scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_min_case_tc_analysis_simultaneous_2_scratch/test-642-working-env-20241121/v2.LR.historical_0201" +scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_min_case_tc_analysis_simultaneous_2_scratch/unique_id/v2.LR.historical_0201" walltime = "00:30:00" diff --git a/tests/integration/generated/test_weekly_bundles_chrysalis.cfg b/tests/integration/generated/test_weekly_bundles_chrysalis.cfg index 48576357..8d64c617 100644 --- a/tests/integration/generated/test_weekly_bundles_chrysalis.cfg +++ b/tests/integration/generated/test_weekly_bundles_chrysalis.cfg @@ -30,11 +30,11 @@ input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" # To run this test, edit `output` and `www` in this file, along with `actual_images_dir` in test_bundles.py -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_bundles_output/test-642-working-env-20241121/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_bundles_output/unique_id/v3.LR.historical_0051" partition = "compute" qos = "regular" walltime = "07:00:00" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_weekly_bundles_www/test-642-working-env-20241121" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_weekly_bundles_www/unique_id" [bundle] @@ -99,7 +99,7 @@ years = "1985:1989:2", # [tc_analysis] # active = True # bundle = "bundle3" # Let bundle1 finish first because "e3sm_diags: atm_monthly_180x360_aave_mvm" requires "ts: atm_monthly_180x360_aave" -# scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_weekly_bundles_scratch/test-642-working-env-20241121/v3.LR.historical_0051" +# scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_weekly_bundles_scratch/unique_id/v3.LR.historical_0051" # years = "1985:1989:2", [e3sm_diags] @@ -127,7 +127,7 @@ years = "1985:1989:2", ref_name = "v3.LR.historical_0051" ref_start_yr = 1985 ref_years = "1985-1986", - reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_bundles_output/test-642-working-env-20241121/v3.LR.historical_0051/post/atm/180x360_aave/clim" + reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_bundles_output/unique_id/v3.LR.historical_0051/post/atm/180x360_aave/clim" run_type = "model_vs_model" # TODO: Add "tc_analysis" back in after empty dat is resolved. sets = "polar","enso_diags","streamflow", @@ -141,6 +141,7 @@ years = "1985:1989:2", [global_time_series] active = True bundle = "bundle2" +environment_commands = "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate zppy_interfaces_dev_pr_1_20241121" experiment_name = "v3.LR.historical_0051" figstr = "v3.LR.historical_0051" plots_original="net_toa_flux_restom,global_surface_air_temperature,toa_radiation,net_atm_energy_imbalance,net_atm_water_imbalance" diff --git a/tests/integration/generated/test_weekly_comprehensive_v2_chrysalis.cfg b/tests/integration/generated/test_weekly_comprehensive_v2_chrysalis.cfg index ebf1f326..8bf3df23 100644 --- a/tests/integration/generated/test_weekly_comprehensive_v2_chrysalis.cfg +++ b/tests/integration/generated/test_weekly_comprehensive_v2_chrysalis.cfg @@ -7,10 +7,10 @@ fail_on_dependency_skip = True input = /lcrc/group/e3sm/ac.forsyth2//E3SMv2/v2.LR.historical_0201 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v2_output/test-642-working-env-20241121/v2.LR.historical_0201" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v2_output/unique_id/v2.LR.historical_0201" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_weekly_comprehensive_v2_www/test-642-working-env-20241121" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_weekly_comprehensive_v2_www/unique_id" years = "1980:1984:2", [climo] @@ -86,7 +86,7 @@ walltime = "00:30:00" [tc_analysis] active = True -scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_weekly_comprehensive_v2_scratch/test-642-working-env-20241121/v2.LR.historical_0201" +scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_weekly_comprehensive_v2_scratch/unique_id/v2.LR.historical_0201" walltime = "00:30:00" [e3sm_diags] @@ -127,7 +127,7 @@ years = "1982:1984:2", partition = "compute" qos = "regular" ref_name = "v2.LR.historical_0201" - reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v2_output/test-642-working-env-20241121/v2.LR.historical_0201/post/atm/180x360_aave/clim" + reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v2_output/unique_id/v2.LR.historical_0201/post/atm/180x360_aave/clim" run_type = "model_vs_model" short_ref_name = "same simulation" swap_test_ref = False @@ -144,7 +144,7 @@ years = "1982:1984:2", partition = "compute" qos = "regular" ref_name = "v2.LR.historical_0201" - reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v2_output/test-642-working-env-20241121/v2.LR.historical_0201/post/lnd/180x360_aave/clim" + reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v2_output/unique_id/v2.LR.historical_0201/post/lnd/180x360_aave/clim" run_type = "model_vs_model" sets = "lat_lon_land", short_ref_name = "same simulation" @@ -168,6 +168,7 @@ walltime = "00:30:00" [global_time_series] active = True climo_years ="1980-1984", "1985-1990", +environment_commands = "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate zppy_interfaces_dev_pr_1_20241121" experiment_name = "v2.LR.historical_0201" figstr = "v2.LR.historical_0201" moc_file=mocTimeSeries_1980-1990.nc diff --git a/tests/integration/generated/test_weekly_comprehensive_v3_chrysalis.cfg b/tests/integration/generated/test_weekly_comprehensive_v3_chrysalis.cfg index a27c6699..b63ce420 100644 --- a/tests/integration/generated/test_weekly_comprehensive_v3_chrysalis.cfg +++ b/tests/integration/generated/test_weekly_comprehensive_v3_chrysalis.cfg @@ -9,10 +9,10 @@ guess_section_parameters = False input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 input_subdir = archive/atm/hist mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v3_output/test-642-working-env-20241121/v3.LR.historical_0051" +output = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v3_output/unique_id/v3.LR.historical_0051" partition = "debug" qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_weekly_comprehensive_v3_www/test-642-working-env-20241121" +www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_weekly_comprehensive_v3_www/unique_id" years = "1985:1989:2", [climo] @@ -91,7 +91,7 @@ walltime = "00:30:00" # TODO: Add "tc_analysis" back in after empty dat is resolved. # [tc_analysis] # active = True -# scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_weekly_comprehensive_v3_scratch/test-642-working-env-20241121/v3.LR.historical_0051" +# scratch = "/lcrc/globalscratch/ac.forsyth2/zppy_weekly_comprehensive_v3_scratch/unique_id/v3.LR.historical_0051" # walltime = "00:30:00" [e3sm_diags] @@ -152,16 +152,16 @@ tc_obs = "/lcrc/group/e3sm/diagnostics/observations/Atm/tc-analysis/" tag = "model_vs_model" ts_num_years_ref = 2 # Reference paths - reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v3_output/test-642-working-env-20241121/v3.LR.historical_0051/post/atm/180x360_aave/clim" + reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v3_output/unique_id/v3.LR.historical_0051/post/atm/180x360_aave/clim" # mvm streamflow only gauges_path = "/lcrc/group/e3sm/diagnostics/observations/Atm/time-series/GSIM/GSIM_catchment_characteristics_all_1km2.csv" - reference_data_path_ts_rof = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v3_output/test-642-working-env-20241121/v3.LR.historical_0051/post/rof/native/ts/monthly" + reference_data_path_ts_rof = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v3_output/unique_id/v3.LR.historical_0051/post/rof/native/ts/monthly" # mvm diurnal_cycle only - reference_data_path_climo_diurnal = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v3_output/test-642-working-env-20241121/v3.LR.historical_0051/post/atm/180x360_aave/clim_diurnal_8xdaily" + reference_data_path_climo_diurnal = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v3_output/unique_id/v3.LR.historical_0051/post/atm/180x360_aave/clim_diurnal_8xdaily" # mvm "enso_diags", "qbo", "area_mean_time_series" - reference_data_path_ts = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v3_output/test-642-working-env-20241121/v3.LR.historical_0051/post/atm/180x360_aave/ts/monthly" + reference_data_path_ts = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v3_output/unique_id/v3.LR.historical_0051/post/atm/180x360_aave/ts/monthly" # mvm tropical_subseasonal only - reference_data_path_ts_daily = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v3_output/test-642-working-env-20241121/v3.LR.historical_0051/post/atm/180x360_aave/ts/daily" + reference_data_path_ts_daily = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v3_output/unique_id/v3.LR.historical_0051/post/atm/180x360_aave/ts/daily" [[ lnd_monthly_mvm_lnd ]] # Test model-vs-model using the same files as the reference @@ -177,7 +177,7 @@ tc_obs = "/lcrc/group/e3sm/diagnostics/observations/Atm/tc-analysis/" tag = "model_vs_model" ts_num_years_ref = 2 # Reference paths - reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v3_output/test-642-working-env-20241121/v3.LR.historical_0051/post/lnd/180x360_aave/clim" + reference_data_path = "/lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v3_output/unique_id/v3.LR.historical_0051/post/lnd/180x360_aave/clim" [mpas_analysis] @@ -196,6 +196,7 @@ walltime = "00:30:00" [global_time_series] active = True climo_years = "1985-1989", "1990-1995", +environment_commands = "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate zppy_interfaces_dev_pr_1_20241121" experiment_name = "v3.LR.historical_0051" figstr = "v3.LR.historical_0051" moc_file=mocTimeSeries_1985-1995.nc diff --git a/tests/integration/generated/update_weekly_expected_files_chrysalis.sh b/tests/integration/generated/update_weekly_expected_files_chrysalis.sh index 20298189..a2967214 100755 --- a/tests/integration/generated/update_weekly_expected_files_chrysalis.sh +++ b/tests/integration/generated/update_weekly_expected_files_chrysalis.sh @@ -9,13 +9,13 @@ do # Your output will now become the new expectation. # Copy output so you don't have to rerun zppy to generate the output. if [[ "${test_name,,}" == "comprehensive_v2" ]]; then - cp -r /lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_weekly_${test_name}_www/test-642-working-env-20241121/v2.LR.historical_0201 /lcrc/group/e3sm/public_html/zppy_test_resources/expected_${test_name} + cp -r /lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_weekly_${test_name}_www/unique_id/v2.LR.historical_0201 /lcrc/group/e3sm/public_html/zppy_test_resources/expected_${test_name} else - cp -r /lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_weekly_${test_name}_www/test-642-working-env-20241121/v3.LR.historical_0051 /lcrc/group/e3sm/public_html/zppy_test_resources/expected_${test_name} + cp -r /lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_weekly_${test_name}_www/unique_id/v3.LR.historical_0051 /lcrc/group/e3sm/public_html/zppy_test_resources/expected_${test_name} fi if [[ "${test_name,,}" == "bundles" ]]; then mkdir -p /lcrc/group/e3sm/public_html/zppy_test_resources/expected_bundles/bundle_files - cp -r /lcrc/group/e3sm/ac.forsyth2/zppy_weekly_bundles_output/test-642-working-env-20241121/v3.LR.historical_0051/post/scripts/bundle*.bash /lcrc/group/e3sm/public_html/zppy_test_resources/expected_bundles/bundle_files + cp -r /lcrc/group/e3sm/ac.forsyth2/zppy_weekly_bundles_output/unique_id/v3.LR.historical_0051/post/scripts/bundle*.bash /lcrc/group/e3sm/public_html/zppy_test_resources/expected_bundles/bundle_files fi zppy_top_level=$(pwd) cd /lcrc/group/e3sm/public_html/zppy_test_resources/expected_${test_name} diff --git a/tests/integration/template_min_case_global_time_series_custom.cfg b/tests/integration/template_min_case_global_time_series_custom.cfg index 538ac7ac..99aa67ef 100644 --- a/tests/integration/template_min_case_global_time_series_custom.cfg +++ b/tests/integration/template_min_case_global_time_series_custom.cfg @@ -34,6 +34,7 @@ years = "1985:1995:5", [global_time_series] active = True +environment_commands = "#expand global_time_series_environment_commands#" experiment_name = "#expand case_name#" figstr = "#expand case_name#" plots_original="" diff --git a/tests/integration/template_min_case_global_time_series_original_8.cfg b/tests/integration/template_min_case_global_time_series_original_8.cfg index 01ca5f3d..8f2d2a74 100644 --- a/tests/integration/template_min_case_global_time_series_original_8.cfg +++ b/tests/integration/template_min_case_global_time_series_original_8.cfg @@ -40,7 +40,7 @@ walltime = "#expand mpas_analysis_walltime#" [global_time_series] active = True climo_years = "1985-1989", "1990-1995", -environment_commands = "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate zppy_interfaces_dev_pr_1_20241121" # TODO: Set zi_environment_commands in utils.py +environment_commands = "#expand global_time_series_environment_commands#" experiment_name = "#expand case_name#" figstr = "#expand case_name#" moc_file=mocTimeSeries_1985-1995.nc diff --git a/tests/integration/template_min_case_global_time_series_original_8_no_ocn.cfg b/tests/integration/template_min_case_global_time_series_original_8_no_ocn.cfg index 57403838..a8adecb6 100644 --- a/tests/integration/template_min_case_global_time_series_original_8_no_ocn.cfg +++ b/tests/integration/template_min_case_global_time_series_original_8_no_ocn.cfg @@ -26,6 +26,7 @@ walltime = "00:30:00" [global_time_series] active = True +environment_commands = "#expand global_time_series_environment_commands#" experiment_name = "#expand case_name#" figstr = "#expand case_name#" plots_original="net_toa_flux_restom,global_surface_air_temperature,toa_radiation,net_atm_energy_imbalance,net_atm_water_imbalance" diff --git a/tests/integration/template_min_case_global_time_series_setup_only.cfg b/tests/integration/template_min_case_global_time_series_setup_only.cfg deleted file mode 100644 index 040586dd..00000000 --- a/tests/integration/template_min_case_global_time_series_setup_only.cfg +++ /dev/null @@ -1,49 +0,0 @@ -[default] -case = "#expand case_name#" -constraint = "#expand constraint#" -dry_run = "#expand dry_run#" -environment_commands = "#expand environment_commands#" -input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/#expand case_name# -input_subdir = archive/atm/hist -mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "#expand user_output#zppy_min_case_global_time_series_setup_only_output/#expand unique_id#/#expand case_name#" -partition = "#expand partition_short#" -qos = "#expand qos_short#" -www = "#expand user_www#zppy_min_case_global_time_series_setup_only_www/#expand unique_id#" - -[ts] -active = True -e3sm_to_cmip_environment_commands = "#expand e3sm_to_cmip_environment_commands#" -walltime = "00:30:00" - - [[ atm_monthly_glb ]] - # Note global average won't work for 3D variables. - frequency = "monthly" - input_files = "eam.h0" - input_subdir = "archive/atm/hist" - mapping_file = "glb" - years = "1985:1995:5", - -[mpas_analysis] -active = True -anomalyRefYear = 1985 -climo_years = "1985-1989", "1990-1995", -enso_years = "1985-1989", "1990-1995", -mesh = "IcoswISC30E3r5" -parallelTaskCount = 6 -partition = "#expand partition_long#" -qos = "#expand qos_long#" -shortTermArchive = True -ts_years = "1985-1989", "1985-1995", -walltime = "#expand mpas_analysis_walltime#" - -# [global_time_series] -# active = True -# climo_years = "1985-1989", "1990-1995", -# experiment_name = "#expand case_name#" -# figstr = "#expand case_name#" -# moc_file=mocTimeSeries_1985-1995.nc -# ts_num_years = 5 -# ts_years = "1985-1989", "1985-1995", -# walltime = "00:30:00" -# years = "1985-1995", diff --git a/tests/integration/template_weekly_bundles.cfg b/tests/integration/template_weekly_bundles.cfg index 2ade2706..c9a40b73 100644 --- a/tests/integration/template_weekly_bundles.cfg +++ b/tests/integration/template_weekly_bundles.cfg @@ -141,6 +141,7 @@ years = "1985:1989:2", [global_time_series] active = True bundle = "bundle2" +environment_commands = "#expand global_time_series_environment_commands#" experiment_name = "#expand case_name#" figstr = "#expand case_name#" plots_original="net_toa_flux_restom,global_surface_air_temperature,toa_radiation,net_atm_energy_imbalance,net_atm_water_imbalance" diff --git a/tests/integration/template_weekly_comprehensive_v2.cfg b/tests/integration/template_weekly_comprehensive_v2.cfg index 213d7792..69ca75e9 100644 --- a/tests/integration/template_weekly_comprehensive_v2.cfg +++ b/tests/integration/template_weekly_comprehensive_v2.cfg @@ -168,6 +168,7 @@ walltime = "#expand mpas_analysis_walltime#" [global_time_series] active = True climo_years ="1980-1984", "1985-1990", +environment_commands = "#expand global_time_series_environment_commands#" experiment_name = "#expand case_name_v2#" figstr = "#expand case_name_v2#" moc_file=mocTimeSeries_1980-1990.nc diff --git a/tests/integration/template_weekly_comprehensive_v3.cfg b/tests/integration/template_weekly_comprehensive_v3.cfg index c7e312de..0a308b7d 100644 --- a/tests/integration/template_weekly_comprehensive_v3.cfg +++ b/tests/integration/template_weekly_comprehensive_v3.cfg @@ -196,6 +196,7 @@ walltime = "#expand mpas_analysis_walltime#" [global_time_series] active = True climo_years = "1985-1989", "1990-1995", +environment_commands = "#expand global_time_series_environment_commands#" experiment_name = "#expand case_name#" figstr = "#expand case_name#" moc_file=mocTimeSeries_1985-1995.nc diff --git a/tests/integration/utils.py b/tests/integration/utils.py index 4d221a5c..fce78f65 100644 --- a/tests/integration/utils.py +++ b/tests/integration/utils.py @@ -7,7 +7,7 @@ from mache import MachineInfo from PIL import Image, ImageChops, ImageDraw -UNIQUE_ID = "test-642-working-env-20241121" +UNIQUE_ID = "unique_id" # Image checking ########################################################## @@ -153,6 +153,7 @@ def get_chyrsalis_expansions(config): "e3sm_to_cmip_environment_commands": "", "environment_commands_test": "", "expected_dir": "/lcrc/group/e3sm/public_html/zppy_test_resources/", + "global_time_series_environment_commands": "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate zppy_interfaces_dev_pr_1_20241121", "mpas_analysis_walltime": "00:30:00", "partition_long": "compute", "partition_short": "debug", @@ -182,6 +183,7 @@ def get_compy_expansions(config): "e3sm_to_cmip_environment_commands": "", "environment_commands_test": "", "expected_dir": "/compyfs/www/zppy_test_resources/", + "global_time_series_environment_commands": "", "mpas_analysis_walltime": "00:30:00", "partition_long": "slurm", "partition_short": "short", @@ -211,6 +213,7 @@ def get_perlmutter_expansions(config): "e3sm_to_cmip_environment_commands": "", "environment_commands_test": "", "expected_dir": "/global/cfs/cdirs/e3sm/www/zppy_test_resources/", + "global_time_series_environment_commands": "", "mpas_analysis_walltime": "01:00:00", "partition_long": "", "partition_short": "", @@ -309,7 +312,6 @@ def generate_cfgs(unified_testing=False, dry_run=False): "min_case_global_time_series_custom", "min_case_global_time_series_original_8_no_ocn", "min_case_global_time_series_original_8", - "min_case_global_time_series_setup_only", "min_case_ilamb_land_only", "min_case_ilamb", "min_case_mpas_analysis", diff --git a/zppy/templates/global_time_series.bash b/zppy/templates/global_time_series.bash index 1a4ebdf8..8c367528 100644 --- a/zppy/templates/global_time_series.bash +++ b/zppy/templates/global_time_series.bash @@ -23,7 +23,6 @@ results_dir={{ prefix }}_results zi-global-time-series --use_ocn {{ use_ocn }} --input {{ input }} --input_subdir {{ input_subdir }} --moc_file {{ moc_file }} --case_dir {{ output }} --experiment_name {{ experiment_name }} --figstr {{ figstr }} --color {{ color }} --ts_num_years {{ ts_num_years }} --plots_original {{ plots_original }} --atmosphere_only {{ atmosphere_only }} --plots_atm {{ plots_atm }} --plots_ice {{ plots_ice }} --plots_lnd {{ plots_lnd }} --plots_ocn {{ plots_ocn }} --nrows 4 --ncols 2 --results_dir ${results_dir} --regions {{ regions }} --start_yr {{ year1 }} --end_yr {{ year2 }} echo 'Copy images to directory' -results_dir={{ prefix }}_results results_dir_absolute_path={{ scriptDir }}/${results_dir} mkdir -p ${results_dir_absolute_path} cp ${results_dir}/*.pdf ${results_dir_absolute_path} From 23d8f7506d073b55b9cbdd752531cd0b68639bf5 Mon Sep 17 00:00:00 2001 From: Ryan Forsyth Date: Thu, 21 Nov 2024 14:48:04 -0600 Subject: [PATCH 08/13] Unit tests passing --- ...se_global_time_series_custom_chrysalis.cfg | 2 +- ...lobal_time_series_original_8_chrysalis.cfg | 2 +- ...ime_series_original_8_no_ocn_chrysalis.cfg | 2 +- ...lobal_time_series_setup_only_chrysalis.cfg | 49 ------------------- .../test_weekly_bundles_chrysalis.cfg | 2 +- ...test_weekly_comprehensive_v2_chrysalis.cfg | 2 +- ...test_weekly_comprehensive_v3_chrysalis.cfg | 2 +- tests/integration/utils.py | 2 +- tests/test_sections.py | 18 ++++--- 9 files changed, 17 insertions(+), 64 deletions(-) delete mode 100644 tests/integration/generated/test_min_case_global_time_series_setup_only_chrysalis.cfg diff --git a/tests/integration/generated/test_min_case_global_time_series_custom_chrysalis.cfg b/tests/integration/generated/test_min_case_global_time_series_custom_chrysalis.cfg index aef72de6..650b63d4 100644 --- a/tests/integration/generated/test_min_case_global_time_series_custom_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_global_time_series_custom_chrysalis.cfg @@ -34,7 +34,7 @@ years = "1985:1995:5", [global_time_series] active = True -environment_commands = "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate zppy_interfaces_dev_pr_1_20241121" +environment_commands = "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate zppy_interfaces_dev_pr_1_20241121v2" experiment_name = "v3.LR.historical_0051" figstr = "v3.LR.historical_0051" plots_original="" diff --git a/tests/integration/generated/test_min_case_global_time_series_original_8_chrysalis.cfg b/tests/integration/generated/test_min_case_global_time_series_original_8_chrysalis.cfg index cfafc9a7..a17b8109 100644 --- a/tests/integration/generated/test_min_case_global_time_series_original_8_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_global_time_series_original_8_chrysalis.cfg @@ -40,7 +40,7 @@ walltime = "00:30:00" [global_time_series] active = True climo_years = "1985-1989", "1990-1995", -environment_commands = "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate zppy_interfaces_dev_pr_1_20241121" +environment_commands = "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate zppy_interfaces_dev_pr_1_20241121v2" experiment_name = "v3.LR.historical_0051" figstr = "v3.LR.historical_0051" moc_file=mocTimeSeries_1985-1995.nc diff --git a/tests/integration/generated/test_min_case_global_time_series_original_8_no_ocn_chrysalis.cfg b/tests/integration/generated/test_min_case_global_time_series_original_8_no_ocn_chrysalis.cfg index 86389e0d..899a2f8b 100644 --- a/tests/integration/generated/test_min_case_global_time_series_original_8_no_ocn_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_global_time_series_original_8_no_ocn_chrysalis.cfg @@ -26,7 +26,7 @@ walltime = "00:30:00" [global_time_series] active = True -environment_commands = "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate zppy_interfaces_dev_pr_1_20241121" +environment_commands = "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate zppy_interfaces_dev_pr_1_20241121v2" experiment_name = "v3.LR.historical_0051" figstr = "v3.LR.historical_0051" plots_original="net_toa_flux_restom,global_surface_air_temperature,toa_radiation,net_atm_energy_imbalance,net_atm_water_imbalance" diff --git a/tests/integration/generated/test_min_case_global_time_series_setup_only_chrysalis.cfg b/tests/integration/generated/test_min_case_global_time_series_setup_only_chrysalis.cfg deleted file mode 100644 index 1b89c136..00000000 --- a/tests/integration/generated/test_min_case_global_time_series_setup_only_chrysalis.cfg +++ /dev/null @@ -1,49 +0,0 @@ -[default] -case = "v3.LR.historical_0051" -constraint = "" -dry_run = "False" -environment_commands = "" -input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051 -input_subdir = archive/atm/hist -mapping_file = "map_ne30pg2_to_cmip6_180x360_aave.20200201.nc" -output = "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_global_time_series_setup_only_output/test-642-working-env-20241121/v3.LR.historical_0051" -partition = "debug" -qos = "regular" -www = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_min_case_global_time_series_setup_only_www/test-642-working-env-20241121" - -[ts] -active = True -e3sm_to_cmip_environment_commands = "" -walltime = "00:30:00" - - [[ atm_monthly_glb ]] - # Note global average won't work for 3D variables. - frequency = "monthly" - input_files = "eam.h0" - input_subdir = "archive/atm/hist" - mapping_file = "glb" - years = "1985:1995:5", - -[mpas_analysis] -active = True -anomalyRefYear = 1985 -climo_years = "1985-1989", "1990-1995", -enso_years = "1985-1989", "1990-1995", -mesh = "IcoswISC30E3r5" -parallelTaskCount = 6 -partition = "compute" -qos = "regular" -shortTermArchive = True -ts_years = "1985-1989", "1985-1995", -walltime = "00:30:00" - -# [global_time_series] -# active = True -# climo_years = "1985-1989", "1990-1995", -# experiment_name = "v3.LR.historical_0051" -# figstr = "v3.LR.historical_0051" -# moc_file=mocTimeSeries_1985-1995.nc -# ts_num_years = 5 -# ts_years = "1985-1989", "1985-1995", -# walltime = "00:30:00" -# years = "1985-1995", diff --git a/tests/integration/generated/test_weekly_bundles_chrysalis.cfg b/tests/integration/generated/test_weekly_bundles_chrysalis.cfg index 8d64c617..529711c8 100644 --- a/tests/integration/generated/test_weekly_bundles_chrysalis.cfg +++ b/tests/integration/generated/test_weekly_bundles_chrysalis.cfg @@ -141,7 +141,7 @@ years = "1985:1989:2", [global_time_series] active = True bundle = "bundle2" -environment_commands = "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate zppy_interfaces_dev_pr_1_20241121" +environment_commands = "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate zppy_interfaces_dev_pr_1_20241121v2" experiment_name = "v3.LR.historical_0051" figstr = "v3.LR.historical_0051" plots_original="net_toa_flux_restom,global_surface_air_temperature,toa_radiation,net_atm_energy_imbalance,net_atm_water_imbalance" diff --git a/tests/integration/generated/test_weekly_comprehensive_v2_chrysalis.cfg b/tests/integration/generated/test_weekly_comprehensive_v2_chrysalis.cfg index 8bf3df23..8ef97afe 100644 --- a/tests/integration/generated/test_weekly_comprehensive_v2_chrysalis.cfg +++ b/tests/integration/generated/test_weekly_comprehensive_v2_chrysalis.cfg @@ -168,7 +168,7 @@ walltime = "00:30:00" [global_time_series] active = True climo_years ="1980-1984", "1985-1990", -environment_commands = "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate zppy_interfaces_dev_pr_1_20241121" +environment_commands = "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate zppy_interfaces_dev_pr_1_20241121v2" experiment_name = "v2.LR.historical_0201" figstr = "v2.LR.historical_0201" moc_file=mocTimeSeries_1980-1990.nc diff --git a/tests/integration/generated/test_weekly_comprehensive_v3_chrysalis.cfg b/tests/integration/generated/test_weekly_comprehensive_v3_chrysalis.cfg index b63ce420..139347b1 100644 --- a/tests/integration/generated/test_weekly_comprehensive_v3_chrysalis.cfg +++ b/tests/integration/generated/test_weekly_comprehensive_v3_chrysalis.cfg @@ -196,7 +196,7 @@ walltime = "00:30:00" [global_time_series] active = True climo_years = "1985-1989", "1990-1995", -environment_commands = "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate zppy_interfaces_dev_pr_1_20241121" +environment_commands = "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate zppy_interfaces_dev_pr_1_20241121v2" experiment_name = "v3.LR.historical_0051" figstr = "v3.LR.historical_0051" moc_file=mocTimeSeries_1985-1995.nc diff --git a/tests/integration/utils.py b/tests/integration/utils.py index fce78f65..1390d206 100644 --- a/tests/integration/utils.py +++ b/tests/integration/utils.py @@ -153,7 +153,7 @@ def get_chyrsalis_expansions(config): "e3sm_to_cmip_environment_commands": "", "environment_commands_test": "", "expected_dir": "/lcrc/group/e3sm/public_html/zppy_test_resources/", - "global_time_series_environment_commands": "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate zppy_interfaces_dev_pr_1_20241121", + "global_time_series_environment_commands": "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate zppy_interfaces_dev_pr_1_20241121v2", "mpas_analysis_walltime": "00:30:00", "partition_long": "compute", "partition_short": "debug", diff --git a/tests/test_sections.py b/tests/test_sections.py index 434cfdfb..eaecdbfa 100644 --- a/tests/test_sections.py +++ b/tests/test_sections.py @@ -34,16 +34,18 @@ def compare(tester, actual, expected): def get_config(test_case, config_file): # Subdirectory where templates are located - templateDir = os.path.join("zppy", "templates") + defaults_dir = os.path.join("zppy", "defaults") # Read configuration file and validate it - config = ConfigObj(config_file, configspec=os.path.join(templateDir, "default.ini")) + config = ConfigObj( + config_file, configspec=os.path.join(defaults_dir, "default.ini") + ) validator = Validator() test_case.assertTrue(config.validate(validator)) # Add templateDir to config - config["default"]["templateDir"] = templateDir + config["default"]["templateDir"] = os.path.join("zppy", "templates") # For debugging DISPLAY_CONFIG = False @@ -104,7 +106,7 @@ def test_sections(self): expected_section = { "active": "True", "area_nm": "area", - "cmip_metadata": "e3sm_to_cmip/default_metadata.json", + "cmip_metadata": "inclusions/e3sm_to_cmip/default_metadata.json", "dpf": 30, "extra_vars": "", "input_component": "", @@ -125,7 +127,7 @@ def test_sections(self): "area_nm": "area", "campaign": "none", "case": "CASE", - "cmip_metadata": "e3sm_to_cmip/default_metadata.json", + "cmip_metadata": "inclusions/e3sm_to_cmip/default_metadata.json", "constraint": "", "debug": False, "dpf": 30, @@ -279,7 +281,7 @@ def test_subsections(self): expected_section = { "active": "True", "area_nm": "area", - "cmip_metadata": "e3sm_to_cmip/default_metadata.json", + "cmip_metadata": "inclusions/e3sm_to_cmip/default_metadata.json", "dpf": 30, "extra_vars": "", "input_component": "", @@ -320,7 +322,7 @@ def test_subsections(self): "bundle": "", "campaign": "none", "case": "CASE", - "cmip_metadata": "e3sm_to_cmip/default_metadata.json", + "cmip_metadata": "inclusions/e3sm_to_cmip/default_metadata.json", "constraint": "", "debug": False, "dpf": 30, @@ -364,7 +366,7 @@ def test_subsections(self): "bundle": "", "campaign": "none", "case": "CASE", - "cmip_metadata": "e3sm_to_cmip/default_metadata.json", + "cmip_metadata": "inclusions/e3sm_to_cmip/default_metadata.json", "constraint": "", "debug": False, "dpf": 30, From 01b8c21526cd0552c9b7c8c4c9c413ce3605f24a Mon Sep 17 00:00:00 2001 From: Ryan Forsyth Date: Thu, 21 Nov 2024 19:08:00 -0600 Subject: [PATCH 09/13] Unit tests with pytest --- .vscode/settings.json | 1 - conda/dev.yml | 35 +- setup.cfg | 2 + tests/test_sections.py | 900 +++++++++++---------- tests/test_zppy_e3sm_diags.py | 1048 ++++++++++++------------- tests/test_zppy_global_time_series.py | 376 +++++---- tests/test_zppy_ilamb.py | 76 +- tests/test_zppy_utils.py | 896 ++++++++++----------- 8 files changed, 1651 insertions(+), 1683 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index ecfde195..3cf245fe 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -11,5 +11,4 @@ "python.linting.flake8Enabled": true, "python.linting.flake8Args": ["--config=setup.cfg"], "python.linting.mypyEnabled": true, - "python.pythonPath": "/opt/miniconda3/envs/zstash_dev/bin/python" } diff --git a/conda/dev.yml b/conda/dev.yml index f5c5df11..0b33a303 100644 --- a/conda/dev.yml +++ b/conda/dev.yml @@ -3,17 +3,32 @@ channels: - conda-forge - defaults dependencies: - # Base - # ================= + # Build + # ======================= - python=3.9.13 - pip=22.2.2 + # Base + # ================= - configobj=5.0.6 - jinja2=3.1.2 - mache>=1.5.0 - mpas_tools>=0.15.0 - pillow=9.2.0 - # Developer Tools + # Testing + # ======================= + - pytest + - pytest-cov + # Documentation + # If versions are updated, also update in `.github/workflows/build_workflow.yml` # ================= + - sphinx=5.2.3 + - sphinx_rtd_theme=1.0.0 + - sphinx-multiversion=0.2.4 + # Need to pin docutils because 0.17 has a bug with unordered lists + # https://github.com/readthedocs/sphinx_rtd_theme/issues/1115 + - docutils=0.16 + # Quality Assurance Tools + # ======================= # If versions are updated, also update 'rev' in `.pre-commit-config.yaml` - black=24.10.0 # version from https://anaconda.org/conda-forge/black - flake8=7.1.1 # version from https://anaconda.org/conda-forge/flake8 @@ -22,13 +37,9 @@ dependencies: - mypy=1.11.2 # version from https://anaconda.org/conda-forge/mypy - pre-commit=4.0.1 # version from https://anaconda.org/conda-forge/pre-commit - tbump=6.9.0 - # Documentation - # If versions are updated, also update in `.github/workflows/build_workflow.yml` - # ================= - - sphinx=5.2.3 - - sphinx-multiversion=0.2.4 - - sphinx_rtd_theme=1.0.0 - # Need to pin docutils because 0.17 has a bug with unordered lists - # https://github.com/readthedocs/sphinx_rtd_theme/issues/1115 - - docutils=0.16 + # Developer Tools + # ======================= + - tbump=6.9.0 + - ipykernel + prefix: /opt/miniconda3/envs/zppy_dev diff --git a/setup.cfg b/setup.cfg index 22201a95..02d15618 100644 --- a/setup.cfg +++ b/setup.cfg @@ -7,6 +7,8 @@ ignore = E501 # line break before operator W503 + # comparison to False should be 'if cond is False:' or 'if not cond:' + E712 # Max width of Github code review is 119 characters max-line-length = 119 max-complexity = 18 diff --git a/tests/test_sections.py b/tests/test_sections.py index eaecdbfa..ab862d80 100644 --- a/tests/test_sections.py +++ b/tests/test_sections.py @@ -1,38 +1,38 @@ import os import pprint -import unittest +import pytest from configobj import ConfigObj, Section from validate import Validator from zppy.utils import get_tasks -def compare(tester, actual, expected): +def compare(actual, expected): if actual != expected: actual_keys = set(actual.keys()) expected_keys = set(expected.keys()) if actual_keys != expected_keys: only_in_actual = actual_keys - expected_keys print("only_in_actual={}".format(only_in_actual)) - tester.assertEqual(only_in_actual, set()) + assert only_in_actual == set() only_in_expected = expected_keys - actual_keys print("only_in_expected={}".format(only_in_expected)) - tester.assertEqual(only_in_expected, set()) + assert only_in_expected == set() incorrect_values = [] for key in actual_keys: if isinstance(actual[key], Section): print("Calling `compare` again on {}".format(key)) - compare(tester, actual[key], expected[key]) + compare(actual[key], expected[key]) elif actual[key] != expected[key]: incorrect_values.append((key, actual[key], expected[key])) print("incorrect_values=") for v in incorrect_values: print(v) - tester.assertEqual(incorrect_values, []) + assert incorrect_values == [] -def get_config(test_case, config_file): +def get_config(config_file): # Subdirectory where templates are located defaults_dir = os.path.join("zppy", "defaults") @@ -42,7 +42,7 @@ def get_config(test_case, config_file): ) validator = Validator() - test_case.assertTrue(config.validate(validator)) + assert config.validate(validator) # Add templateDir to config config["default"]["templateDir"] = os.path.join("zppy", "templates") @@ -53,467 +53,463 @@ def get_config(test_case, config_file): with open("{}.txt".format(config_file), "w") as output: p = pprint.PrettyPrinter(indent=2, stream=output) p.pprint(config) - test_case.maxDiff = None + pytest.maxdiff = None return config -class TestAllSets(unittest.TestCase): - def test_sections(self): - config = get_config(self, "tests/test_sections.cfg") +def test_sections(): + config = get_config("tests/test_sections.cfg") - # default - actual_default = config["default"] - expected_default = { - "active": False, - "account": "", - "bundle": "", - "campaign": "none", - "case": "CASE", - "constraint": "", - "debug": False, - "dry_run": False, - "e3sm_to_cmip_environment_commands": "", - "environment_commands": "", - "fail_on_dependency_skip": False, - "frequency": "monthly", - "grid": "", - "guess_section_parameters": True, - "guess_path_parameters": True, - "input": "INPUT", - "input_files": "eam.h0", - "input_subdir": "INPUT_SUBDIR", - "mapping_file": "", - "output": "OUTPUT", - "nodes": 1, - "parallel": "", - "partition": "SHORT", - "plugins": [], - "reservation": "", - "qos": "regular", - "templateDir": "zppy/templates", - "ts_num_years": 5, - "vars": "FSNTOA,FLUT,FSNT,FLNT,FSNS,FLNS,SHFLX,QFLX,TAUX,TAUY,PRECC,PRECL,PRECSC,PRECSL,TS,TREFHT,CLDTOT,CLDHGH,CLDMED,CLDLOW,U", - "walltime": "02:00:00", - "www": "WWWW", - "years": [""], - } - compare(self, actual_default, expected_default) + # default + actual_default = config["default"] + expected_default = { + "active": False, + "account": "", + "bundle": "", + "campaign": "none", + "case": "CASE", + "constraint": "", + "debug": False, + "dry_run": False, + "e3sm_to_cmip_environment_commands": "", + "environment_commands": "", + "fail_on_dependency_skip": False, + "frequency": "monthly", + "grid": "", + "guess_section_parameters": True, + "guess_path_parameters": True, + "input": "INPUT", + "input_files": "eam.h0", + "input_subdir": "INPUT_SUBDIR", + "mapping_file": "", + "output": "OUTPUT", + "nodes": 1, + "parallel": "", + "partition": "SHORT", + "plugins": [], + "reservation": "", + "qos": "regular", + "templateDir": "zppy/templates", + "ts_num_years": 5, + "vars": "FSNTOA,FLUT,FSNT,FLNT,FSNS,FLNS,SHFLX,QFLX,TAUX,TAUY,PRECC,PRECL,PRECSC,PRECSL,TS,TREFHT,CLDTOT,CLDHGH,CLDMED,CLDLOW,U", + "walltime": "02:00:00", + "www": "WWWW", + "years": [""], + } + compare(actual_default, expected_default) - # ts - section_name = "ts" - actual_section = config[section_name] - expected_section = { - "active": "True", - "area_nm": "area", - "cmip_metadata": "inclusions/e3sm_to_cmip/default_metadata.json", - "dpf": 30, - "extra_vars": "", - "input_component": "", - "mapping_file": "MAPPING_FILE_TS", - "tpd": 1, - "ts_fmt": "ts_only", - "vars": "FSNTOA,FLUT,FSNT,FLNT,FSNS,FLNS,SHFLX,QFLX,PRECC,PRECL,PRECSC,PRECSL,TS,TREFHT", - "years": ["0001:0020:5"], - } - compare(self, actual_section, expected_section) - actual_tasks = get_tasks(config, section_name) - self.assertEqual(len(actual_tasks), 1) - actual_task = actual_tasks[0] - expected_task = { - "active": "True", - "account": "", - "bundle": "", - "area_nm": "area", - "campaign": "none", - "case": "CASE", - "cmip_metadata": "inclusions/e3sm_to_cmip/default_metadata.json", - "constraint": "", - "debug": False, - "dpf": 30, - "dry_run": False, - "e3sm_to_cmip_environment_commands": "", - "environment_commands": "", - "extra_vars": "", - "fail_on_dependency_skip": False, - "frequency": "monthly", - "grid": "", - "guess_section_parameters": True, - "guess_path_parameters": True, - "input": "INPUT", - "input_component": "", - "input_files": "eam.h0", - "input_subdir": "INPUT_SUBDIR", - "mapping_file": "MAPPING_FILE_TS", - "nodes": 1, - "output": "OUTPUT", - "parallel": "", - "partition": "SHORT", - "plugins": [], - "qos": "regular", - "reservation": "", - "subsection": None, - "templateDir": "zppy/templates", - "tpd": 1, - "ts_fmt": "ts_only", - "ts_num_years": 5, - "vars": "FSNTOA,FLUT,FSNT,FLNT,FSNS,FLNS,SHFLX,QFLX,PRECC,PRECL,PRECSC,PRECSL,TS,TREFHT", - "walltime": "02:00:00", - "www": "WWWW", - "years": ["0001:0020:5"], - } - compare(self, actual_task, expected_task) + # ts + section_name = "ts" + actual_section = config[section_name] + expected_section = { + "active": "True", + "area_nm": "area", + "cmip_metadata": "inclusions/e3sm_to_cmip/default_metadata.json", + "dpf": 30, + "extra_vars": "", + "input_component": "", + "mapping_file": "MAPPING_FILE_TS", + "tpd": 1, + "ts_fmt": "ts_only", + "vars": "FSNTOA,FLUT,FSNT,FLNT,FSNS,FLNS,SHFLX,QFLX,PRECC,PRECL,PRECSC,PRECSL,TS,TREFHT", + "years": ["0001:0020:5"], + } + compare(actual_section, expected_section) + actual_tasks = get_tasks(config, section_name) + assert len(actual_tasks) == 1 + actual_task = actual_tasks[0] + expected_task = { + "active": "True", + "account": "", + "bundle": "", + "area_nm": "area", + "campaign": "none", + "case": "CASE", + "cmip_metadata": "inclusions/e3sm_to_cmip/default_metadata.json", + "constraint": "", + "debug": False, + "dpf": 30, + "dry_run": False, + "e3sm_to_cmip_environment_commands": "", + "environment_commands": "", + "extra_vars": "", + "fail_on_dependency_skip": False, + "frequency": "monthly", + "grid": "", + "guess_section_parameters": True, + "guess_path_parameters": True, + "input": "INPUT", + "input_component": "", + "input_files": "eam.h0", + "input_subdir": "INPUT_SUBDIR", + "mapping_file": "MAPPING_FILE_TS", + "nodes": 1, + "output": "OUTPUT", + "parallel": "", + "partition": "SHORT", + "plugins": [], + "qos": "regular", + "reservation": "", + "subsection": None, + "templateDir": "zppy/templates", + "tpd": 1, + "ts_fmt": "ts_only", + "ts_num_years": 5, + "vars": "FSNTOA,FLUT,FSNT,FLNT,FSNS,FLNS,SHFLX,QFLX,PRECC,PRECL,PRECSC,PRECSL,TS,TREFHT", + "walltime": "02:00:00", + "www": "WWWW", + "years": ["0001:0020:5"], + } + compare(actual_task, expected_task) - # climo - section_name = "climo" - actual_section = config[section_name] - expected_section = { - "active": "True", - "exclude": False, - "input_component": "", - "mapping_file": "MAPPING_FILE_CLIMO", - "nodes": 4, - "parallel": "mpi", - "vars": "", - "years": ["0001:0050:50"], - } - compare(self, actual_section, expected_section) - actual_tasks = get_tasks(config, section_name) - compare(self, len(actual_tasks), 1) - actual_task = actual_tasks[0] - expected_task = { - "active": "True", - "account": "", - "bundle": "", - "campaign": "none", - "case": "CASE", - "constraint": "", - "debug": False, - "dry_run": False, - "e3sm_to_cmip_environment_commands": "", - "environment_commands": "", - "exclude": False, - "fail_on_dependency_skip": False, - "frequency": "monthly", - "grid": "", - "guess_section_parameters": True, - "guess_path_parameters": True, - "input": "INPUT", - "input_component": "", - "input_files": "eam.h0", - "input_subdir": "INPUT_SUBDIR", - "mapping_file": "MAPPING_FILE_CLIMO", - "nodes": 4, - "output": "OUTPUT", - "parallel": "mpi", - "partition": "SHORT", - "plugins": [], - "qos": "regular", - "reservation": "", - "subsection": None, - "templateDir": "zppy/templates", - "ts_num_years": 5, - "vars": "", - "walltime": "02:00:00", - "www": "WWWW", - "years": ["0001:0050:50"], - } - compare(self, actual_task, expected_task) + # climo + section_name = "climo" + actual_section = config[section_name] + expected_section = { + "active": "True", + "exclude": False, + "input_component": "", + "mapping_file": "MAPPING_FILE_CLIMO", + "nodes": 4, + "parallel": "mpi", + "vars": "", + "years": ["0001:0050:50"], + } + compare(actual_section, expected_section) + actual_tasks = get_tasks(config, section_name) + compare(len(actual_tasks), 1) + actual_task = actual_tasks[0] + expected_task = { + "active": "True", + "account": "", + "bundle": "", + "campaign": "none", + "case": "CASE", + "constraint": "", + "debug": False, + "dry_run": False, + "e3sm_to_cmip_environment_commands": "", + "environment_commands": "", + "exclude": False, + "fail_on_dependency_skip": False, + "frequency": "monthly", + "grid": "", + "guess_section_parameters": True, + "guess_path_parameters": True, + "input": "INPUT", + "input_component": "", + "input_files": "eam.h0", + "input_subdir": "INPUT_SUBDIR", + "mapping_file": "MAPPING_FILE_CLIMO", + "nodes": 4, + "output": "OUTPUT", + "parallel": "mpi", + "partition": "SHORT", + "plugins": [], + "qos": "regular", + "reservation": "", + "subsection": None, + "templateDir": "zppy/templates", + "ts_num_years": 5, + "vars": "", + "walltime": "02:00:00", + "www": "WWWW", + "years": ["0001:0050:50"], + } + compare(actual_task, expected_task) - # tc_analysis: test an inactive task - section_name = "tc_analysis" - actual_section = config[section_name] - self.assertTrue(actual_section["active"] == "False") - actual_tasks = get_tasks(config, section_name) - self.assertEqual(len(actual_tasks), 0) + # tc_analysis: test an inactive task + section_name = "tc_analysis" + actual_section = config[section_name] + assert actual_section["active"] == "False" + actual_tasks = get_tasks(config, section_name) + assert len(actual_tasks) == 0 - # e3sm_diags: test an excluded task - section_name = "e3sm_diags" - actual_section = config[section_name] - self.assertTrue("active" not in actual_section.keys()) - actual_tasks = get_tasks(config, section_name) - self.assertEqual(len(actual_tasks), 0) + # e3sm_diags: test an excluded task + section_name = "e3sm_diags" + actual_section = config[section_name] + assert "active" not in actual_section.keys() + actual_tasks = get_tasks(config, section_name) + assert len(actual_tasks) == 0 - def test_subsections(self): - config = get_config(self, "tests/test_subsections.cfg") - # default - actual_default = config["default"] - expected_default = { - "active": False, - "account": "", - "bundle": "", - "campaign": "none", - "case": "CASE", - "constraint": "", - "debug": False, - "dry_run": False, - "e3sm_to_cmip_environment_commands": "", - "environment_commands": "", - "fail_on_dependency_skip": False, - "frequency": "monthly", - "grid": "", - "guess_section_parameters": True, - "guess_path_parameters": True, - "input": "INPUT", - "input_files": "eam.h0", - "input_subdir": "INPUT_SUBDIR", - "mapping_file": "", - "nodes": 1, - "output": "OUTPUT", - "parallel": "", - "partition": "SHORT", - "plugins": [], - "qos": "regular", - "reservation": "", - "templateDir": "zppy/templates", - "ts_num_years": 5, - "vars": "FSNTOA,FLUT,FSNT,FLNT,FSNS,FLNS,SHFLX,QFLX,TAUX,TAUY,PRECC,PRECL,PRECSC,PRECSL,TS,TREFHT,CLDTOT,CLDHGH,CLDMED,CLDLOW,U", - "walltime": "02:00:00", - "www": "WWWW", - "years": [""], - } - compare(self, actual_default, expected_default) +def test_subsections(): + config = get_config("tests/test_subsections.cfg") - # ts - section_name = "ts" - actual_section = config[section_name] - expected_section = { - "active": "True", - "area_nm": "area", - "cmip_metadata": "inclusions/e3sm_to_cmip/default_metadata.json", - "dpf": 30, - "extra_vars": "", - "input_component": "", - "tpd": 1, - "ts_fmt": "ts_only", - "ts_grid1": { - "area_nm": None, - "cmip_metadata": None, - "dpf": None, - "extra_vars": None, - "input_component": None, - "mapping_file": "MAPPING_FILE_TS_GRID1", - "tpd": None, - "ts_fmt": None, - "years": ["0001:0020:5"], - }, - "ts_grid2": { - "area_nm": None, - "cmip_metadata": None, - "dpf": None, - "extra_vars": None, - "input_component": None, - "mapping_file": "MAPPING_FILE_TS_GRID2", - "tpd": None, - "ts_fmt": None, - "years": ["0001:0020:10"], - }, - "vars": "FSNTOA,FLUT,FSNT,FLNT,FSNS,FLNS,SHFLX,QFLX,PRECC,PRECL,PRECSC,PRECSL,TS,TREFHT", - } - compare(self, actual_section, expected_section) - actual_tasks = get_tasks(config, section_name) - self.assertEqual(len(actual_tasks), 2) - actual_task = actual_tasks[0] - expected_task = { - "active": "True", - "account": "", - "area_nm": "area", - "bundle": "", - "campaign": "none", - "case": "CASE", - "cmip_metadata": "inclusions/e3sm_to_cmip/default_metadata.json", - "constraint": "", - "debug": False, - "dpf": 30, - "dry_run": False, - "e3sm_to_cmip_environment_commands": "", - "environment_commands": "", - "extra_vars": "", - "fail_on_dependency_skip": False, - "frequency": "monthly", - "grid": "", - "guess_section_parameters": True, - "guess_path_parameters": True, - "input": "INPUT", - "input_component": "", - "input_files": "eam.h0", - "input_subdir": "INPUT_SUBDIR", + # default + actual_default = config["default"] + expected_default = { + "active": False, + "account": "", + "bundle": "", + "campaign": "none", + "case": "CASE", + "constraint": "", + "debug": False, + "dry_run": False, + "e3sm_to_cmip_environment_commands": "", + "environment_commands": "", + "fail_on_dependency_skip": False, + "frequency": "monthly", + "grid": "", + "guess_section_parameters": True, + "guess_path_parameters": True, + "input": "INPUT", + "input_files": "eam.h0", + "input_subdir": "INPUT_SUBDIR", + "mapping_file": "", + "nodes": 1, + "output": "OUTPUT", + "parallel": "", + "partition": "SHORT", + "plugins": [], + "qos": "regular", + "reservation": "", + "templateDir": "zppy/templates", + "ts_num_years": 5, + "vars": "FSNTOA,FLUT,FSNT,FLNT,FSNS,FLNS,SHFLX,QFLX,TAUX,TAUY,PRECC,PRECL,PRECSC,PRECSL,TS,TREFHT,CLDTOT,CLDHGH,CLDMED,CLDLOW,U", + "walltime": "02:00:00", + "www": "WWWW", + "years": [""], + } + compare(actual_default, expected_default) + + # ts + section_name = "ts" + actual_section = config[section_name] + expected_section = { + "active": "True", + "area_nm": "area", + "cmip_metadata": "inclusions/e3sm_to_cmip/default_metadata.json", + "dpf": 30, + "extra_vars": "", + "input_component": "", + "tpd": 1, + "ts_fmt": "ts_only", + "ts_grid1": { + "area_nm": None, + "cmip_metadata": None, + "dpf": None, + "extra_vars": None, + "input_component": None, "mapping_file": "MAPPING_FILE_TS_GRID1", - "nodes": 1, - "output": "OUTPUT", - "parallel": "", - "partition": "SHORT", - "plugins": [], - "qos": "regular", - "reservation": "", - "subsection": "ts_grid1", - "templateDir": "zppy/templates", - "tpd": 1, - "ts_fmt": "ts_only", - "ts_num_years": 5, - "vars": "FSNTOA,FLUT,FSNT,FLNT,FSNS,FLNS,SHFLX,QFLX,PRECC,PRECL,PRECSC,PRECSL,TS,TREFHT", - "walltime": "02:00:00", - "www": "WWWW", + "tpd": None, + "ts_fmt": None, "years": ["0001:0020:5"], - } - compare(self, actual_task, expected_task) - actual_task = actual_tasks[1] - expected_task = { - "active": "True", - "account": "", - "area_nm": "area", - "bundle": "", - "campaign": "none", - "case": "CASE", - "cmip_metadata": "inclusions/e3sm_to_cmip/default_metadata.json", - "constraint": "", - "debug": False, - "dpf": 30, - "dry_run": False, - "e3sm_to_cmip_environment_commands": "", - "environment_commands": "", - "extra_vars": "", - "fail_on_dependency_skip": False, - "frequency": "monthly", - "grid": "", - "guess_section_parameters": True, - "guess_path_parameters": True, - "input": "INPUT", - "input_component": "", - "input_files": "eam.h0", - "input_subdir": "INPUT_SUBDIR", + }, + "ts_grid2": { + "area_nm": None, + "cmip_metadata": None, + "dpf": None, + "extra_vars": None, + "input_component": None, "mapping_file": "MAPPING_FILE_TS_GRID2", - "nodes": 1, - "output": "OUTPUT", - "parallel": "", - "partition": "SHORT", - "plugins": [], - "qos": "regular", - "reservation": "", - "subsection": "ts_grid2", - "templateDir": "zppy/templates", - "tpd": 1, - "ts_fmt": "ts_only", - "ts_num_years": 5, - "vars": "FSNTOA,FLUT,FSNT,FLNT,FSNS,FLNS,SHFLX,QFLX,PRECC,PRECL,PRECSC,PRECSL,TS,TREFHT", - "walltime": "02:00:00", - "www": "WWWW", + "tpd": None, + "ts_fmt": None, "years": ["0001:0020:10"], - } - compare(self, actual_task, expected_task) + }, + "vars": "FSNTOA,FLUT,FSNT,FLNT,FSNS,FLNS,SHFLX,QFLX,PRECC,PRECL,PRECSC,PRECSL,TS,TREFHT", + } + compare(actual_section, expected_section) + actual_tasks = get_tasks(config, section_name) + assert len(actual_tasks) == 2 + actual_task = actual_tasks[0] + expected_task = { + "active": "True", + "account": "", + "area_nm": "area", + "bundle": "", + "campaign": "none", + "case": "CASE", + "cmip_metadata": "inclusions/e3sm_to_cmip/default_metadata.json", + "constraint": "", + "debug": False, + "dpf": 30, + "dry_run": False, + "e3sm_to_cmip_environment_commands": "", + "environment_commands": "", + "extra_vars": "", + "fail_on_dependency_skip": False, + "frequency": "monthly", + "grid": "", + "guess_section_parameters": True, + "guess_path_parameters": True, + "input": "INPUT", + "input_component": "", + "input_files": "eam.h0", + "input_subdir": "INPUT_SUBDIR", + "mapping_file": "MAPPING_FILE_TS_GRID1", + "nodes": 1, + "output": "OUTPUT", + "parallel": "", + "partition": "SHORT", + "plugins": [], + "qos": "regular", + "reservation": "", + "subsection": "ts_grid1", + "templateDir": "zppy/templates", + "tpd": 1, + "ts_fmt": "ts_only", + "ts_num_years": 5, + "vars": "FSNTOA,FLUT,FSNT,FLNT,FSNS,FLNS,SHFLX,QFLX,PRECC,PRECL,PRECSC,PRECSL,TS,TREFHT", + "walltime": "02:00:00", + "www": "WWWW", + "years": ["0001:0020:5"], + } + compare(actual_task, expected_task) + actual_task = actual_tasks[1] + expected_task = { + "active": "True", + "account": "", + "area_nm": "area", + "bundle": "", + "campaign": "none", + "case": "CASE", + "cmip_metadata": "inclusions/e3sm_to_cmip/default_metadata.json", + "constraint": "", + "debug": False, + "dpf": 30, + "dry_run": False, + "e3sm_to_cmip_environment_commands": "", + "environment_commands": "", + "extra_vars": "", + "fail_on_dependency_skip": False, + "frequency": "monthly", + "grid": "", + "guess_section_parameters": True, + "guess_path_parameters": True, + "input": "INPUT", + "input_component": "", + "input_files": "eam.h0", + "input_subdir": "INPUT_SUBDIR", + "mapping_file": "MAPPING_FILE_TS_GRID2", + "nodes": 1, + "output": "OUTPUT", + "parallel": "", + "partition": "SHORT", + "plugins": [], + "qos": "regular", + "reservation": "", + "subsection": "ts_grid2", + "templateDir": "zppy/templates", + "tpd": 1, + "ts_fmt": "ts_only", + "ts_num_years": 5, + "vars": "FSNTOA,FLUT,FSNT,FLNT,FSNS,FLNS,SHFLX,QFLX,PRECC,PRECL,PRECSC,PRECSL,TS,TREFHT", + "walltime": "02:00:00", + "www": "WWWW", + "years": ["0001:0020:10"], + } + compare(actual_task, expected_task) - # climo - section_name = "climo" - actual_section = config[section_name] - expected_section = { - "active": "True", - "climo_grid1": { - "input_component": None, - "mapping_file": "MAPPING_FILE_CLIMO_GRID1", - "nodes": None, - "exclude": None, - "vars": None, - }, - "climo_grid2": { - "input_component": None, - "mapping_file": "MAPPING_FILE_CLIMO_GRID2", - "years": ["0001:0100:50"], - "partition": "LONG", - "nodes": None, - "exclude": None, - "vars": None, - }, - "exclude": False, - "input_component": "", - "mapping_file": "MAPPING_FILE_CLIMO", - "nodes": 4, - "parallel": "mpi", - "vars": "", - "years": ["0001:0050:50"], - } - compare(self, actual_section, expected_section) - actual_tasks = get_tasks(config, section_name) - self.assertEqual(len(actual_tasks), 2) - actual_task = actual_tasks[0] - expected_task = { - "active": "True", - "account": "", - "bundle": "", - "campaign": "none", - "case": "CASE", - "constraint": "", - "debug": False, - "dry_run": False, - "e3sm_to_cmip_environment_commands": "", - "environment_commands": "", - "exclude": False, - "fail_on_dependency_skip": False, - "frequency": "monthly", - "grid": "", - "guess_section_parameters": True, - "guess_path_parameters": True, - "input": "INPUT", - "input_component": "", - "input_files": "eam.h0", - "input_subdir": "INPUT_SUBDIR", + # climo + section_name = "climo" + actual_section = config[section_name] + expected_section = { + "active": "True", + "climo_grid1": { + "input_component": None, "mapping_file": "MAPPING_FILE_CLIMO_GRID1", - "nodes": 4, - "output": "OUTPUT", - "parallel": "mpi", - "partition": "SHORT", - "plugins": [], - "qos": "regular", - "reservation": "", - "subsection": "climo_grid1", - "templateDir": "zppy/templates", - "ts_num_years": 5, - "vars": "", - "walltime": "02:00:00", - "www": "WWWW", - "years": ["0001:0050:50"], - } - compare(self, actual_task, expected_task) - actual_task = actual_tasks[1] - expected_task = { - "active": "True", - "account": "", - "bundle": "", - "campaign": "none", - "case": "CASE", - "constraint": "", - "debug": False, - "dry_run": False, - "e3sm_to_cmip_environment_commands": "", - "environment_commands": "", - "exclude": False, - "fail_on_dependency_skip": False, - "frequency": "monthly", - "grid": "", - "guess_section_parameters": True, - "guess_path_parameters": True, - "input": "INPUT", - "input_component": "", - "input_files": "eam.h0", - "input_subdir": "INPUT_SUBDIR", + "nodes": None, + "exclude": None, + "vars": None, + }, + "climo_grid2": { + "input_component": None, "mapping_file": "MAPPING_FILE_CLIMO_GRID2", - "nodes": 4, - "output": "OUTPUT", - "parallel": "mpi", - "partition": "LONG", - "plugins": [], - "reservation": "", - "qos": "regular", - "subsection": "climo_grid2", - "templateDir": "zppy/templates", - "ts_num_years": 5, - "vars": "", - "walltime": "02:00:00", - "www": "WWWW", "years": ["0001:0100:50"], - } - compare(self, actual_task, expected_task) - - -if __name__ == "__main__": - unittest.main() + "partition": "LONG", + "nodes": None, + "exclude": None, + "vars": None, + }, + "exclude": False, + "input_component": "", + "mapping_file": "MAPPING_FILE_CLIMO", + "nodes": 4, + "parallel": "mpi", + "vars": "", + "years": ["0001:0050:50"], + } + compare(actual_section, expected_section) + actual_tasks = get_tasks(config, section_name) + assert len(actual_tasks) == 2 + actual_task = actual_tasks[0] + expected_task = { + "active": "True", + "account": "", + "bundle": "", + "campaign": "none", + "case": "CASE", + "constraint": "", + "debug": False, + "dry_run": False, + "e3sm_to_cmip_environment_commands": "", + "environment_commands": "", + "exclude": False, + "fail_on_dependency_skip": False, + "frequency": "monthly", + "grid": "", + "guess_section_parameters": True, + "guess_path_parameters": True, + "input": "INPUT", + "input_component": "", + "input_files": "eam.h0", + "input_subdir": "INPUT_SUBDIR", + "mapping_file": "MAPPING_FILE_CLIMO_GRID1", + "nodes": 4, + "output": "OUTPUT", + "parallel": "mpi", + "partition": "SHORT", + "plugins": [], + "qos": "regular", + "reservation": "", + "subsection": "climo_grid1", + "templateDir": "zppy/templates", + "ts_num_years": 5, + "vars": "", + "walltime": "02:00:00", + "www": "WWWW", + "years": ["0001:0050:50"], + } + compare(actual_task, expected_task) + actual_task = actual_tasks[1] + expected_task = { + "active": "True", + "account": "", + "bundle": "", + "campaign": "none", + "case": "CASE", + "constraint": "", + "debug": False, + "dry_run": False, + "e3sm_to_cmip_environment_commands": "", + "environment_commands": "", + "exclude": False, + "fail_on_dependency_skip": False, + "frequency": "monthly", + "grid": "", + "guess_section_parameters": True, + "guess_path_parameters": True, + "input": "INPUT", + "input_component": "", + "input_files": "eam.h0", + "input_subdir": "INPUT_SUBDIR", + "mapping_file": "MAPPING_FILE_CLIMO_GRID2", + "nodes": 4, + "output": "OUTPUT", + "parallel": "mpi", + "partition": "LONG", + "plugins": [], + "reservation": "", + "qos": "regular", + "subsection": "climo_grid2", + "templateDir": "zppy/templates", + "ts_num_years": 5, + "vars": "", + "walltime": "02:00:00", + "www": "WWWW", + "years": ["0001:0100:50"], + } + compare(actual_task, expected_task) diff --git a/tests/test_zppy_e3sm_diags.py b/tests/test_zppy_e3sm_diags.py index cb81b6ff..7114d7cb 100644 --- a/tests/test_zppy_e3sm_diags.py +++ b/tests/test_zppy_e3sm_diags.py @@ -1,6 +1,7 @@ -import unittest from typing import Any, Dict, List +import pytest + from zppy.e3sm_diags import ( add_climo_dependencies, add_ts_dependencies, @@ -11,589 +12,550 @@ from zppy.utils import ParameterNotProvidedError -class TestZppyE3SMDiags(unittest.TestCase): - def test_check_parameters_for_bash(self): - # diurnal_cycle - c = {"sets": ["diurnal_cycle"], "climo_diurnal_frequency": "diurnal_8xdaily"} +def test_check_parameters_for_bash(): + # diurnal_cycle + c = {"sets": ["diurnal_cycle"], "climo_diurnal_frequency": "diurnal_8xdaily"} + check_parameters_for_bash(c) + c = {"sets": ["diurnal_cycle"], "climo_diurnal_frequency": ""} + with pytest.raises(ParameterNotProvidedError): check_parameters_for_bash(c) - c = {"sets": ["diurnal_cycle"], "climo_diurnal_frequency": ""} - self.assertRaises(ParameterNotProvidedError, check_parameters_for_bash, c) - # enso_diags - c = {"sets": ["enso_diags"], "ref_start_yr": "1990"} + # enso_diags + c = {"sets": ["enso_diags"], "ref_start_yr": "1990"} + check_parameters_for_bash(c) + c = {"sets": ["enso_diags"], "ref_start_yr": ""} + with pytest.raises(ParameterNotProvidedError): check_parameters_for_bash(c) - c = {"sets": ["enso_diags"], "ref_start_yr": ""} - self.assertRaises(ParameterNotProvidedError, check_parameters_for_bash, c) - # qbo - c = {"sets": ["qbo"], "ref_final_yr": "2000", "ref_start_yr": "1990"} + # qbo + c = {"sets": ["qbo"], "ref_final_yr": "2000", "ref_start_yr": "1990"} + check_parameters_for_bash(c) + c = {"sets": ["qbo"], "ref_final_yr": "", "ref_start_yr": "1990"} + with pytest.raises(ParameterNotProvidedError): + check_parameters_for_bash(c) + c = {"sets": ["qbo"], "ref_final_yr": "2000", "ref_start_yr": ""} + with pytest.raises(ParameterNotProvidedError): check_parameters_for_bash(c) - c = {"sets": ["qbo"], "ref_final_yr": "", "ref_start_yr": "1990"} - self.assertRaises(ParameterNotProvidedError, check_parameters_for_bash, c) - c = {"sets": ["qbo"], "ref_final_yr": "2000", "ref_start_yr": ""} - self.assertRaises(ParameterNotProvidedError, check_parameters_for_bash, c) - # tropical_subseasonal - c = {"sets": ["tropical_subseasonal"], "ref_end_yr": "2000"} + # tropical_subseasonal + c = {"sets": ["tropical_subseasonal"], "ref_end_yr": "2000"} + check_parameters_for_bash(c) + c = {"sets": ["tropical_subseasonal"], "ref_end_yr": ""} + with pytest.raises(ParameterNotProvidedError): check_parameters_for_bash(c) - c = {"sets": ["tropical_subseasonal"], "ref_end_yr": ""} - self.assertRaises(ParameterNotProvidedError, check_parameters_for_bash, c) - - def test_check_mvm_only_parameters_for_bash(self): - z0 = {"diff_title": "a", "ref_name": "b", "short_ref_name": "c"} - z1 = {"diff_title": "", "ref_name": "b", "short_ref_name": "c"} - z2 = {"diff_title": "a", "ref_name": "", "short_ref_name": "c"} - z3 = {"diff_title": "a", "ref_name": "b", "short_ref_name": ""} - c: Dict[str, Any] = {"sets": []} - c.update(z0) - check_mvm_only_parameters_for_bash(c) - c.update(z1) - self.assertRaises( - ParameterNotProvidedError, check_mvm_only_parameters_for_bash, c - ) - c.update(z2) - self.assertRaises( - ParameterNotProvidedError, check_mvm_only_parameters_for_bash, c - ) - c.update(z3) - self.assertRaises( - ParameterNotProvidedError, check_mvm_only_parameters_for_bash, c - ) - - d0 = { - "ref_final_yr": "2000", - "ref_start_yr": "1990", - "ts_num_years_ref": "2", - "ts_subsection": "sub", - } - d1 = { - "ref_final_yr": "", - "ref_start_yr": "1990", - "ts_num_years_ref": "2", - "ts_subsection": "sub", - } - d2 = { - "ref_final_yr": "2000", - "ref_start_yr": "", - "ts_num_years_ref": "2", - "ts_subsection": "sub", - } - d3 = { - "ref_final_yr": "2000", - "ref_start_yr": "1990", - "ts_num_years_ref": "", - "ts_subsection": "sub", - } - d4 = { - "ref_final_yr": "2000", - "ref_start_yr": "1990", - "ts_num_years_ref": "2", - "ts_subsection": "", - } - # Load required parameters into all of the dicts above. - d0.update(z0) - d1.update(z0) - d2.update(z0) - d3.update(z0) - d4.update(z0) - # area_mean_time_series - c = {"sets": ["area_mean_time_series"]} - c.update(d0) - check_mvm_only_parameters_for_bash(c) - c.update(d1) - check_mvm_only_parameters_for_bash(c) # ref_final_yr not needed - c.update(d2) - check_mvm_only_parameters_for_bash(c) # ref_start_yr not needed - c.update(d3) - self.assertRaises( - ParameterNotProvidedError, check_mvm_only_parameters_for_bash, c - ) - c.update(d4) - self.assertRaises( - ParameterNotProvidedError, check_mvm_only_parameters_for_bash, c - ) - - # enso_diags - c = {"sets": ["enso_diags"]} - c.update(d0) +def test_check_mvm_only_parameters_for_bash(): + z0 = {"diff_title": "a", "ref_name": "b", "short_ref_name": "c"} + z1 = {"diff_title": "", "ref_name": "b", "short_ref_name": "c"} + z2 = {"diff_title": "a", "ref_name": "", "short_ref_name": "c"} + z3 = {"diff_title": "a", "ref_name": "b", "short_ref_name": ""} + c: Dict[str, Any] = {"sets": []} + c.update(z0) + check_mvm_only_parameters_for_bash(c) + c.update(z1) + with pytest.raises(ParameterNotProvidedError): check_mvm_only_parameters_for_bash(c) - c.update(d1) - self.assertRaises( - ParameterNotProvidedError, check_mvm_only_parameters_for_bash, c - ) - c.update(d2) - check_mvm_only_parameters_for_bash(c) # ref_start_yr not needed - c.update(d3) - self.assertRaises( - ParameterNotProvidedError, check_mvm_only_parameters_for_bash, c - ) - c.update(d4) - self.assertRaises( - ParameterNotProvidedError, check_mvm_only_parameters_for_bash, c - ) - - # qbo - c = {"sets": ["qbo"]} - c.update(d0) + c.update(z2) + with pytest.raises(ParameterNotProvidedError): check_mvm_only_parameters_for_bash(c) - c.update(d1) - check_mvm_only_parameters_for_bash(c) # ref_final_yr not needed - c.update(d2) - check_mvm_only_parameters_for_bash(c) # ref_start_yr not needed - c.update(d3) - self.assertRaises( - ParameterNotProvidedError, check_mvm_only_parameters_for_bash, c - ) - c.update(d4) - self.assertRaises( - ParameterNotProvidedError, check_mvm_only_parameters_for_bash, c - ) - - # streamflow - c = {"sets": ["streamflow"]} - c.update(d0) + c.update(z3) + with pytest.raises(ParameterNotProvidedError): check_mvm_only_parameters_for_bash(c) - c.update(d1) - self.assertRaises( - ParameterNotProvidedError, check_mvm_only_parameters_for_bash, c - ) - c.update(d2) - self.assertRaises( - ParameterNotProvidedError, check_mvm_only_parameters_for_bash, c - ) - c.update(d3) - self.assertRaises( - ParameterNotProvidedError, check_mvm_only_parameters_for_bash, c - ) - c.update(d4) - self.assertRaises( - ParameterNotProvidedError, check_mvm_only_parameters_for_bash, c - ) - - # tc_analysis - c = {"sets": ["tc_analysis"]} - c.update(d0) + + d0 = { + "ref_final_yr": "2000", + "ref_start_yr": "1990", + "ts_num_years_ref": "2", + "ts_subsection": "sub", + } + d1 = { + "ref_final_yr": "", + "ref_start_yr": "1990", + "ts_num_years_ref": "2", + "ts_subsection": "sub", + } + d2 = { + "ref_final_yr": "2000", + "ref_start_yr": "", + "ts_num_years_ref": "2", + "ts_subsection": "sub", + } + d3 = { + "ref_final_yr": "2000", + "ref_start_yr": "1990", + "ts_num_years_ref": "", + "ts_subsection": "sub", + } + d4 = { + "ref_final_yr": "2000", + "ref_start_yr": "1990", + "ts_num_years_ref": "2", + "ts_subsection": "", + } + + # Load required parameters into all of the dicts above. + d0.update(z0) + d1.update(z0) + d2.update(z0) + d3.update(z0) + d4.update(z0) + + # area_mean_time_series + c = {"sets": ["area_mean_time_series"]} + c.update(d0) + check_mvm_only_parameters_for_bash(c) + c.update(d1) + check_mvm_only_parameters_for_bash(c) # ref_final_yr not needed + c.update(d2) + check_mvm_only_parameters_for_bash(c) # ref_start_yr not needed + c.update(d3) + with pytest.raises(ParameterNotProvidedError): check_mvm_only_parameters_for_bash(c) - c.update(d1) - self.assertRaises( - ParameterNotProvidedError, check_mvm_only_parameters_for_bash, c - ) - c.update(d2) - self.assertRaises( - ParameterNotProvidedError, check_mvm_only_parameters_for_bash, c - ) - c.update(d3) - check_mvm_only_parameters_for_bash(c) # ts_num_years_ref not needed - c.update(d4) - check_mvm_only_parameters_for_bash(c) # ts_subsection not needed - - # tropical_subseasonal - c = {"sets": ["tropical_subseasonal"]} - c.update(d0) + c.update(d4) + with pytest.raises(ParameterNotProvidedError): check_mvm_only_parameters_for_bash(c) - c.update(d1) - self.assertRaises( - ParameterNotProvidedError, check_mvm_only_parameters_for_bash, c - ) - c.update(d2) - self.assertRaises( - ParameterNotProvidedError, check_mvm_only_parameters_for_bash, c - ) - c.update(d3) - self.assertRaises( - ParameterNotProvidedError, check_mvm_only_parameters_for_bash, c - ) - c.update(d4) - self.assertRaises( - ParameterNotProvidedError, check_mvm_only_parameters_for_bash, c - ) - - def test_check_and_define_parameters(self): - # test_zppy_utils.py tests the guessing functionality turned off. - # So, we'll only test it turned on here. - guesses = {"guess_path_parameters": True, "guess_section_parameters": True} - prefix_requirements = { - "subsection": "sub", - "tag": "tag", - "year1": 1990, - "year2": 2000, - "ref_year1": 1980, - "ref_year2": 1990, - } - base: Dict[str, Any] = {"diagnostics_base_path": "diags/post"} - base.update(guesses) - base.update(prefix_requirements) - - mvm_base = dict() - mvm_base.update(base) - required_for_mvm = { - "diff_title": "diff_title", - "ref_name": "ref_name", - "short_ref_name": "short_ref_name", - } - mvm_base.update(required_for_mvm) - - # No sets, mvo - c: Dict[str, Any] = { - "sets": [], - "run_type": "model_vs_obs", - "reference_data_path": "a", - } - c.update(base) - check_and_define_parameters(c) - self.assertEqual(c["reference_data_path"], "a") - self.assertEqual(c["prefix"], "e3sm_diags_sub_tag_1990-2000") - - # No sets, mvm - c = {"sets": [], "run_type": "model_vs_model", "reference_data_path": ""} - c.update(mvm_base) - check_and_define_parameters(c) - self.assertEqual( - c["reference_data_path"], "diags/post/observations/Atm/climatology/" - ) - self.assertEqual(c["prefix"], "e3sm_diags_sub_tag_1990-2000_vs_1980-1990") - - # No sets, bad run_type - c = {"sets": [], "run_type": "invalid", "reference_data_path": ""} - c.update(base) - self.assertRaises(ValueError, check_and_define_parameters, c) - - # ts_num_years => obs_ts, mvo - c = { - "sets": [], - "run_type": "model_vs_obs", - "reference_data_path": "", - "ts_num_years": 3, - "obs_ts": "a", - } - c.update(base) - check_and_define_parameters(c) - self.assertEqual(c["obs_ts"], "a") - - c = { - "sets": [], - "run_type": "model_vs_obs", - "reference_data_path": "", - "ts_num_years": 3, - "obs_ts": "", - } - c.update(base) - check_and_define_parameters(c) - self.assertEqual(c["obs_ts"], "diags/post/observations/Atm/time-series/") - - # ts_num_years => obs_ts, mvm - c = { - "sets": [], - "run_type": "model_vs_model", - "reference_data_path": "", - "ts_num_years": 3, - "obs_ts": "a", - } - c.update(mvm_base) - check_and_define_parameters(c) - self.assertEqual(c["obs_ts"], "a") - - c = { - "sets": [], - "run_type": "model_vs_model", - "reference_data_path": "", - "ts_num_years": 3, - "obs_ts": "", - } - c.update(mvm_base) - check_and_define_parameters(c) - self.assertEqual(c["obs_ts"], "diags/post/observations/Atm/time-series/") - - # area_mean_time_series/enso_diags/qbo, mvm - for diags_set in ["area_mean_time_series", "enso_diags", "qbo"]: - c = { - "sets": [diags_set], - "run_type": "model_vs_model", - "reference_data_path": "", - "reference_data_path_ts": "a", - "grid": "grid", - } - c.update(mvm_base) - check_and_define_parameters(c) - self.assertEqual(c["reference_data_path_ts"], "a") - - c = { - "sets": [diags_set], - "run_type": "model_vs_model", - "reference_data_path": "", - "reference_data_path_ts": "", - "grid": "grid", - } - c.update(mvm_base) - check_and_define_parameters(c) - self.assertEqual( - c["reference_data_path_ts"], "diags/post/atm/grid/ts/monthly" - ) - - # diurnal_cycle, mvo - c = { - "sets": ["diurnal_cycle"], - "run_type": "model_vs_obs", - "reference_data_path": "", - "dc_obs_climo": "a", - } - c.update(base) - check_and_define_parameters(c) - self.assertEqual(c["dc_obs_climo"], "a") - - c = { - "sets": ["diurnal_cycle"], - "run_type": "model_vs_obs", - "reference_data_path": "", - "dc_obs_climo": "", - } - c.update(base) - check_and_define_parameters(c) - self.assertEqual(c["dc_obs_climo"], "diags/post/observations/Atm/climatology/") - - # diurnal_cycle, mvm - c = { - "sets": ["diurnal_cycle"], - "run_type": "model_vs_model", - "reference_data_path": "", - "reference_data_path_climo_diurnal": "a", - "grid": "grid", - } - c.update(mvm_base) - check_and_define_parameters(c) - self.assertEqual(c["reference_data_path_climo_diurnal"], "a") - - c = { - "sets": ["diurnal_cycle"], - "run_type": "model_vs_model", - "reference_data_path": "", - "reference_data_path_climo_diurnal": "", - "grid": "grid", - } - c.update(mvm_base) - check_and_define_parameters(c) - self.assertEqual( - c["reference_data_path_climo_diurnal"], - "diags/post/atm/grid/clim_diurnal_8xdaily", - ) - # streamflow, mvo - c = { - "sets": ["streamflow"], - "run_type": "model_vs_obs", - "reference_data_path": "", - "streamflow_obs_ts": "a", - "ts_num_years": 3, - "obs_ts": "", - } - c.update(base) - check_and_define_parameters(c) - self.assertEqual(c["streamflow_obs_ts"], "a") - - c = { - "sets": ["streamflow"], - "run_type": "model_vs_obs", - "reference_data_path": "", - "streamflow_obs_ts": "", - "ts_num_years": 3, - "obs_ts": "", - } - c.update(base) - check_and_define_parameters(c) - self.assertEqual( - c["streamflow_obs_ts"], "diags/post/observations/Atm/time-series/" - ) + # enso_diags + c = {"sets": ["enso_diags"]} + c.update(d0) + check_mvm_only_parameters_for_bash(c) + c.update(d1) + with pytest.raises(ParameterNotProvidedError): + check_mvm_only_parameters_for_bash(c) + c.update(d2) + check_mvm_only_parameters_for_bash(c) # ref_start_yr not needed + c.update(d3) + with pytest.raises(ParameterNotProvidedError): + check_mvm_only_parameters_for_bash(c) + c.update(d4) + with pytest.raises(ParameterNotProvidedError): + check_mvm_only_parameters_for_bash(c) - # streamflow, mvm - c = { - "sets": ["streamflow"], - "run_type": "model_vs_model", - "reference_data_path": "", - "reference_data_path_ts_rof": "a", - "gauges_path": "b", - } - c.update(mvm_base) - check_and_define_parameters(c) - self.assertEqual(c["reference_data_path_ts_rof"], "a") - self.assertEqual(c["gauges_path"], "b") + # qbo + c = {"sets": ["qbo"]} + c.update(d0) + check_mvm_only_parameters_for_bash(c) + c.update(d1) + check_mvm_only_parameters_for_bash(c) # ref_final_yr not needed + c.update(d2) + check_mvm_only_parameters_for_bash(c) # ref_start_yr not needed + c.update(d3) + with pytest.raises(ParameterNotProvidedError): + check_mvm_only_parameters_for_bash(c) + c.update(d4) + with pytest.raises(ParameterNotProvidedError): + check_mvm_only_parameters_for_bash(c) - c = { - "sets": ["streamflow"], - "run_type": "model_vs_model", - "reference_data_path": "", - "reference_data_path_ts_rof": "", - "gauges_path": "", - } - c.update(mvm_base) - check_and_define_parameters(c) - self.assertEqual( - c["reference_data_path_ts_rof"], "diags/post/rof/native/ts/monthly" - ) - self.assertEqual( - c["gauges_path"], - "diags/post/observations/Atm/time-series/GSIM/GSIM_catchment_characteristics_all_1km2.csv", - ) - - # tc_analysis, mvo - c = { - "sets": ["tc_analysis"], - "run_type": "model_vs_obs", - "reference_data_path": "", - "tc_obs": "a", - } - c.update(base) - check_and_define_parameters(c) - self.assertEqual(c["tc_obs"], "a") + # streamflow + c = {"sets": ["streamflow"]} + c.update(d0) + check_mvm_only_parameters_for_bash(c) + c.update(d1) + with pytest.raises(ParameterNotProvidedError): + check_mvm_only_parameters_for_bash(c) + c.update(d2) + with pytest.raises(ParameterNotProvidedError): + check_mvm_only_parameters_for_bash(c) + c.update(d3) + with pytest.raises(ParameterNotProvidedError): + check_mvm_only_parameters_for_bash(c) + c.update(d4) + with pytest.raises(ParameterNotProvidedError): + check_mvm_only_parameters_for_bash(c) - c = { - "sets": ["tc_analysis"], - "run_type": "model_vs_obs", - "reference_data_path": "", - "tc_obs": "", - } - c.update(base) - check_and_define_parameters(c) - self.assertEqual(c["tc_obs"], "diags/post/observations/Atm/tc-analysis/") + # tc_analysis + c = {"sets": ["tc_analysis"]} + c.update(d0) + check_mvm_only_parameters_for_bash(c) + c.update(d1) + with pytest.raises(ParameterNotProvidedError): + check_mvm_only_parameters_for_bash(c) + c.update(d2) + with pytest.raises(ParameterNotProvidedError): + check_mvm_only_parameters_for_bash(c) + c.update(d3) + check_mvm_only_parameters_for_bash(c) # ts_num_years_ref not needed + c.update(d4) + check_mvm_only_parameters_for_bash(c) # ts_subsection not needed + + # tropical_subseasonal + c = {"sets": ["tropical_subseasonal"]} + c.update(d0) + check_mvm_only_parameters_for_bash(c) + c.update(d1) + with pytest.raises(ParameterNotProvidedError): + check_mvm_only_parameters_for_bash(c) + c.update(d2) + with pytest.raises(ParameterNotProvidedError): + check_mvm_only_parameters_for_bash(c) + c.update(d3) + with pytest.raises(ParameterNotProvidedError): + check_mvm_only_parameters_for_bash(c) + c.update(d4) + with pytest.raises(ParameterNotProvidedError): + check_mvm_only_parameters_for_bash(c) - # tc_analysis, mvm - c = { - "sets": ["tc_analysis"], - "run_type": "model_vs_model", - "reference_data_path": "", - "tc_obs": "a", - "reference_data_path_tc": "b", - } - c.update(mvm_base) - check_and_define_parameters(c) - self.assertEqual(c["tc_obs"], "a") - self.assertEqual(c["reference_data_path_tc"], "b") - c = { - "sets": ["tc_analysis"], - "run_type": "model_vs_model", - "reference_data_path": "", - "tc_obs": "", - "reference_data_path_tc": "", - } - c.update(mvm_base) +def test_check_and_define_parameters(): + # test_zppy_utils.py tests the guessing functionality turned off. + # So, we'll only test it turned on here. + guesses = {"guess_path_parameters": True, "guess_section_parameters": True} + prefix_requirements = { + "subsection": "sub", + "tag": "tag", + "year1": 1990, + "year2": 2000, + "ref_year1": 1980, + "ref_year2": 1990, + } + base: Dict[str, Any] = {"diagnostics_base_path": "diags/post"} + base.update(guesses) + base.update(prefix_requirements) + + mvm_base = dict() + mvm_base.update(base) + required_for_mvm = { + "diff_title": "diff_title", + "ref_name": "ref_name", + "short_ref_name": "short_ref_name", + } + mvm_base.update(required_for_mvm) + + # No sets, mvo + c: Dict[str, Any] = { + "sets": [], + "run_type": "model_vs_obs", + "reference_data_path": "a", + } + c.update(base) + check_and_define_parameters(c) + assert c["reference_data_path"] == "a" + assert c["prefix"] == "e3sm_diags_sub_tag_1990-2000" + + # No sets, mvm + c = {"sets": [], "run_type": "model_vs_model", "reference_data_path": ""} + c.update(mvm_base) + check_and_define_parameters(c) + assert c["reference_data_path"] == "diags/post/observations/Atm/climatology/" + assert c["prefix"] == "e3sm_diags_sub_tag_1990-2000_vs_1980-1990" + + # No sets, bad run_type + c = {"sets": [], "run_type": "invalid", "reference_data_path": ""} + c.update(base) + with pytest.raises(ValueError): check_and_define_parameters(c) - self.assertEqual(c["tc_obs"], "diags/post/observations/Atm/tc-analysis/") - self.assertEqual( - c["reference_data_path_tc"], "diags/post/atm/tc-analysis_1980_1990" - ) - # tropical_subseasonal, mvm + # ts_num_years => obs_ts, mvo + c = { + "sets": [], + "run_type": "model_vs_obs", + "reference_data_path": "", + "ts_num_years": 3, + "obs_ts": "a", + } + c.update(base) + check_and_define_parameters(c) + assert c["obs_ts"] == "a" + + c = { + "sets": [], + "run_type": "model_vs_obs", + "reference_data_path": "", + "ts_num_years": 3, + "obs_ts": "", + } + c.update(base) + check_and_define_parameters(c) + assert c["obs_ts"] == "diags/post/observations/Atm/time-series/" + + # ts_num_years => obs_ts, mvm + c = { + "sets": [], + "run_type": "model_vs_model", + "reference_data_path": "", + "ts_num_years": 3, + "obs_ts": "a", + } + c.update(mvm_base) + check_and_define_parameters(c) + assert c["obs_ts"] == "a" + + c = { + "sets": [], + "run_type": "model_vs_model", + "reference_data_path": "", + "ts_num_years": 3, + "obs_ts": "", + } + c.update(mvm_base) + check_and_define_parameters(c) + assert c["obs_ts"] == "diags/post/observations/Atm/time-series/" + + # area_mean_time_series/enso_diags/qbo, mvm + for diags_set in ["area_mean_time_series", "enso_diags", "qbo"]: c = { - "sets": ["tropical_subseasonal"], + "sets": [diags_set], "run_type": "model_vs_model", "reference_data_path": "", - "reference_data_path_ts_daily": "a", + "reference_data_path_ts": "a", "grid": "grid", } c.update(mvm_base) check_and_define_parameters(c) - self.assertEqual(c["reference_data_path_ts_daily"], "a") + assert c["reference_data_path_ts"] == "a" c = { - "sets": ["tropical_subseasonal"], + "sets": [diags_set], "run_type": "model_vs_model", "reference_data_path": "", - "reference_data_path_ts_daily": "", + "reference_data_path_ts": "", "grid": "grid", } c.update(mvm_base) check_and_define_parameters(c) - self.assertEqual( - c["reference_data_path_ts_daily"], "diags/post/atm/grid/ts/daily" - ) - - def test_add_climo_dependencies(self): - base: Dict[str, Any] = {"year1": 1980, "year2": 1990} - sets = [ - "lat_lon", - "zonal_mean_xy", - "zonal_mean_2d", - "polar", - "cosp_histogram", - "meridional_mean_2d", - "annual_cycle_zonal_mean", - "zonal_mean_2d_stratosphere", - ] - for diags_set in sets: - c: Dict[str, Any] = {"sets": [diags_set], "climo_subsection": "csub"} - c.update(base) - dependencies: List[str] = [] - add_climo_dependencies(c, dependencies, "script_dir") - self.assertEqual(dependencies, ["script_dir/climo_csub_1980-1990.status"]) - - c = {"sets": ["diurnal_cycle"], "climo_diurnal_subsection": "cdsub"} - c.update(base) - dependencies = [] - add_climo_dependencies(c, dependencies, "script_dir") - self.assertEqual(dependencies, ["script_dir/climo_cdsub_1980-1990.status"]) - c = {"sets": ["diurnal_cycle"]} + assert c["reference_data_path_ts"] == "diags/post/atm/grid/ts/monthly" + + # diurnal_cycle, mvo + c = { + "sets": ["diurnal_cycle"], + "run_type": "model_vs_obs", + "reference_data_path": "", + "dc_obs_climo": "a", + } + c.update(base) + check_and_define_parameters(c) + assert c["dc_obs_climo"] == "a" + + c = { + "sets": ["diurnal_cycle"], + "run_type": "model_vs_obs", + "reference_data_path": "", + "dc_obs_climo": "", + } + c.update(base) + check_and_define_parameters(c) + assert c["dc_obs_climo"] == "diags/post/observations/Atm/climatology/" + + # diurnal_cycle, mvm + c = { + "sets": ["diurnal_cycle"], + "run_type": "model_vs_model", + "reference_data_path": "", + "reference_data_path_climo_diurnal": "a", + "grid": "grid", + } + c.update(mvm_base) + check_and_define_parameters(c) + assert c["reference_data_path_climo_diurnal"] == "a" + + c = { + "sets": ["diurnal_cycle"], + "run_type": "model_vs_model", + "reference_data_path": "", + "reference_data_path_climo_diurnal": "", + "grid": "grid", + } + c.update(mvm_base) + check_and_define_parameters(c) + assert ( + c["reference_data_path_climo_diurnal"] + == "diags/post/atm/grid/clim_diurnal_8xdaily" + ) + + # streamflow, mvo + c = { + "sets": ["streamflow"], + "run_type": "model_vs_obs", + "reference_data_path": "", + "streamflow_obs_ts": "a", + "ts_num_years": 3, + "obs_ts": "", + } + c.update(base) + check_and_define_parameters(c) + assert c["streamflow_obs_ts"] == "a" + + c = { + "sets": ["streamflow"], + "run_type": "model_vs_obs", + "reference_data_path": "", + "streamflow_obs_ts": "", + "ts_num_years": 3, + "obs_ts": "", + } + c.update(base) + check_and_define_parameters(c) + assert c["streamflow_obs_ts"] == "diags/post/observations/Atm/time-series/" + + # streamflow, mvm + c = { + "sets": ["streamflow"], + "run_type": "model_vs_model", + "reference_data_path": "", + "reference_data_path_ts_rof": "a", + "gauges_path": "b", + } + c.update(mvm_base) + check_and_define_parameters(c) + assert c["reference_data_path_ts_rof"] == "a" + assert c["gauges_path"] == "b" + + c = { + "sets": ["streamflow"], + "run_type": "model_vs_model", + "reference_data_path": "", + "reference_data_path_ts_rof": "", + "gauges_path": "", + } + c.update(mvm_base) + check_and_define_parameters(c) + assert c["reference_data_path_ts_rof"] == "diags/post/rof/native/ts/monthly" + assert ( + c["gauges_path"] + == "diags/post/observations/Atm/time-series/GSIM/GSIM_catchment_characteristics_all_1km2.csv" + ) + + # tc_analysis, mvo + c = { + "sets": ["tc_analysis"], + "run_type": "model_vs_obs", + "reference_data_path": "", + "tc_obs": "a", + } + c.update(base) + check_and_define_parameters(c) + assert c["tc_obs"] == "a" + + c = { + "sets": ["tc_analysis"], + "run_type": "model_vs_obs", + "reference_data_path": "", + "tc_obs": "", + } + c.update(base) + check_and_define_parameters(c) + assert c["tc_obs"] == "diags/post/observations/Atm/tc-analysis/" + + # tc_analysis, mvm + c = { + "sets": ["tc_analysis"], + "run_type": "model_vs_model", + "reference_data_path": "", + "tc_obs": "a", + "reference_data_path_tc": "b", + } + c.update(mvm_base) + check_and_define_parameters(c) + assert c["tc_obs"] == "a" + assert c["reference_data_path_tc"] == "b" + + c = { + "sets": ["tc_analysis"], + "run_type": "model_vs_model", + "reference_data_path": "", + "tc_obs": "", + "reference_data_path_tc": "", + } + c.update(mvm_base) + check_and_define_parameters(c) + assert c["tc_obs"] == "diags/post/observations/Atm/tc-analysis/" + assert c["reference_data_path_tc"] == "diags/post/atm/tc-analysis_1980_1990" + + # tropical_subseasonal, mvm + c = { + "sets": ["tropical_subseasonal"], + "run_type": "model_vs_model", + "reference_data_path": "", + "reference_data_path_ts_daily": "a", + "grid": "grid", + } + c.update(mvm_base) + check_and_define_parameters(c) + assert c["reference_data_path_ts_daily"] == "a" + + c = { + "sets": ["tropical_subseasonal"], + "run_type": "model_vs_model", + "reference_data_path": "", + "reference_data_path_ts_daily": "", + "grid": "grid", + } + c.update(mvm_base) + check_and_define_parameters(c) + assert c["reference_data_path_ts_daily"] == "diags/post/atm/grid/ts/daily" + + +def test_add_climo_dependencies(): + base: Dict[str, Any] = {"year1": 1980, "year2": 1990} + sets = [ + "lat_lon", + "zonal_mean_xy", + "zonal_mean_2d", + "polar", + "cosp_histogram", + "meridional_mean_2d", + "annual_cycle_zonal_mean", + "zonal_mean_2d_stratosphere", + ] + for diags_set in sets: + c: Dict[str, Any] = {"sets": [diags_set], "climo_subsection": "csub"} c.update(base) - dependencies = [] - self.assertRaises( - ParameterNotProvidedError, - add_climo_dependencies, - c, - dependencies, - "script_dir", - ) - - c = {"sets": ["lat_lon_land"], "climo_land_subsection": "lndsub"} - c.update(base) - dependencies = [] + dependencies: List[str] = [] add_climo_dependencies(c, dependencies, "script_dir") - self.assertEqual(dependencies, ["script_dir/climo_lndsub_1980-1990.status"]) - c = {"sets": ["lat_lon_land"]} - c.update(base) - dependencies = [] - self.assertRaises( - ParameterNotProvidedError, - add_climo_dependencies, - c, - dependencies, - "script_dir", - ) - - c = {"sets": ["tc_analysis"]} - c.update(base) - dependencies = [] + assert dependencies == ["script_dir/climo_csub_1980-1990.status"] + + c = {"sets": ["diurnal_cycle"], "climo_diurnal_subsection": "cdsub"} + c.update(base) + dependencies = [] + add_climo_dependencies(c, dependencies, "script_dir") + assert dependencies == ["script_dir/climo_cdsub_1980-1990.status"] + c = {"sets": ["diurnal_cycle"]} + c.update(base) + dependencies = [] + with pytest.raises(ParameterNotProvidedError): add_climo_dependencies(c, dependencies, "script_dir") - self.assertEqual(dependencies, ["script_dir/tc_analysis_1980-1990.status"]) - def test_add_ts_dependencies(self): - base: Dict[str, Any] = { - "ts_num_years": 5, - "ts_subsection": "sub", - "ts_daily_subsection": "dsub", - } - sets = ["area_mean_time_series", "enso_diags", "qbo"] - for diags_set in sets: - c: Dict[str, Any] = {"sets": [diags_set]} - c.update(base) - dependencies: List[str] = [] - add_ts_dependencies(c, dependencies, "script_dir", 1980) - self.assertEqual(dependencies, ["script_dir/ts_sub_1980-1984-0005.status"]) - - c = {"sets": ["streamflow"]} - c.update(base) - dependencies = [] - add_ts_dependencies(c, dependencies, "script_dir", 1980) - self.assertEqual( - dependencies, ["script_dir/ts_rof_monthly_1980-1984-0005.status"] - ) + c = {"sets": ["lat_lon_land"], "climo_land_subsection": "lndsub"} + c.update(base) + dependencies = [] + add_climo_dependencies(c, dependencies, "script_dir") + assert dependencies == ["script_dir/climo_lndsub_1980-1990.status"] + c = {"sets": ["lat_lon_land"]} + c.update(base) + dependencies = [] + with pytest.raises(ParameterNotProvidedError): + add_climo_dependencies(c, dependencies, "script_dir") - c = {"sets": ["tropical_subseasonal"]} + c = {"sets": ["tc_analysis"]} + c.update(base) + dependencies = [] + add_climo_dependencies(c, dependencies, "script_dir") + assert dependencies == ["script_dir/tc_analysis_1980-1990.status"] + + +def test_add_ts_dependencies(): + base: Dict[str, Any] = { + "ts_num_years": 5, + "ts_subsection": "sub", + "ts_daily_subsection": "dsub", + } + sets = ["area_mean_time_series", "enso_diags", "qbo"] + for diags_set in sets: + c: Dict[str, Any] = {"sets": [diags_set]} c.update(base) - dependencies = [] + dependencies: List[str] = [] add_ts_dependencies(c, dependencies, "script_dir", 1980) - self.assertEqual(dependencies, ["script_dir/ts_dsub_1980-1984-0005.status"]) - - -if __name__ == "__main__": - unittest.main() + assert dependencies == ["script_dir/ts_sub_1980-1984-0005.status"] + + c = {"sets": ["streamflow"]} + c.update(base) + dependencies = [] + add_ts_dependencies(c, dependencies, "script_dir", 1980) + assert dependencies == ["script_dir/ts_rof_monthly_1980-1984-0005.status"] + + c = {"sets": ["tropical_subseasonal"]} + c.update(base) + dependencies = [] + add_ts_dependencies(c, dependencies, "script_dir", 1980) + assert dependencies == ["script_dir/ts_dsub_1980-1984-0005.status"] diff --git a/tests/test_zppy_global_time_series.py b/tests/test_zppy_global_time_series.py index 572ea893..86c2c834 100644 --- a/tests/test_zppy_global_time_series.py +++ b/tests/test_zppy_global_time_series.py @@ -1,203 +1,201 @@ -import unittest from typing import Any, Dict, List -from zppy.global_time_series import determine_and_add_dependencies, determine_components - +import pytest -class TestZppyGlobalTimeSeries(unittest.TestCase): - def test_determine_components(self): - # Test non-legacy - c: Dict[str, Any] = { - "plot_names": "", - "plots_original": "", - "plots_atm": ["a"], - "plots_ice": "", - "plots_lnd": "", - "plots_ocn": "", - } - determine_components(c) - self.assertEqual(c["use_atm"], True) - self.assertEqual(c["use_ice"], False) - self.assertEqual(c["use_lnd"], False) - self.assertEqual(c["use_ocn"], False) - self.assertEqual(c["plots_atm"], ["a"]) - self.assertEqual(c["plots_ice"], "None") - self.assertEqual(c["plots_lnd"], "None") - self.assertEqual(c["plots_ocn"], "None") - - c = { - "plot_names": "", - "plots_original": "", - "plots_atm": "", - "plots_ice": ["a"], - "plots_lnd": "", - "plots_ocn": "", - } - determine_components(c) - self.assertEqual(c["use_atm"], False) - self.assertEqual(c["use_ice"], True) - self.assertEqual(c["use_lnd"], False) - self.assertEqual(c["use_ocn"], False) - self.assertEqual(c["plots_atm"], "None") - self.assertEqual(c["plots_ice"], ["a"]) - self.assertEqual(c["plots_lnd"], "None") - self.assertEqual(c["plots_ocn"], "None") +from zppy.global_time_series import determine_and_add_dependencies, determine_components - c = { - "plot_names": "", - "plots_original": "", - "plots_atm": "", - "plots_ice": "", - "plots_lnd": ["a"], - "plots_ocn": "", - } - determine_components(c) - self.assertEqual(c["use_atm"], False) - self.assertEqual(c["use_ice"], False) - self.assertEqual(c["use_lnd"], True) - self.assertEqual(c["use_ocn"], False) - self.assertEqual(c["plots_atm"], "None") - self.assertEqual(c["plots_ice"], "None") - self.assertEqual(c["plots_lnd"], ["a"]) - self.assertEqual(c["plots_ocn"], "None") +def test_determine_components(): + c: Dict[str, Any] + # Test non-legacy + c = { + "plot_names": "", + "plots_original": "", + "plots_atm": ["a"], + "plots_ice": "", + "plots_lnd": "", + "plots_ocn": "", + } + determine_components(c) + assert c["use_atm"] == True + assert c["use_ice"] == False + assert c["use_lnd"] == False + assert c["use_ocn"] == False + assert c["plots_atm"] == ["a"] + assert c["plots_ice"] == "None" + assert c["plots_lnd"] == "None" + assert c["plots_ocn"] == "None" + + c = { + "plot_names": "", + "plots_original": "", + "plots_atm": "", + "plots_ice": ["a"], + "plots_lnd": "", + "plots_ocn": "", + } + determine_components(c) + assert c["use_atm"] == False + assert c["use_ice"] == True + assert c["use_lnd"] == False + assert c["use_ocn"] == False + assert c["plots_atm"] == "None" + assert c["plots_ice"] == ["a"] + assert c["plots_lnd"] == "None" + assert c["plots_ocn"] == "None" + + c = { + "plot_names": "", + "plots_original": "", + "plots_atm": "", + "plots_ice": "", + "plots_lnd": ["a"], + "plots_ocn": "", + } + determine_components(c) + assert c["use_atm"] == False + assert c["use_ice"] == False + assert c["use_lnd"] == True + assert c["use_ocn"] == False + assert c["plots_atm"] == "None" + assert c["plots_ice"] == "None" + assert c["plots_lnd"] == ["a"] + assert c["plots_ocn"] == "None" + + c = { + "plot_names": "", + "plots_original": "", + "plots_atm": "", + "plots_ice": "", + "plots_lnd": "", + "plots_ocn": ["a"], + } + determine_components(c) + assert c["use_atm"] == False + assert c["use_ice"] == False + assert c["use_lnd"] == False + assert c["use_ocn"] == True + assert c["plots_atm"] == "None" + assert c["plots_ice"] == "None" + assert c["plots_lnd"] == "None" + assert c["plots_ocn"] == ["a"] + + # Test legacy + base = {"plots_atm": "", "plots_ice": "", "plots_lnd": "", "plots_ocn": ""} + + c = { + "plot_names": ["a"], + "plots_original": "gets_overwritten", + "atmosphere_only": False, + } + c.update(base) + determine_components(c) + assert c["plots_original"] == ["a"] + assert c["use_atm"] == True + assert c["use_ice"] == False + assert c["use_lnd"] == False + assert c["use_ocn"] == False + assert c["plots_atm"] == "None" + assert c["plots_ice"] == "None" + assert c["plots_lnd"] == "None" + assert c["plots_ocn"] == "None" + + for ocn_set in ["change_ohc", "max_moc", "change_sea_level"]: c = { "plot_names": "", - "plots_original": "", - "plots_atm": "", - "plots_ice": "", - "plots_lnd": "", - "plots_ocn": ["a"], - } - determine_components(c) - self.assertEqual(c["use_atm"], False) - self.assertEqual(c["use_ice"], False) - self.assertEqual(c["use_lnd"], False) - self.assertEqual(c["use_ocn"], True) - self.assertEqual(c["plots_atm"], "None") - self.assertEqual(c["plots_ice"], "None") - self.assertEqual(c["plots_lnd"], "None") - self.assertEqual(c["plots_ocn"], ["a"]) - - # Test legacy - base = {"plots_atm": "", "plots_ice": "", "plots_lnd": "", "plots_ocn": ""} - - c = { - "plot_names": ["a"], - "plots_original": "gets_overwritten", + "plots_original": [ocn_set], "atmosphere_only": False, } c.update(base) determine_components(c) - self.assertEqual(c["plots_original"], ["a"]) - self.assertEqual(c["use_atm"], True) - self.assertEqual(c["use_ice"], False) - self.assertEqual(c["use_lnd"], False) - self.assertEqual(c["use_ocn"], False) - self.assertEqual(c["plots_atm"], "None") - self.assertEqual(c["plots_ice"], "None") - self.assertEqual(c["plots_lnd"], "None") - self.assertEqual(c["plots_ocn"], "None") - - for ocn_set in ["change_ohc", "max_moc", "change_sea_level"]: - c = { - "plot_names": "", - "plots_original": [ocn_set], - "atmosphere_only": False, - } - c.update(base) - determine_components(c) - self.assertEqual(c["plots_original"], [ocn_set]) - self.assertEqual(c["use_atm"], True) - self.assertEqual(c["use_ice"], False) - self.assertEqual(c["use_lnd"], False) - self.assertEqual(c["use_ocn"], True) - self.assertEqual(c["plots_atm"], "None") - self.assertEqual(c["plots_ice"], "None") - self.assertEqual(c["plots_lnd"], "None") - self.assertEqual(c["plots_ocn"], "None") - - c = {"plot_names": "", "plots_original": ["a"], "atmosphere_only": True} - c.update(base) - determine_components(c) - self.assertEqual(c["plots_original"], ["a"]) - self.assertEqual(c["use_atm"], True) - self.assertEqual(c["use_ice"], False) - self.assertEqual(c["use_lnd"], False) - self.assertEqual(c["use_ocn"], False) - self.assertEqual(c["plots_atm"], "None") - self.assertEqual(c["plots_ice"], "None") - self.assertEqual(c["plots_lnd"], "None") - self.assertEqual(c["plots_ocn"], "None") - - def test_determine_and_add_dependencies(self): - c: Dict[str, Any] = { - "use_atm": True, - "use_lnd": False, - "use_ocn": False, - "year1": 1980, - "year2": 1990, - "ts_num_years": 5, - } - dependencies: List[str] = [] + assert c["plots_original"] == [ocn_set] + assert c["use_atm"] == True + assert c["use_ice"] == False + assert c["use_lnd"] == False + assert c["use_ocn"] == True + assert c["plots_atm"] == "None" + assert c["plots_ice"] == "None" + assert c["plots_lnd"] == "None" + assert c["plots_ocn"] == "None" + + c = {"plot_names": "", "plots_original": ["a"], "atmosphere_only": True} + c.update(base) + determine_components(c) + assert c["plots_original"] == ["a"] + assert c["use_atm"] == True + assert c["use_ice"] == False + assert c["use_lnd"] == False + assert c["use_ocn"] == False + assert c["plots_atm"] == "None" + assert c["plots_ice"] == "None" + assert c["plots_lnd"] == "None" + assert c["plots_ocn"] == "None" + + +def test_determine_and_add_dependencies(): + c: Dict[str, Any] + c = { + "use_atm": True, + "use_lnd": False, + "use_ocn": False, + "year1": 1980, + "year2": 1990, + "ts_num_years": 5, + } + dependencies: List[str] = [] + determine_and_add_dependencies(c, dependencies, "script_dir") + expected = [ + "script_dir/ts_atm_monthly_glb_1980-1984-0005.status", + "script_dir/ts_atm_monthly_glb_1985-1989-0005.status", + ] + assert dependencies == expected + + c = { + "use_atm": False, + "use_lnd": True, + "use_ocn": False, + "year1": 1980, + "year2": 1990, + "ts_num_years": 5, + } + dependencies = [] + determine_and_add_dependencies(c, dependencies, "script_dir") + expected = [ + "script_dir/ts_lnd_monthly_glb_1980-1984-0005.status", + "script_dir/ts_lnd_monthly_glb_1985-1989-0005.status", + ] + assert dependencies == expected + + c = { + "use_atm": False, + "use_lnd": False, + "use_ocn": True, + "ts_years": "1980:1990:10", + "climo_years": "1980:1990:10", + } + dependencies = [] + determine_and_add_dependencies(c, dependencies, "script_dir") + expected = ["script_dir/mpas_analysis_ts_1980-1989_climo_1980-1989.status"] + assert dependencies == expected + + c = { + "use_atm": False, + "use_lnd": False, + "use_ocn": True, + "ts_years": "", + "climo_years": "1980:1990:10", + } + dependencies = [] + with pytest.raises(Exception): determine_and_add_dependencies(c, dependencies, "script_dir") - expected = [ - "script_dir/ts_atm_monthly_glb_1980-1984-0005.status", - "script_dir/ts_atm_monthly_glb_1985-1989-0005.status", - ] - self.assertEqual(dependencies, expected) - c = { - "use_atm": False, - "use_lnd": True, - "use_ocn": False, - "year1": 1980, - "year2": 1990, - "ts_num_years": 5, - } - dependencies = [] + c = { + "use_atm": False, + "use_lnd": False, + "use_ocn": True, + "ts_years": "1980:1990:10", + "climo_years": "", + } + dependencies = [] + with pytest.raises(Exception): determine_and_add_dependencies(c, dependencies, "script_dir") - expected = [ - "script_dir/ts_lnd_monthly_glb_1980-1984-0005.status", - "script_dir/ts_lnd_monthly_glb_1985-1989-0005.status", - ] - self.assertEqual(dependencies, expected) - - c = { - "use_atm": False, - "use_lnd": False, - "use_ocn": True, - "ts_years": "1980:1990:10", - "climo_years": "1980:1990:10", - } - dependencies = [] - determine_and_add_dependencies(c, dependencies, "script_dir") - expected = ["script_dir/mpas_analysis_ts_1980-1989_climo_1980-1989.status"] - self.assertEqual(dependencies, expected) - - c = { - "use_atm": False, - "use_lnd": False, - "use_ocn": True, - "ts_years": "", - "climo_years": "1980:1990:10", - } - dependencies = [] - self.assertRaises( - Exception, determine_and_add_dependencies, c, dependencies, "script_dir" - ) - c = { - "use_atm": False, - "use_lnd": False, - "use_ocn": True, - "ts_years": "1980:1990:10", - "climo_years": "", - } - dependencies = [] - self.assertRaises( - Exception, determine_and_add_dependencies, c, dependencies, "script_dir" - ) - - -if __name__ == "__main__": - unittest.main() diff --git a/tests/test_zppy_ilamb.py b/tests/test_zppy_ilamb.py index bc0f8f46..0f828305 100644 --- a/tests/test_zppy_ilamb.py +++ b/tests/test_zppy_ilamb.py @@ -1,47 +1,41 @@ -import unittest from typing import List from zppy.ilamb import determine_and_add_dependencies -class TestZppyILAMB(unittest.TestCase): - def test_determine_and_add_dependencies(self): - c = { - "land_only": True, - "ts_land_subsection": "land_monthly", - "year1": 1980, - "year2": 1990, - "ts_num_years": 5, - } - dependencies: List[str] = [] - determine_and_add_dependencies(c, dependencies, "script_dir") - expected = [ - "script_dir/ts_land_monthly_1980-1984-0005.status", - "script_dir/ts_land_monthly_1985-1989-0005.status", - ] - self.assertEqual(dependencies, expected) +def test_determine_and_add_dependencies(): + c = { + "land_only": True, + "ts_land_subsection": "land_monthly", + "year1": 1980, + "year2": 1990, + "ts_num_years": 5, + } + dependencies: List[str] = [] + determine_and_add_dependencies(c, dependencies, "script_dir") + expected = [ + "script_dir/ts_land_monthly_1980-1984-0005.status", + "script_dir/ts_land_monthly_1985-1989-0005.status", + ] + assert dependencies == expected - # Have zppy guess the subsection names - c = { - "land_only": False, - "ts_land_subsection": "", - "ts_atm_subsection": "", - "year1": 1980, - "year2": 1990, - "ts_num_years": 5, - "guess_path_parameters": True, - "guess_section_parameters": True, - } - dependencies = [] - determine_and_add_dependencies(c, dependencies, "script_dir") - expected = [ - "script_dir/ts_land_monthly_1980-1984-0005.status", - "script_dir/ts_land_monthly_1985-1989-0005.status", - "script_dir/ts_atm_monthly_180x360_aave_1980-1984-0005.status", - "script_dir/ts_atm_monthly_180x360_aave_1985-1989-0005.status", - ] - self.assertEqual(dependencies, expected) - - -if __name__ == "__main__": - unittest.main() + # Have zppy guess the subsection names + c = { + "land_only": False, + "ts_land_subsection": "", + "ts_atm_subsection": "", + "year1": 1980, + "year2": 1990, + "ts_num_years": 5, + "guess_path_parameters": True, + "guess_section_parameters": True, + } + dependencies = [] + determine_and_add_dependencies(c, dependencies, "script_dir") + expected = [ + "script_dir/ts_land_monthly_1980-1984-0005.status", + "script_dir/ts_land_monthly_1985-1989-0005.status", + "script_dir/ts_atm_monthly_180x360_aave_1980-1984-0005.status", + "script_dir/ts_atm_monthly_180x360_aave_1985-1989-0005.status", + ] + assert dependencies == expected diff --git a/tests/test_zppy_utils.py b/tests/test_zppy_utils.py index 7a87420c..e2d76d5e 100644 --- a/tests/test_zppy_utils.py +++ b/tests/test_zppy_utils.py @@ -1,6 +1,7 @@ -import unittest from typing import List +import pytest + from zppy.utils import ( ParameterGuessType, ParameterNotProvidedError, @@ -20,485 +21,490 @@ ) -class TestZppyUtils(unittest.TestCase): - def test_get_active_status(self): - # Test bool input - task = {"active": True} - self.assertTrue(get_active_status(task)) - task = {"active": False} - self.assertFalse(get_active_status(task)) - - # Test str input - task = {"active": "True"} # type: ignore - self.assertTrue(get_active_status(task)) - task = {"active": "False"} # type: ignore - self.assertFalse(get_active_status(task)) - - # Test bad value - task = {"active": "bad input"} # type: ignore - self.assertRaises(ValueError, get_active_status, task) - - # Test bad type - task = {"active": 5} # type: ignore - self.assertRaises(TypeError, get_active_status, task) - - def test_get_guess_type_parameter(self): - actual = get_guess_type_parameter(ParameterGuessType.SECTION_GUESS) - self.assertEqual(actual, "guess_section_parameters") - - actual = get_guess_type_parameter(ParameterGuessType.PATH_GUESS) - self.assertEqual(actual, "guess_path_parameters") - - def test_get_url_message(self): - c = { - "web_portal_base_path": "a", - "web_portal_base_url": "b", - "www": "a/c", - "case": "d", - } - actual = get_url_message(c, "task_name") - self.assertEqual(actual, "URL: b/c/d/task_name") - - c = { - "web_portal_base_path": "a", - "web_portal_base_url": "b", - "www": "c", - "case": "d", - } - actual = get_url_message(c, "task_name") - self.assertEqual(actual, "Could not determine URL from www=c") - - # def test_initialize_template - - # def test_get_tasks - - def test_set_mapping_file(self): - # Test no-change cases - c = {"mapping_file": ""} - set_mapping_file(c) - self.assertEqual(c["mapping_file"], "") - - c = {"mapping_file": "glb"} - set_mapping_file(c) - self.assertEqual(c["mapping_file"], "glb") - - c = {"mapping_file": "dir/file"} - set_mapping_file(c) - self.assertEqual(c["mapping_file"], "dir/file") - - # Now, the function should do something - c = {"mapping_file": "file", "diagnostics_base_path": "base"} - set_mapping_file(c) - self.assertEqual(c["mapping_file"], "base/maps/file") - - def test_set_grid(self): - c = {"grid": "grid"} - set_grid(c) - self.assertEqual(c["grid"], "grid") - - c = {"grid": "", "mapping_file": ""} - set_grid(c) - self.assertEqual(c["grid"], "native") - - c = {"grid": "", "mapping_file": "glb"} - set_grid(c) - self.assertEqual(c["grid"], "glb") - - # TODO: test a realistic mapping file - - def test_set_component_and_prc_typ(self): - # Test without input_files - c = {"input_component": "cam"} - set_component_and_prc_typ(c) - self.assertEqual(c["component"], "atm") - self.assertEqual(c["prc_typ"], "cam") - - c = {"input_component": "eam"} - set_component_and_prc_typ(c) - self.assertEqual(c["component"], "atm") - self.assertEqual(c["prc_typ"], "eam") - - c = {"input_component": "eamxx"} - set_component_and_prc_typ(c) - self.assertEqual(c["component"], "atm") - self.assertEqual(c["prc_typ"], "eamxx") - - c = {"input_component": "cpl"} +def test_get_active_status(): + # Test bool input + task = {"active": True} + assert get_active_status(task) is True + task = {"active": False} + assert get_active_status(task) is False + + # Test str input + task = {"active": "True"} # type: ignore + assert get_active_status(task) is True + task = {"active": "False"} # type: ignore + assert get_active_status(task) is False + + # Test bad value + task = {"active": "bad input"} # type: ignore + with pytest.raises(ValueError): + get_active_status(task) + + # Test bad type + task = {"active": 5} # type: ignore + with pytest.raises(TypeError): + get_active_status(task) + + +def test_get_guess_type_parameter(): + assert ( + get_guess_type_parameter(ParameterGuessType.SECTION_GUESS) + == "guess_section_parameters" + ) + assert ( + get_guess_type_parameter(ParameterGuessType.PATH_GUESS) + == "guess_path_parameters" + ) + + +def test_get_url_message(): + c = { + "web_portal_base_path": "a", + "web_portal_base_url": "b", + "www": "a/c", + "case": "d", + } + assert get_url_message(c, "task_name") == "URL: b/c/d/task_name" + + c = { + "web_portal_base_path": "a", + "web_portal_base_url": "b", + "www": "c", + "case": "d", + } + assert get_url_message(c, "task_name") == "Could not determine URL from www=c" + + +def test_set_mapping_file(): + # Test no-change cases + c = {"mapping_file": ""} + set_mapping_file(c) + assert c["mapping_file"] == "" + + c = {"mapping_file": "glb"} + set_mapping_file(c) + assert c["mapping_file"] == "glb" + + c = {"mapping_file": "dir/file"} + set_mapping_file(c) + assert c["mapping_file"] == "dir/file" + + # Now, the function should do something + c = {"mapping_file": "file", "diagnostics_base_path": "base"} + set_mapping_file(c) + assert c["mapping_file"] == "base/maps/file" + + +def test_set_grid(): + c = {"grid": "grid"} + set_grid(c) + assert c["grid"] == "grid" + + c = {"grid": "", "mapping_file": ""} + set_grid(c) + assert c["grid"] == "native" + + c = {"grid": "", "mapping_file": "glb"} + set_grid(c) + assert c["grid"] == "glb" + + # TODO: test a realistic mapping file + + +def test_set_component_and_prc_typ(): + # Test without input_files + c = {"input_component": "cam"} + set_component_and_prc_typ(c) + assert c["component"] == "atm" + assert c["prc_typ"] == "cam" + + c = {"input_component": "eam"} + set_component_and_prc_typ(c) + assert c["component"] == "atm" + assert c["prc_typ"] == "eam" + + c = {"input_component": "eamxx"} + set_component_and_prc_typ(c) + assert c["component"] == "atm" + assert c["prc_typ"] == "eamxx" + + c = {"input_component": "cpl"} + set_component_and_prc_typ(c) + assert c["component"] == "cpl" + assert c["prc_typ"] == "sgs" + + c = {"input_component": "clm2"} + set_component_and_prc_typ(c) + assert c["component"] == "lnd" + assert c["prc_typ"] == "clm" + + c = {"input_component": "elm"} + set_component_and_prc_typ(c) + assert c["component"] == "lnd" + assert c["prc_typ"] == "elm" + + c = {"input_component": "mosart"} + set_component_and_prc_typ(c) + assert c["component"] == "rof" + assert c["prc_typ"] == "sgs" + + # Test with input_files + c = {"input_component": "", "input_files": "cam.extension"} + set_component_and_prc_typ(c) + assert c["component"] == "atm" + assert c["prc_typ"] == "cam" + + c = {"input_component": "", "input_files": "eam.extension"} + set_component_and_prc_typ(c) + assert c["component"] == "atm" + assert c["prc_typ"] == "eam" + + c = {"input_component": "", "input_files": "eamxx.extension"} + set_component_and_prc_typ(c) + assert c["component"] == "atm" + assert c["prc_typ"] == "eamxx" + + c = {"input_component": "", "input_files": "cpl.extension"} + set_component_and_prc_typ(c) + assert c["component"] == "cpl" + assert c["prc_typ"] == "sgs" + + c = {"input_component": "", "input_files": "clm2.extension"} + set_component_and_prc_typ(c) + assert c["component"] == "lnd" + assert c["prc_typ"] == "clm" + + c = {"input_component": "", "input_files": "elm.extension"} + set_component_and_prc_typ(c) + assert c["component"] == "lnd" + assert c["prc_typ"] == "elm" + + c = {"input_component": "", "input_files": "mosart.extension"} + set_component_and_prc_typ(c) + assert c["component"] == "rof" + assert c["prc_typ"] == "sgs" + + # Test error case + c = {"input_component": "", "input_files": ""} + with pytest.raises(ValueError): set_component_and_prc_typ(c) - self.assertEqual(c["component"], "cpl") - self.assertEqual(c["prc_typ"], "sgs") - c = {"input_component": "clm2"} - set_component_and_prc_typ(c) - self.assertEqual(c["component"], "lnd") - self.assertEqual(c["prc_typ"], "clm") - c = {"input_component": "elm"} - set_component_and_prc_typ(c) - self.assertEqual(c["component"], "lnd") - self.assertEqual(c["prc_typ"], "elm") +def test_check_required_parameters(): + # Parameter is required + # a, b need parameter p, and we want sets a, b, c + c = {"sets": ["a", "b", "c"], "p": "exists"} + check_required_parameters(c, set(["a", "b"]), "p") - c = {"input_component": "mosart"} - set_component_and_prc_typ(c) - self.assertEqual(c["component"], "rof") - self.assertEqual(c["prc_typ"], "sgs") + # Parameter isn't required based on the sets we want + # z needs parameter p, but we only want sets a, b, c + c = {"sets": ["a", "b", "c"], "p": ""} + check_required_parameters(c, set(["z"]), "p") - # Test with input_files - c = {"input_component": "", "input_files": "cam.extension"} - set_component_and_prc_typ(c) - self.assertEqual(c["component"], "atm") - self.assertEqual(c["prc_typ"], "cam") - - c = {"input_component": "", "input_files": "eam.extension"} - set_component_and_prc_typ(c) - self.assertEqual(c["component"], "atm") - self.assertEqual(c["prc_typ"], "eam") - - c = {"input_component": "", "input_files": "eamxx.extension"} - set_component_and_prc_typ(c) - self.assertEqual(c["component"], "atm") - self.assertEqual(c["prc_typ"], "eamxx") - - c = {"input_component": "", "input_files": "cpl.extension"} - set_component_and_prc_typ(c) - self.assertEqual(c["component"], "cpl") - self.assertEqual(c["prc_typ"], "sgs") - - c = {"input_component": "", "input_files": "clm2.extension"} - set_component_and_prc_typ(c) - self.assertEqual(c["component"], "lnd") - self.assertEqual(c["prc_typ"], "clm") - - c = {"input_component": "", "input_files": "elm.extension"} - set_component_and_prc_typ(c) - self.assertEqual(c["component"], "lnd") - self.assertEqual(c["prc_typ"], "elm") - - c = {"input_component": "", "input_files": "mosart.extension"} - set_component_and_prc_typ(c) - self.assertEqual(c["component"], "rof") - self.assertEqual(c["prc_typ"], "sgs") - - # Test error case - c = {"input_component": "", "input_files": ""} - self.assertRaises(ValueError, set_component_and_prc_typ, c) - - def test_check_required_parameters(self): - # Parameter is required - # a, b need parameter p, and we want sets a, b, c - c = {"sets": ["a", "b", "c"], "p": "exists"} + # Parameter is required + # a, b need parameter p, and we want sets a, b, c + c = {"sets": ["a", "b", "c"], "p": ""} + with pytest.raises(ParameterNotProvidedError): check_required_parameters(c, set(["a", "b"]), "p") - # Parameter isn't required based on the sets we want - # z needs parameter p, but we only want sets a, b, c - c = {"sets": ["a", "b", "c"], "p": ""} - check_required_parameters(c, set(["z"]), "p") - - # Parameter is required - # a, b need parameter p, and we want sets a, b, c - c = {"sets": ["a", "b", "c"], "p": ""} - self.assertRaises( - ParameterNotProvidedError, - check_required_parameters, - c, - set(["a", "b"]), - "p", - ) - - def test_get_years(self): - self.assertEqual(get_years("1980:1990:05"), [(1980, 1984), (1985, 1989)]) - self.assertEqual(get_years("1980-1990"), [(1980, 1990)]) - - self.assertEqual(get_years(["1980:1990:05"]), [(1980, 1984), (1985, 1989)]) - self.assertEqual(get_years(["1980-1990"]), [(1980, 1990)]) - self.assertEqual( - get_years(["1980:1990:05", "2000:2010:05"]), - [(1980, 1984), (1985, 1989), (2000, 2004), (2005, 2009)], - ) - self.assertEqual( - get_years(["1980-1990", "2000-2005"]), [(1980, 1990), (2000, 2005)] - ) - - self.assertRaises(ValueError, get_years, "1980") - self.assertRaises(ValueError, get_years, "1980:1990") - self.assertRaises(ValueError, get_years, "1980:1990:05:03") - self.assertRaises(ValueError, get_years, "1980-1990-05") - - self.assertRaises( - ValueError, get_years, ["1983-1993", "1980"] - ) # one year set works - self.assertRaises(ValueError, get_years, ["1980:1990"]) - self.assertRaises(ValueError, get_years, ["1980:1990:05:03"]) - self.assertRaises(ValueError, get_years, ["1980-1990-05"]) - - # This one is in fact a value error, but not one we raised directly - self.assertRaises(ValueError, get_years, "1980-1990:05:03") - - def test_define_or_guess(self): - # First choice is defined - c = { - "first_choice": "a", - "second_choice": "b", - "guess_path_parameters": True, - "guess_section_parameters": True, - } - actual = define_or_guess( +def test_get_years(): + assert get_years("1980:1990:05") == [(1980, 1984), (1985, 1989)] + assert get_years("1980-1990") == [(1980, 1990)] + + assert get_years(["1980:1990:05"]) == [(1980, 1984), (1985, 1989)] + assert get_years(["1980-1990"]) == [(1980, 1990)] + + assert get_years(["1980:1990:05", "2000:2010:05"]) == [ + (1980, 1984), + (1985, 1989), + (2000, 2004), + (2005, 2009), + ] + assert get_years(["1980-1990", "2000-2005"]) == [(1980, 1990), (2000, 2005)] + + with pytest.raises(ValueError): + get_years("1980") + with pytest.raises(ValueError): + get_years("1980:1990") + with pytest.raises(ValueError): + get_years("1980:1990:05:03") + with pytest.raises(ValueError): + get_years("1980-1990-05") + + with pytest.raises(ValueError): + get_years(["1983-1993", "1980"]) # one year set works + with pytest.raises(ValueError): + get_years(["1980:1990"]) + with pytest.raises(ValueError): + get_years(["1980:1990:05:03"]) + with pytest.raises(ValueError): + get_years(["1980-1990-05"]) + + # This one is in fact a value error, but not one we raised directly + with pytest.raises(ValueError): + get_years("1980-1990:05:03") + + +def test_define_or_guess(): + # First choice is defined + c = { + "first_choice": "a", + "second_choice": "b", + "guess_path_parameters": True, + "guess_section_parameters": True, + } + assert ( + define_or_guess( c, "first_choice", "second_choice", ParameterGuessType.PATH_GUESS ) - self.assertEqual(actual, "a") - actual = define_or_guess( + == "a" + ) + assert ( + define_or_guess( c, "first_choice", "second_choice", ParameterGuessType.SECTION_GUESS ) - self.assertEqual(actual, "a") - - c = { - "first_choice": "a", - "second_choice": "b", - "guess_path_parameters": True, - "guess_section_parameters": False, - } - actual = define_or_guess( + == "a" + ) + + c = { + "first_choice": "a", + "second_choice": "b", + "guess_path_parameters": True, + "guess_section_parameters": False, + } + assert ( + define_or_guess( c, "first_choice", "second_choice", ParameterGuessType.PATH_GUESS ) - self.assertEqual(actual, "a") - actual = define_or_guess( + == "a" + ) + assert ( + define_or_guess( c, "first_choice", "second_choice", ParameterGuessType.SECTION_GUESS ) - self.assertEqual(actual, "a") - - c = { - "first_choice": "a", - "second_choice": "b", - "guess_path_parameters": False, - "guess_section_parameters": True, - } - actual = define_or_guess( + == "a" + ) + + c = { + "first_choice": "a", + "second_choice": "b", + "guess_path_parameters": False, + "guess_section_parameters": True, + } + assert ( + define_or_guess( c, "first_choice", "second_choice", ParameterGuessType.PATH_GUESS ) - self.assertEqual(actual, "a") - actual = define_or_guess( + == "a" + ) + assert ( + define_or_guess( c, "first_choice", "second_choice", ParameterGuessType.SECTION_GUESS ) - self.assertEqual(actual, "a") - - # First choice is undefined - c = { - "first_choice": "", - "second_choice": "b", - "guess_path_parameters": True, - "guess_section_parameters": True, - } - actual = define_or_guess( + == "a" + ) + + # First choice is undefined + c = { + "first_choice": "", + "second_choice": "b", + "guess_path_parameters": True, + "guess_section_parameters": True, + } + assert ( + define_or_guess( c, "first_choice", "second_choice", ParameterGuessType.PATH_GUESS ) - self.assertEqual(actual, "b") - actual = define_or_guess( + == "b" + ) + assert ( + define_or_guess( c, "first_choice", "second_choice", ParameterGuessType.SECTION_GUESS ) - self.assertEqual(actual, "b") - - c = { - "first_choice": "", - "second_choice": "b", - "guess_path_parameters": True, - "guess_section_parameters": False, - } - actual = define_or_guess( + == "b" + ) + + c = { + "first_choice": "", + "second_choice": "b", + "guess_path_parameters": True, + "guess_section_parameters": False, + } + assert ( + define_or_guess( c, "first_choice", "second_choice", ParameterGuessType.PATH_GUESS ) - self.assertEqual(actual, "b") - self.assertRaises( - ParameterNotProvidedError, - define_or_guess, - c, - "first_choice", - "second_choice", - ParameterGuessType.SECTION_GUESS, - ) - - c = { - "first_choice": "", - "second_choice": "b", - "guess_path_parameters": False, - "guess_section_parameters": True, - } - self.assertRaises( - ParameterNotProvidedError, - define_or_guess, - c, - "first_choice", - "second_choice", - ParameterGuessType.PATH_GUESS, - ) - actual = define_or_guess( + == "b" + ) + with pytest.raises(ParameterNotProvidedError): + define_or_guess( c, "first_choice", "second_choice", ParameterGuessType.SECTION_GUESS ) - self.assertEqual(actual, "b") - - def test_define_or_guess2(self): - # The required parameter has a value - c = { - "required_parameter": "a", - "guess_path_parameters": True, - "guess_section_parameters": True, - } - define_or_guess2( - c, "required_parameter", "backup_option", ParameterGuessType.PATH_GUESS - ) - self.assertEqual(c["required_parameter"], "a") - c = { - "required_parameter": "a", - "guess_path_parameters": True, - "guess_section_parameters": True, - } - define_or_guess2( - c, "required_parameter", "backup_option", ParameterGuessType.SECTION_GUESS - ) - self.assertEqual(c["required_parameter"], "a") - - c = { - "required_parameter": "a", - "guess_path_parameters": True, - "guess_section_parameters": False, - } - define_or_guess2( - c, "required_parameter", "backup_option", ParameterGuessType.PATH_GUESS - ) - self.assertEqual(c["required_parameter"], "a") - c = { - "required_parameter": "a", - "guess_path_parameters": True, - "guess_section_parameters": False, - } - define_or_guess2( - c, "required_parameter", "backup_option", ParameterGuessType.SECTION_GUESS - ) - self.assertEqual(c["required_parameter"], "a") - c = { - "required_parameter": "a", - "guess_path_parameters": False, - "guess_section_parameters": True, - } - define_or_guess2( - c, "required_parameter", "backup_option", ParameterGuessType.PATH_GUESS - ) - self.assertEqual(c["required_parameter"], "a") - c = { - "required_parameter": "a", - "guess_path_parameters": False, - "guess_section_parameters": True, - } - define_or_guess2( - c, "required_parameter", "backup_option", ParameterGuessType.SECTION_GUESS + c = { + "first_choice": "", + "second_choice": "b", + "guess_path_parameters": False, + "guess_section_parameters": True, + } + with pytest.raises(ParameterNotProvidedError): + define_or_guess( + c, "first_choice", "second_choice", ParameterGuessType.PATH_GUESS ) - self.assertEqual(c["required_parameter"], "a") - - # The required parameter is undefined - c = { - "required_parameter": "", - "guess_path_parameters": True, - "guess_section_parameters": True, - } - define_or_guess2( - c, "required_parameter", "backup_option", ParameterGuessType.PATH_GUESS + assert ( + define_or_guess( + c, "first_choice", "second_choice", ParameterGuessType.SECTION_GUESS ) - self.assertEqual(c["required_parameter"], "backup_option") - c = { - "required_parameter": "", - "guess_path_parameters": True, - "guess_section_parameters": True, - } + == "b" + ) + + +def test_define_or_guess2(): + # The required parameter has a value + c = { + "required_parameter": "a", + "guess_path_parameters": True, + "guess_section_parameters": True, + } + define_or_guess2( + c, "required_parameter", "backup_option", ParameterGuessType.PATH_GUESS + ) + assert c["required_parameter"] == "a" + c = { + "required_parameter": "a", + "guess_path_parameters": True, + "guess_section_parameters": True, + } + define_or_guess2( + c, "required_parameter", "backup_option", ParameterGuessType.SECTION_GUESS + ) + assert c["required_parameter"] == "a" + + c = { + "required_parameter": "a", + "guess_path_parameters": True, + "guess_section_parameters": False, + } + define_or_guess2( + c, "required_parameter", "backup_option", ParameterGuessType.PATH_GUESS + ) + assert c["required_parameter"] == "a" + c = { + "required_parameter": "a", + "guess_path_parameters": True, + "guess_section_parameters": False, + } + define_or_guess2( + c, "required_parameter", "backup_option", ParameterGuessType.SECTION_GUESS + ) + assert c["required_parameter"] == "a" + + c = { + "required_parameter": "a", + "guess_path_parameters": False, + "guess_section_parameters": True, + } + define_or_guess2( + c, "required_parameter", "backup_option", ParameterGuessType.PATH_GUESS + ) + assert c["required_parameter"] == "a" + c = { + "required_parameter": "a", + "guess_path_parameters": False, + "guess_section_parameters": True, + } + define_or_guess2( + c, "required_parameter", "backup_option", ParameterGuessType.SECTION_GUESS + ) + assert c["required_parameter"] == "a" + + # The required parameter is undefined + c = { + "required_parameter": "", + "guess_path_parameters": True, + "guess_section_parameters": True, + } + define_or_guess2( + c, "required_parameter", "backup_option", ParameterGuessType.PATH_GUESS + ) + assert c["required_parameter"] == "backup_option" + c = { + "required_parameter": "", + "guess_path_parameters": True, + "guess_section_parameters": True, + } + define_or_guess2( + c, "required_parameter", "backup_option", ParameterGuessType.SECTION_GUESS + ) + assert c["required_parameter"] == "backup_option" + + c = { + "required_parameter": "", + "guess_path_parameters": True, + "guess_section_parameters": False, + } + define_or_guess2( + c, "required_parameter", "backup_option", ParameterGuessType.PATH_GUESS + ) + assert c["required_parameter"] == "backup_option" + c = { + "required_parameter": "", + "guess_path_parameters": True, + "guess_section_parameters": False, + } + with pytest.raises(ParameterNotProvidedError): define_or_guess2( c, "required_parameter", "backup_option", ParameterGuessType.SECTION_GUESS ) - self.assertEqual(c["required_parameter"], "backup_option") - c = { - "required_parameter": "", - "guess_path_parameters": True, - "guess_section_parameters": False, - } + c = { + "required_parameter": "", + "guess_path_parameters": False, + "guess_section_parameters": True, + } + with pytest.raises(ParameterNotProvidedError): define_or_guess2( c, "required_parameter", "backup_option", ParameterGuessType.PATH_GUESS ) - self.assertEqual(c["required_parameter"], "backup_option") - c = { - "required_parameter": "", - "guess_path_parameters": True, - "guess_section_parameters": False, - } - self.assertRaises( - ParameterNotProvidedError, - define_or_guess2, - c, - "required_parameter", - "backup_option", - ParameterGuessType.SECTION_GUESS, - ) - - c = { - "required_parameter": "", - "guess_path_parameters": False, - "guess_section_parameters": True, - } - self.assertRaises( - ParameterNotProvidedError, - define_or_guess2, - c, - "required_parameter", - "backup_option", - ParameterGuessType.PATH_GUESS, - ) - c = { - "required_parameter": "", - "guess_path_parameters": False, - "guess_section_parameters": True, - } - define_or_guess2( - c, "required_parameter", "backup_option", ParameterGuessType.SECTION_GUESS - ) - self.assertEqual(c["required_parameter"], "backup_option") - - def test_check_parameter_defined(self): - c = {"a": 1, "b": 2, "c": ""} - check_parameter_defined(c, "a") - self.assertRaises(ParameterNotProvidedError, check_parameter_defined, c, "c") - self.assertRaises(ParameterNotProvidedError, check_parameter_defined, c, "d") - - def test_get_file_names(self): - bash, settings, status = get_file_names("script_dir", "prefix") - self.assertEqual(bash, "script_dir/prefix.bash") - self.assertEqual(settings, "script_dir/prefix.settings") - self.assertEqual(status, "script_dir/prefix.status") - - # def test_check_status - - # def test_make_executable - - def test_add_dependencies(self): - dependencies: List[str] = [] - add_dependencies(dependencies, "script_dir", "prefix", "sub", 1980, 1990, 10) - self.assertEqual(dependencies, ["script_dir/prefix_sub_1980-1989-0010.status"]) - - dependencies = [] - add_dependencies(dependencies, "script_dir", "prefix", "sub", 1980, 1990, 2) - expected = [ - "script_dir/prefix_sub_1980-1981-0002.status", - "script_dir/prefix_sub_1982-1983-0002.status", - "script_dir/prefix_sub_1984-1985-0002.status", - "script_dir/prefix_sub_1986-1987-0002.status", - "script_dir/prefix_sub_1988-1989-0002.status", - ] - self.assertEqual(dependencies, expected) - - # def test_write_settings_file - - # def test_submit_script - - # def test_print_url - - -if __name__ == "__main__": - unittest.main() + c = { + "required_parameter": "", + "guess_path_parameters": False, + "guess_section_parameters": True, + } + define_or_guess2( + c, "required_parameter", "backup_option", ParameterGuessType.SECTION_GUESS + ) + assert c["required_parameter"] == "backup_option" + + +def test_check_parameter_defined(): + c = {"a": 1, "b": 2, "c": ""} + check_parameter_defined(c, "a") + with pytest.raises(ParameterNotProvidedError): + check_parameter_defined(c, "c") + with pytest.raises(ParameterNotProvidedError): + check_parameter_defined(c, "d") + + +def test_get_file_names(): + bash, settings, status = get_file_names("script_dir", "prefix") + assert bash == "script_dir/prefix.bash" + assert settings == "script_dir/prefix.settings" + assert status == "script_dir/prefix.status" + + +def test_add_dependencies(): + dependencies: List[str] = [] + add_dependencies(dependencies, "script_dir", "prefix", "sub", 1980, 1990, 10) + assert dependencies == ["script_dir/prefix_sub_1980-1989-0010.status"] + + dependencies = [] + add_dependencies(dependencies, "script_dir", "prefix", "sub", 1980, 1990, 2) + expected = [ + "script_dir/prefix_sub_1980-1981-0002.status", + "script_dir/prefix_sub_1982-1983-0002.status", + "script_dir/prefix_sub_1984-1985-0002.status", + "script_dir/prefix_sub_1986-1987-0002.status", + "script_dir/prefix_sub_1988-1989-0002.status", + ] + assert dependencies == expected From 70db840d8d86cddfa845deb6e78759607c673b4a Mon Sep 17 00:00:00 2001 From: Ryan Forsyth Date: Thu, 21 Nov 2024 19:19:49 -0600 Subject: [PATCH 10/13] Add logger --- zppy/__main__.py | 11 ++++--- zppy/global_time_series.py | 13 +++++--- zppy/logger.py | 67 ++++++++++++++++++++++++++++++++++++++ zppy/utils.py | 10 ++++-- 4 files changed, 89 insertions(+), 12 deletions(-) create mode 100644 zppy/logger.py diff --git a/zppy/__main__.py b/zppy/__main__.py index a503d525..50e6d572 100644 --- a/zppy/__main__.py +++ b/zppy/__main__.py @@ -14,15 +14,18 @@ from zppy.e3sm_diags import e3sm_diags from zppy.global_time_series import global_time_series from zppy.ilamb import ilamb +from zppy.logger import _setup_custom_logger from zppy.mpas_analysis import mpas_analysis from zppy.tc_analysis import tc_analysis from zppy.ts import ts from zppy.utils import check_status, submit_script +logger = _setup_custom_logger(__name__) + def main(): args = _get_args() - print( + logger.info( "For help, please see https://e3sm-project.github.io/zppy. Ask questions at https://github.com/E3SM-Project/zppy/discussions/categories/q-a." ) # Subdirectory where templates are located @@ -98,7 +101,7 @@ def _handle_plugins( for plugin in plugins: # Read plugin 'default.ini' if it exists plugin_default_file = os.path.join(plugin["path"], "defaults/default.ini") - print(plugin_default_file) + logger.info(plugin_default_file) if os.path.isfile(plugin_default_file): with open(plugin_default_file) as f: default += "\n" + f.read() @@ -132,12 +135,12 @@ def _validate_config(config): result = config.validate(validator) if result is not True: - print("Validation results={}".format(result)) + logger.critical("Validation results={}".format(result)) raise ValueError( "Configuration file validation failed. Parameters listed as false in the validation results have invalid values." ) else: - print("Configuration file validation passed.") + logger.info("Configuration file validation passed.") def _get_machine_info(config: ConfigObj) -> MachineInfo: diff --git a/zppy/global_time_series.py b/zppy/global_time_series.py index 3e3fa96e..e6883c15 100644 --- a/zppy/global_time_series.py +++ b/zppy/global_time_series.py @@ -2,6 +2,7 @@ from typing import Any, Dict, List from zppy.bundle import handle_bundles +from zppy.logger import _setup_custom_logger from zppy.utils import ( add_dependencies, check_status, @@ -15,6 +16,8 @@ write_settings_file, ) +logger = _setup_custom_logger(__name__) + # ----------------------------------------------------------------------------- def global_time_series(config, script_dir, existing_bundles, job_ids_file): @@ -86,8 +89,9 @@ def global_time_series(config, script_dir, existing_bundles, job_ids_file): def determine_components(c: Dict[str, Any]) -> None: # Handle legacy parameter if c["plot_names"]: - print("warning: plot_names for global_time_series is deprecated.") - print("Setting plot_names will override the new parameter, plots_original.") + logger.warning( + "warning: plot_names for global_time_series is deprecated. Setting plot_names will override the new parameter, plots_original." + ) c["plots_original"] = c["plot_names"] # Determine which components are needed c["use_atm"] = False @@ -97,9 +101,8 @@ def determine_components(c: Dict[str, Any]) -> None: if c["plots_original"]: c["use_atm"] = True if c["atmosphere_only"]: - print("warning: atmosphere_only for global_time_series is deprecated.") - print( - "preferred method: remove the 3 ocean plots (change_ohc,max_moc,change_sea_level) from plots_original." + logger.warning( + "warning: atmosphere_only for global_time_series is deprecated. Preferred method: remove the 3 ocean plots (change_ohc,max_moc,change_sea_level) from plots_original." ) has_original_ocn_plots = ( ("change_ohc" in c["plots_original"]) diff --git a/zppy/logger.py b/zppy/logger.py new file mode 100644 index 00000000..58e361ce --- /dev/null +++ b/zppy/logger.py @@ -0,0 +1,67 @@ +"""Logger module for setting up a logger. Based on xcdat/xcdat/_logger.py""" + +import logging +import logging.handlers + +# Logging module setup +log_format = ( + "%(asctime)s [%(levelname)s]: %(filename)s(%(funcName)s:%(lineno)s) >> %(message)s" +) +logging.basicConfig(format=log_format, filemode="w", level=logging.INFO) + +# Console handler setup +console_handler = logging.StreamHandler() +console_handler.setLevel(logging.INFO) +logFormatter = logging.Formatter(log_format) +console_handler.setFormatter(logFormatter) +logging.getLogger().addHandler(console_handler) + + +def _setup_custom_logger(name, propagate=True) -> logging.Logger: + """Sets up a custom logger. + + Documentation on logging: https://docs.python.org/3/library/logging.html + + Parameters + ---------- + name : str + Name of the file where this function is called. + propagate : bool, optional + Whether to propagate logger messages or not, by default False + + Returns + ------- + logging.Logger + The logger. + + Examples + --------- + Available levels: https://docs.python.org/3/library/logging.html#levels + + Detailed information, typically of interest only when diagnosing problems: + + >>> logger.debug("") + + Confirmation that things are working as expected: + + >>> logger.info("") + + An indication that something unexpected happened, or indicative of some + problem in the near future: + + >>> logger.warning("") + + The software has not been able to perform some function due to a more + serious problem: + + >>> logger.error("") + + A serious error, indicating that the program itself may be unable to + continue running: + + >>> logger.critical("") + """ + logger = logging.getLogger(name) + logger.propagate = propagate + + return logger diff --git a/zppy/utils.py b/zppy/utils.py index fe62014f..83cb32be 100644 --- a/zppy/utils.py +++ b/zppy/utils.py @@ -12,6 +12,10 @@ import jinja2 from configobj import ConfigObj +from zppy.logger import _setup_custom_logger + +logger = _setup_custom_logger(__name__) + # Classes ##################################################################### class ParameterGuessType(Enum): @@ -439,9 +443,9 @@ def submit_script( print(f"...{out}") if status != 0 or not out.startswith("Submitted batch job"): error_str = f"Problem submitting script {script_file}" - print(error_str) - print(command) - print(stderr) + logger.critical(error_str) + logger.critical(command) + logger.critical(stderr) raise RuntimeError(error_str) jobid = int(out.split()[-1]) with open(job_ids_file, "a") as j: From cc533fe23fe39352b94a002d4d0472d79383f02e Mon Sep 17 00:00:00 2001 From: Ryan Forsyth Date: Thu, 21 Nov 2024 20:02:54 -0600 Subject: [PATCH 11/13] Update --- .github/workflows/build_workflow.yml | 2 +- .../test_min_case_global_time_series_custom_chrysalis.cfg | 2 +- .../test_min_case_global_time_series_original_8_chrysalis.cfg | 2 +- ..._min_case_global_time_series_original_8_no_ocn_chrysalis.cfg | 2 +- tests/integration/generated/test_weekly_bundles_chrysalis.cfg | 2 +- .../generated/test_weekly_comprehensive_v2_chrysalis.cfg | 2 +- .../generated/test_weekly_comprehensive_v3_chrysalis.cfg | 2 +- tests/integration/utils.py | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build_workflow.yml b/.github/workflows/build_workflow.yml index db7680ff..b78d5ff5 100644 --- a/.github/workflows/build_workflow.yml +++ b/.github/workflows/build_workflow.yml @@ -92,7 +92,7 @@ jobs: # Does not run the integration tests, which require server access - name: Run Unit Tests run: | - python -m unittest tests/test_*.py + pytest tests/test_*.py # If the branch updates documentation, then the docs will need to be updated. publish-docs: diff --git a/tests/integration/generated/test_min_case_global_time_series_custom_chrysalis.cfg b/tests/integration/generated/test_min_case_global_time_series_custom_chrysalis.cfg index 650b63d4..9c613864 100644 --- a/tests/integration/generated/test_min_case_global_time_series_custom_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_global_time_series_custom_chrysalis.cfg @@ -34,7 +34,7 @@ years = "1985:1995:5", [global_time_series] active = True -environment_commands = "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate zppy_interfaces_dev_pr_1_20241121v2" +environment_commands = "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate zppy_interfaces_dev_pr_1_20241121v4" experiment_name = "v3.LR.historical_0051" figstr = "v3.LR.historical_0051" plots_original="" diff --git a/tests/integration/generated/test_min_case_global_time_series_original_8_chrysalis.cfg b/tests/integration/generated/test_min_case_global_time_series_original_8_chrysalis.cfg index a17b8109..e97194b8 100644 --- a/tests/integration/generated/test_min_case_global_time_series_original_8_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_global_time_series_original_8_chrysalis.cfg @@ -40,7 +40,7 @@ walltime = "00:30:00" [global_time_series] active = True climo_years = "1985-1989", "1990-1995", -environment_commands = "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate zppy_interfaces_dev_pr_1_20241121v2" +environment_commands = "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate zppy_interfaces_dev_pr_1_20241121v4" experiment_name = "v3.LR.historical_0051" figstr = "v3.LR.historical_0051" moc_file=mocTimeSeries_1985-1995.nc diff --git a/tests/integration/generated/test_min_case_global_time_series_original_8_no_ocn_chrysalis.cfg b/tests/integration/generated/test_min_case_global_time_series_original_8_no_ocn_chrysalis.cfg index 899a2f8b..60eb5410 100644 --- a/tests/integration/generated/test_min_case_global_time_series_original_8_no_ocn_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_global_time_series_original_8_no_ocn_chrysalis.cfg @@ -26,7 +26,7 @@ walltime = "00:30:00" [global_time_series] active = True -environment_commands = "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate zppy_interfaces_dev_pr_1_20241121v2" +environment_commands = "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate zppy_interfaces_dev_pr_1_20241121v4" experiment_name = "v3.LR.historical_0051" figstr = "v3.LR.historical_0051" plots_original="net_toa_flux_restom,global_surface_air_temperature,toa_radiation,net_atm_energy_imbalance,net_atm_water_imbalance" diff --git a/tests/integration/generated/test_weekly_bundles_chrysalis.cfg b/tests/integration/generated/test_weekly_bundles_chrysalis.cfg index 529711c8..231dd0f2 100644 --- a/tests/integration/generated/test_weekly_bundles_chrysalis.cfg +++ b/tests/integration/generated/test_weekly_bundles_chrysalis.cfg @@ -141,7 +141,7 @@ years = "1985:1989:2", [global_time_series] active = True bundle = "bundle2" -environment_commands = "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate zppy_interfaces_dev_pr_1_20241121v2" +environment_commands = "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate zppy_interfaces_dev_pr_1_20241121v4" experiment_name = "v3.LR.historical_0051" figstr = "v3.LR.historical_0051" plots_original="net_toa_flux_restom,global_surface_air_temperature,toa_radiation,net_atm_energy_imbalance,net_atm_water_imbalance" diff --git a/tests/integration/generated/test_weekly_comprehensive_v2_chrysalis.cfg b/tests/integration/generated/test_weekly_comprehensive_v2_chrysalis.cfg index 8ef97afe..c3ad2161 100644 --- a/tests/integration/generated/test_weekly_comprehensive_v2_chrysalis.cfg +++ b/tests/integration/generated/test_weekly_comprehensive_v2_chrysalis.cfg @@ -168,7 +168,7 @@ walltime = "00:30:00" [global_time_series] active = True climo_years ="1980-1984", "1985-1990", -environment_commands = "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate zppy_interfaces_dev_pr_1_20241121v2" +environment_commands = "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate zppy_interfaces_dev_pr_1_20241121v4" experiment_name = "v2.LR.historical_0201" figstr = "v2.LR.historical_0201" moc_file=mocTimeSeries_1980-1990.nc diff --git a/tests/integration/generated/test_weekly_comprehensive_v3_chrysalis.cfg b/tests/integration/generated/test_weekly_comprehensive_v3_chrysalis.cfg index 139347b1..94f0e1b1 100644 --- a/tests/integration/generated/test_weekly_comprehensive_v3_chrysalis.cfg +++ b/tests/integration/generated/test_weekly_comprehensive_v3_chrysalis.cfg @@ -196,7 +196,7 @@ walltime = "00:30:00" [global_time_series] active = True climo_years = "1985-1989", "1990-1995", -environment_commands = "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate zppy_interfaces_dev_pr_1_20241121v2" +environment_commands = "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate zppy_interfaces_dev_pr_1_20241121v4" experiment_name = "v3.LR.historical_0051" figstr = "v3.LR.historical_0051" moc_file=mocTimeSeries_1985-1995.nc diff --git a/tests/integration/utils.py b/tests/integration/utils.py index 1390d206..4079ea18 100644 --- a/tests/integration/utils.py +++ b/tests/integration/utils.py @@ -153,7 +153,7 @@ def get_chyrsalis_expansions(config): "e3sm_to_cmip_environment_commands": "", "environment_commands_test": "", "expected_dir": "/lcrc/group/e3sm/public_html/zppy_test_resources/", - "global_time_series_environment_commands": "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate zppy_interfaces_dev_pr_1_20241121v2", + "global_time_series_environment_commands": "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate zppy_interfaces_dev_pr_1_20241121v4", "mpas_analysis_walltime": "00:30:00", "partition_long": "compute", "partition_short": "debug", From be06191d3de8e956476c771da5e5c00f0dbf76a8 Mon Sep 17 00:00:00 2001 From: Ryan Forsyth Date: Fri, 22 Nov 2024 14:06:30 -0600 Subject: [PATCH 12/13] Add lat_lon_conus cfg to inclusions --- docs/source/post.rrm_simulation.cfg | 2 +- .../inclusions}/e3sm_diags/lat_lon_conus.cfg | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename zppy/{examples => templates/inclusions}/e3sm_diags/lat_lon_conus.cfg (100%) diff --git a/docs/source/post.rrm_simulation.cfg b/docs/source/post.rrm_simulation.cfg index e63c34c4..8351bc81 100644 --- a/docs/source/post.rrm_simulation.cfg +++ b/docs/source/post.rrm_simulation.cfg @@ -59,7 +59,7 @@ years = "1:60:20", [[conus_0.23x0.31_aave]] grid = 'conus_0.23x0.31_aave' sets = 'lat_lon', - cfg = "e3sm_diags/lat_lon_conus.cfg" + cfg = "inclusions/e3sm_diags/lat_lon_conus.cfg" # Built-in cfg for users to use [mpas_analysis] active = False diff --git a/zppy/examples/e3sm_diags/lat_lon_conus.cfg b/zppy/templates/inclusions/e3sm_diags/lat_lon_conus.cfg similarity index 100% rename from zppy/examples/e3sm_diags/lat_lon_conus.cfg rename to zppy/templates/inclusions/e3sm_diags/lat_lon_conus.cfg From dbd74f3130f96c6ddf31cc07cf536bd7c03c615e Mon Sep 17 00:00:00 2001 From: Ryan Forsyth Date: Fri, 22 Nov 2024 14:22:52 -0600 Subject: [PATCH 13/13] Exclude explicit conda paths and names --- .../test_min_case_add_dependencies_chrysalis.cfg | 2 +- ...est_min_case_carryover_dependencies_chrysalis.cfg | 2 +- ...min_case_e3sm_diags_depend_on_climo_chrysalis.cfg | 2 +- ...se_e3sm_diags_depend_on_climo_mvm_2_chrysalis.cfg | 2 +- ...st_min_case_e3sm_diags_depend_on_ts_chrysalis.cfg | 2 +- ..._case_e3sm_diags_depend_on_ts_mvm_2_chrysalis.cfg | 2 +- ...t_min_case_e3sm_diags_diurnal_cycle_chrysalis.cfg | 2 +- ...case_e3sm_diags_diurnal_cycle_mvm_2_chrysalis.cfg | 2 +- ..._case_e3sm_diags_lat_lon_land_mvm_2_chrysalis.cfg | 2 +- ...test_min_case_e3sm_diags_streamflow_chrysalis.cfg | 2 +- ...in_case_e3sm_diags_streamflow_mvm_2_chrysalis.cfg | 2 +- ...est_min_case_e3sm_diags_tc_analysis_chrysalis.cfg | 2 +- ...n_case_e3sm_diags_tc_analysis_mvm_2_chrysalis.cfg | 2 +- ...ase_e3sm_diags_tc_analysis_parallel_chrysalis.cfg | 2 +- ...sm_diags_tropical_subseasonal_mvm_2_chrysalis.cfg | 2 +- ..._min_case_global_time_series_custom_chrysalis.cfg | 2 +- ..._case_global_time_series_original_8_chrysalis.cfg | 2 +- ...lobal_time_series_original_8_no_ocn_chrysalis.cfg | 2 +- .../generated/test_weekly_bundles_chrysalis.cfg | 4 ++-- .../test_weekly_comprehensive_v2_chrysalis.cfg | 4 ++-- .../test_weekly_comprehensive_v3_chrysalis.cfg | 4 ++-- tests/integration/utils.py | 12 ++++++------ 22 files changed, 30 insertions(+), 30 deletions(-) diff --git a/tests/integration/generated/test_min_case_add_dependencies_chrysalis.cfg b/tests/integration/generated/test_min_case_add_dependencies_chrysalis.cfg index 2656fa7a..dc36251b 100644 --- a/tests/integration/generated/test_min_case_add_dependencies_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_add_dependencies_chrysalis.cfg @@ -81,7 +81,7 @@ years = "1985:1995:5" [e3sm_diags] active = True -environment_commands = "source /home/ac.forsyth2/miniconda3/etc/profile.d/conda.sh; conda activate e3sm_diags_20241015" +environment_commands = "source /conda.sh; conda activate " grid = '180x360_aave' multiprocessing = True num_workers = 8 diff --git a/tests/integration/generated/test_min_case_carryover_dependencies_chrysalis.cfg b/tests/integration/generated/test_min_case_carryover_dependencies_chrysalis.cfg index 721faaf9..bdb4ab8f 100644 --- a/tests/integration/generated/test_min_case_carryover_dependencies_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_carryover_dependencies_chrysalis.cfg @@ -111,7 +111,7 @@ walltime = "00:30:00" [e3sm_diags] active = True -environment_commands = "source /home/ac.forsyth2/miniconda3/etc/profile.d/conda.sh; conda activate e3sm_diags_20241015" +environment_commands = "source /conda.sh; conda activate " grid = '180x360_aave' multiprocessing = True num_workers = 8 diff --git a/tests/integration/generated/test_min_case_e3sm_diags_depend_on_climo_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_depend_on_climo_chrysalis.cfg index e8b4b4e0..c8d1a9bc 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_depend_on_climo_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_depend_on_climo_chrysalis.cfg @@ -24,7 +24,7 @@ walltime = "00:30:00" [e3sm_diags] active = True -environment_commands = "source /home/ac.forsyth2/miniconda3/etc/profile.d/conda.sh; conda activate e3sm_diags_20241015" +environment_commands = "source /conda.sh; conda activate " grid = '180x360_aave' multiprocessing = True num_workers = 8 diff --git a/tests/integration/generated/test_min_case_e3sm_diags_depend_on_climo_mvm_2_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_depend_on_climo_mvm_2_chrysalis.cfg index 06e067dc..2a56fbf8 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_depend_on_climo_mvm_2_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_depend_on_climo_mvm_2_chrysalis.cfg @@ -24,7 +24,7 @@ walltime = "00:30:00" [e3sm_diags] active = True -environment_commands = "source /home/ac.forsyth2/miniconda3/etc/profile.d/conda.sh; conda activate e3sm_diags_20241015" +environment_commands = "source /conda.sh; conda activate " grid = '180x360_aave' multiprocessing = True num_workers = 8 diff --git a/tests/integration/generated/test_min_case_e3sm_diags_depend_on_ts_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_depend_on_ts_chrysalis.cfg index 9e47abd2..6678e040 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_depend_on_ts_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_depend_on_ts_chrysalis.cfg @@ -25,7 +25,7 @@ walltime = "00:30:00" [e3sm_diags] active = True -environment_commands = "source /home/ac.forsyth2/miniconda3/etc/profile.d/conda.sh; conda activate e3sm_diags_20241015" +environment_commands = "source /conda.sh; conda activate " grid = '180x360_aave' multiprocessing = True num_workers = 8 diff --git a/tests/integration/generated/test_min_case_e3sm_diags_depend_on_ts_mvm_2_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_depend_on_ts_mvm_2_chrysalis.cfg index cc085aa1..bb57d3a1 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_depend_on_ts_mvm_2_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_depend_on_ts_mvm_2_chrysalis.cfg @@ -25,7 +25,7 @@ walltime = "00:30:00" [e3sm_diags] active = True -environment_commands = "source /home/ac.forsyth2/miniconda3/etc/profile.d/conda.sh; conda activate e3sm_diags_20241015" +environment_commands = "source /conda.sh; conda activate " grid = '180x360_aave' multiprocessing = True num_workers = 8 diff --git a/tests/integration/generated/test_min_case_e3sm_diags_diurnal_cycle_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_diurnal_cycle_chrysalis.cfg index 11e9983f..748883de 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_diurnal_cycle_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_diurnal_cycle_chrysalis.cfg @@ -24,7 +24,7 @@ walltime = "00:30:00" [e3sm_diags] active = True -environment_commands = "source /home/ac.forsyth2/miniconda3/etc/profile.d/conda.sh; conda activate e3sm_diags_20241015" +environment_commands = "source /conda.sh; conda activate " grid = '180x360_aave' multiprocessing = True num_workers = 8 diff --git a/tests/integration/generated/test_min_case_e3sm_diags_diurnal_cycle_mvm_2_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_diurnal_cycle_mvm_2_chrysalis.cfg index 251d82c3..4d7985f5 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_diurnal_cycle_mvm_2_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_diurnal_cycle_mvm_2_chrysalis.cfg @@ -24,7 +24,7 @@ walltime = "00:30:00" [e3sm_diags] active = True -environment_commands = "source /home/ac.forsyth2/miniconda3/etc/profile.d/conda.sh; conda activate e3sm_diags_20241015" +environment_commands = "source /conda.sh; conda activate " grid = '180x360_aave' multiprocessing = True num_workers = 8 diff --git a/tests/integration/generated/test_min_case_e3sm_diags_lat_lon_land_mvm_2_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_lat_lon_land_mvm_2_chrysalis.cfg index 723e6c43..8c71b45d 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_lat_lon_land_mvm_2_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_lat_lon_land_mvm_2_chrysalis.cfg @@ -24,7 +24,7 @@ walltime = "00:30:00" [e3sm_diags] active = True -environment_commands = "source /home/ac.forsyth2/miniconda3/etc/profile.d/conda.sh; conda activate e3sm_diags_20241015" +environment_commands = "source /conda.sh; conda activate " grid = '180x360_aave' multiprocessing = True num_workers = 8 diff --git a/tests/integration/generated/test_min_case_e3sm_diags_streamflow_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_streamflow_chrysalis.cfg index 9a82f303..5bfa9302 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_streamflow_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_streamflow_chrysalis.cfg @@ -27,7 +27,7 @@ walltime = "00:30:00" [e3sm_diags] active = True -environment_commands = "source /home/ac.forsyth2/miniconda3/etc/profile.d/conda.sh; conda activate e3sm_diags_20241015" +environment_commands = "source /conda.sh; conda activate " grid = '180x360_aave' multiprocessing = True num_workers = 8 diff --git a/tests/integration/generated/test_min_case_e3sm_diags_streamflow_mvm_2_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_streamflow_mvm_2_chrysalis.cfg index 147d851f..4f2f099e 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_streamflow_mvm_2_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_streamflow_mvm_2_chrysalis.cfg @@ -27,7 +27,7 @@ walltime = "00:30:00" [e3sm_diags] active = True -environment_commands = "source /home/ac.forsyth2/miniconda3/etc/profile.d/conda.sh; conda activate e3sm_diags_20241015" +environment_commands = "source /conda.sh; conda activate " grid = '180x360_aave' multiprocessing = True num_workers = 8 diff --git a/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_chrysalis.cfg index df05210a..959cc56d 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_chrysalis.cfg @@ -19,7 +19,7 @@ walltime = "00:30:00" [e3sm_diags] active = True -environment_commands = "source /home/ac.forsyth2/miniconda3/etc/profile.d/conda.sh; conda activate e3sm_diags_20241015" +environment_commands = "source /conda.sh; conda activate " grid = '180x360_aave' multiprocessing = True num_workers = 8 diff --git a/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_mvm_2_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_mvm_2_chrysalis.cfg index a226f2ef..870698f2 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_mvm_2_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_mvm_2_chrysalis.cfg @@ -20,7 +20,7 @@ walltime = "00:30:00" [e3sm_diags] active = True -environment_commands = "source /home/ac.forsyth2/miniconda3/etc/profile.d/conda.sh; conda activate e3sm_diags_20241015" +environment_commands = "source /conda.sh; conda activate " grid = '180x360_aave' multiprocessing = True num_workers = 8 diff --git a/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_parallel_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_parallel_chrysalis.cfg index c3a7e505..d3eacc6e 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_parallel_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_tc_analysis_parallel_chrysalis.cfg @@ -19,7 +19,7 @@ walltime = "00:30:00" [e3sm_diags] active = True -environment_commands = "source /home/ac.forsyth2/miniconda3/etc/profile.d/conda.sh; conda activate e3sm_diags_20241015" +environment_commands = "source /conda.sh; conda activate " grid = '180x360_aave' multiprocessing = True num_workers = 8 diff --git a/tests/integration/generated/test_min_case_e3sm_diags_tropical_subseasonal_mvm_2_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_tropical_subseasonal_mvm_2_chrysalis.cfg index 233569cc..27a64582 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_tropical_subseasonal_mvm_2_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_tropical_subseasonal_mvm_2_chrysalis.cfg @@ -25,7 +25,7 @@ walltime = "00:30:00" [e3sm_diags] active = True -environment_commands = "source /home/ac.forsyth2/miniconda3/etc/profile.d/conda.sh; conda activate e3sm_diags_20241015" +environment_commands = "source /conda.sh; conda activate " grid = '180x360_aave' multiprocessing = True num_workers = 8 diff --git a/tests/integration/generated/test_min_case_global_time_series_custom_chrysalis.cfg b/tests/integration/generated/test_min_case_global_time_series_custom_chrysalis.cfg index 9c613864..e29f01bb 100644 --- a/tests/integration/generated/test_min_case_global_time_series_custom_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_global_time_series_custom_chrysalis.cfg @@ -34,7 +34,7 @@ years = "1985:1995:5", [global_time_series] active = True -environment_commands = "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate zppy_interfaces_dev_pr_1_20241121v4" +environment_commands = "source /conda.sh; conda activate " experiment_name = "v3.LR.historical_0051" figstr = "v3.LR.historical_0051" plots_original="" diff --git a/tests/integration/generated/test_min_case_global_time_series_original_8_chrysalis.cfg b/tests/integration/generated/test_min_case_global_time_series_original_8_chrysalis.cfg index e97194b8..f9346e33 100644 --- a/tests/integration/generated/test_min_case_global_time_series_original_8_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_global_time_series_original_8_chrysalis.cfg @@ -40,7 +40,7 @@ walltime = "00:30:00" [global_time_series] active = True climo_years = "1985-1989", "1990-1995", -environment_commands = "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate zppy_interfaces_dev_pr_1_20241121v4" +environment_commands = "source /conda.sh; conda activate " experiment_name = "v3.LR.historical_0051" figstr = "v3.LR.historical_0051" moc_file=mocTimeSeries_1985-1995.nc diff --git a/tests/integration/generated/test_min_case_global_time_series_original_8_no_ocn_chrysalis.cfg b/tests/integration/generated/test_min_case_global_time_series_original_8_no_ocn_chrysalis.cfg index 60eb5410..f3bea41f 100644 --- a/tests/integration/generated/test_min_case_global_time_series_original_8_no_ocn_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_global_time_series_original_8_no_ocn_chrysalis.cfg @@ -26,7 +26,7 @@ walltime = "00:30:00" [global_time_series] active = True -environment_commands = "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate zppy_interfaces_dev_pr_1_20241121v4" +environment_commands = "source /conda.sh; conda activate " experiment_name = "v3.LR.historical_0051" figstr = "v3.LR.historical_0051" plots_original="net_toa_flux_restom,global_surface_air_temperature,toa_radiation,net_atm_energy_imbalance,net_atm_water_imbalance" diff --git a/tests/integration/generated/test_weekly_bundles_chrysalis.cfg b/tests/integration/generated/test_weekly_bundles_chrysalis.cfg index 231dd0f2..942dbfa4 100644 --- a/tests/integration/generated/test_weekly_bundles_chrysalis.cfg +++ b/tests/integration/generated/test_weekly_bundles_chrysalis.cfg @@ -104,7 +104,7 @@ years = "1985:1989:2", [e3sm_diags] active = True -environment_commands = "source /home/ac.forsyth2/miniconda3/etc/profile.d/conda.sh; conda activate e3sm_diags_20241015" +environment_commands = "source /conda.sh; conda activate " grid = '180x360_aave' ref_final_yr = 1989 ref_start_yr = 1985 @@ -141,7 +141,7 @@ years = "1985:1989:2", [global_time_series] active = True bundle = "bundle2" -environment_commands = "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate zppy_interfaces_dev_pr_1_20241121v4" +environment_commands = "source /conda.sh; conda activate " experiment_name = "v3.LR.historical_0051" figstr = "v3.LR.historical_0051" plots_original="net_toa_flux_restom,global_surface_air_temperature,toa_radiation,net_atm_energy_imbalance,net_atm_water_imbalance" diff --git a/tests/integration/generated/test_weekly_comprehensive_v2_chrysalis.cfg b/tests/integration/generated/test_weekly_comprehensive_v2_chrysalis.cfg index c3ad2161..9050d5da 100644 --- a/tests/integration/generated/test_weekly_comprehensive_v2_chrysalis.cfg +++ b/tests/integration/generated/test_weekly_comprehensive_v2_chrysalis.cfg @@ -93,7 +93,7 @@ walltime = "00:30:00" active = True climo_diurnal_frequency = "diurnal_8xdaily" climo_diurnal_subsection = "atm_monthly_diurnal_8xdaily_180x360_aave" -environment_commands = "source /home/ac.forsyth2/miniconda3/etc/profile.d/conda.sh; conda activate e3sm_diags_20241015" +environment_commands = "source /conda.sh; conda activate " grid = '180x360_aave' multiprocessing = True num_workers = 8 @@ -168,7 +168,7 @@ walltime = "00:30:00" [global_time_series] active = True climo_years ="1980-1984", "1985-1990", -environment_commands = "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate zppy_interfaces_dev_pr_1_20241121v4" +environment_commands = "source /conda.sh; conda activate " experiment_name = "v2.LR.historical_0201" figstr = "v2.LR.historical_0201" moc_file=mocTimeSeries_1980-1990.nc diff --git a/tests/integration/generated/test_weekly_comprehensive_v3_chrysalis.cfg b/tests/integration/generated/test_weekly_comprehensive_v3_chrysalis.cfg index 94f0e1b1..88aece15 100644 --- a/tests/integration/generated/test_weekly_comprehensive_v3_chrysalis.cfg +++ b/tests/integration/generated/test_weekly_comprehensive_v3_chrysalis.cfg @@ -99,7 +99,7 @@ active = True climo_diurnal_frequency = "diurnal_8xdaily" climo_diurnal_subsection = "atm_monthly_diurnal_8xdaily_180x360_aave" climo_subsection = "atm_monthly_180x360_aave" -environment_commands = "source /home/ac.forsyth2/miniconda3/etc/profile.d/conda.sh; conda activate e3sm_diags_20241015" +environment_commands = "source /conda.sh; conda activate " grid = '180x360_aave' multiprocessing = True num_workers = 8 @@ -196,7 +196,7 @@ walltime = "00:30:00" [global_time_series] active = True climo_years = "1985-1989", "1990-1995", -environment_commands = "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate zppy_interfaces_dev_pr_1_20241121v4" +environment_commands = "source /conda.sh; conda activate " experiment_name = "v3.LR.historical_0051" figstr = "v3.LR.historical_0051" moc_file=mocTimeSeries_1985-1995.nc diff --git a/tests/integration/utils.py b/tests/integration/utils.py index 4079ea18..7d47c49d 100644 --- a/tests/integration/utils.py +++ b/tests/integration/utils.py @@ -148,12 +148,12 @@ def get_chyrsalis_expansions(config): "constraint": "", # To run this test, replace conda environment with your e3sm_diags dev environment # To use default environment_commands, set to "" - "diags_environment_commands": "source /home/ac.forsyth2/miniconda3/etc/profile.d/conda.sh; conda activate e3sm_diags_20241015", + "diags_environment_commands": "source /conda.sh; conda activate ", "diags_walltime": "5:00:00", "e3sm_to_cmip_environment_commands": "", "environment_commands_test": "", "expected_dir": "/lcrc/group/e3sm/public_html/zppy_test_resources/", - "global_time_series_environment_commands": "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate zppy_interfaces_dev_pr_1_20241121v4", + "global_time_series_environment_commands": "source /conda.sh; conda activate ", "mpas_analysis_walltime": "00:30:00", "partition_long": "compute", "partition_short": "debug", @@ -178,12 +178,12 @@ def get_compy_expansions(config): "constraint": "", # To run this test, replace conda environment with your e3sm_diags dev environment # To use default environment_commands, set to "" - "diags_environment_commands": "source /qfs/people/fors729/mambaforge/etc/profile.d/conda.sh; conda activate e3sm_diags_20240328", + "diags_environment_commands": "source /conda.sh; conda activate ", "diags_walltime": "03:00:00", "e3sm_to_cmip_environment_commands": "", "environment_commands_test": "", "expected_dir": "/compyfs/www/zppy_test_resources/", - "global_time_series_environment_commands": "", + "global_time_series_environment_commands": "source /conda.sh; conda activate ", "mpas_analysis_walltime": "00:30:00", "partition_long": "slurm", "partition_short": "short", @@ -208,12 +208,12 @@ def get_perlmutter_expansions(config): "constraint": "cpu", # To run this test, replace conda environment with your e3sm_diags dev environment # To use default environment_commands, set to "" - "diags_environment_commands": "source /global/homes/f/forsyth/miniconda3/etc/profile.d/conda.sh; conda activate e3sm_diags_20240429", + "diags_environment_commands": "source /conda.sh; conda activate ", "diags_walltime": "6:00:00", "e3sm_to_cmip_environment_commands": "", "environment_commands_test": "", "expected_dir": "/global/cfs/cdirs/e3sm/www/zppy_test_resources/", - "global_time_series_environment_commands": "", + "global_time_series_environment_commands": "source /conda.sh; conda activate ", "mpas_analysis_walltime": "01:00:00", "partition_long": "", "partition_short": "",