Skip to content

Commit

Permalink
Remove deprecated parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
forsyth2 committed Dec 18, 2024
1 parent 87c9e54 commit c59e4ca
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"color": "Blue",
"ts_num_years": "5",
"plots_original": "None",
"atmosphere_only": "False",
"plots_atm": "TREFHT,AODDUST",
"plots_ice": "None",
"plots_lnd": "FSH,RH2M,LAISHA,LAISUN,QINTR,QOVER,QRUNOFF,QSOIL,QVEGE,QVEGT,SOILWATER_10CM,TSA,H2OSNO,TOTLITC,CWDC,SOIL1C,SOIL2C,SOIL3C,SOIL4C,WOOD_HARVESTC,TOTVEGC,NBP,GPP,AR,HR",
Expand All @@ -47,7 +46,6 @@
"color": "Blue",
"ts_num_years": "5",
"plots_original": "net_toa_flux_restom,global_surface_air_temperature,toa_radiation,net_atm_energy_imbalance,net_atm_water_imbalance",
"atmosphere_only": "True",
"plots_atm": "None",
"plots_ice": "None",
"plots_lnd": "None",
Expand All @@ -73,7 +71,6 @@
"color": "Blue",
"ts_num_years": "5",
"plots_original": "net_toa_flux_restom,global_surface_air_temperature,toa_radiation,net_atm_energy_imbalance,change_ohc,max_moc,change_sea_level,net_atm_water_imbalance",
"atmosphere_only": "False",
"plots_atm": "None",
"plots_ice": "None",
"plots_lnd": "None",
Expand All @@ -99,7 +96,6 @@
"color": "Blue",
"ts_num_years": "5",
"plots_original": "net_toa_flux_restom,global_surface_air_temperature,toa_radiation,net_atm_energy_imbalance,change_ohc,max_moc,change_sea_level,net_atm_water_imbalance",
"atmosphere_only": "False",
"plots_atm": "None",
"plots_ice": "None",
"plots_lnd": "FSH,RH2M,LAISHA,LAISUN,QINTR,QOVER,QRUNOFF,QSOIL,QVEGE,QVEGT,SOILWATER_10CM,TSA,H2OSNO,TOTLITC,CWDC,SOIL1C,SOIL2C,SOIL3C,SOIL4C,WOOD_HARVESTC,TOTVEGC,NBP,GPP,AR,HR",
Expand Down
19 changes: 0 additions & 19 deletions tests/unit/global_time_series/test_global_time_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ def test_Parameters_and_related_functions():
"color": "Blue",
"ts_num_years": "5",
"plots_original": "None",
"atmosphere_only": "False",
"plots_atm": "TREFHT",
"plots_ice": "None",
"plots_lnd": "FSH,RH2M,LAISHA,LAISUN,QINTR,QOVER,QRUNOFF,QSOIL,QVEGE,QVEGT,SOILWATER_10CM,TSA,H2OSNO,TOTLITC,CWDC,SOIL1C,SOIL2C,SOIL3C,SOIL4C,WOOD_HARVESTC,TOTVEGC,NBP,GPP,AR,HR",
Expand All @@ -98,7 +97,6 @@ def test_Parameters_and_related_functions():
assert parameters.color == "Blue"
assert parameters.ts_num_years_str == "5"
assert parameters.plots_original == []
assert parameters.atmosphere_only == False # noqa: E712
assert parameters.plots_atm == ["TREFHT"]
assert parameters.plots_ice == []
assert parameters.plots_lnd == [
Expand Down Expand Up @@ -192,23 +190,6 @@ def test_Parameters_and_related_functions():
"color": "Blue",
}
assert exps[0] == expected
# Change up parameters
parameters.atmosphere_only = True
exps = get_exps(parameters)
assert len(exps) == 1
expected = {
"atmos": "/lcrc/group/e3sm/ac.forsyth2/zppy_min_case_global_time_series_single_plots_output/test-616-20240930/v3.LR.historical_0051/post/atm/glb/ts/monthly/5yr/",
"ice": "",
"land": "",
"ocean": "",
"moc": "",
"vol": "",
"name": "v3.LR.historical_0051",
"yoffset": 0.0,
"yr": ([1985, 1989],),
"color": "Blue",
}
assert exps[0] == expected


def test_Variable():
Expand Down
1 change: 0 additions & 1 deletion zppy_interfaces/global_time_series/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ def _get_args() -> Parameters:
parser.add_argument("--color", type=str, help="Color")
parser.add_argument("--ts_num_years", type=str, help="Time series number of years")
parser.add_argument("--plots_original", type=str, help="Plots original")
parser.add_argument("--atmosphere_only", type=str, help="Atmosphere only")
parser.add_argument("--plots_atm", type=str, help="Plots atmosphere")
parser.add_argument("--plots_ice", type=str, help="Plots ice")
parser.add_argument("--plots_lnd", type=str, help="Plots land")
Expand Down
4 changes: 1 addition & 3 deletions zppy_interfaces/global_time_series/coupled_global.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,7 @@ def get_exps(parameters: Parameters) -> List[Dict[str, Any]]:
parameters.plots_original
)
has_original_ocn_plots: bool = set_intersection != set()
use_ocn: bool = (parameters.plots_ocn != []) or (
(not parameters.atmosphere_only) and has_original_ocn_plots
)
use_ocn: bool = (parameters.plots_ocn != []) or has_original_ocn_plots
ocean_dir = get_data_dir(parameters, "ocn", use_ocn)
exps: List[Dict[str, Any]] = [
{
Expand Down
1 change: 0 additions & 1 deletion zppy_interfaces/global_time_series/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ def __init__(self, args: Dict[str, str]):
self.color: str = args["color"]
self.ts_num_years_str: str = args["ts_num_years"]
self.plots_original: List[str] = param_get_list(args["plots_original"])
self.atmosphere_only: bool = _str2bool(args["atmosphere_only"])
self.plots_atm: List[str] = param_get_list(args["plots_atm"])
self.plots_ice: List[str] = param_get_list(args["plots_ice"])
self.plots_lnd: List[str] = param_get_list(args["plots_lnd"])
Expand Down

0 comments on commit c59e4ca

Please sign in to comment.