Skip to content

Commit

Permalink
comment out 91 test
Browse files Browse the repository at this point in the history
  • Loading branch information
mlee03 authored and mlee03 committed Dec 19, 2023
1 parent d650ed0 commit a8a7df4
Showing 1 changed file with 31 additions and 2 deletions.
33 changes: 31 additions & 2 deletions tests/main/grid/test_eta.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@

def set_answers(config_file):

eta_file = "tests/main/input/eta79.nc"
if "79" in config_file:
eta_file = "tests/main/input/eta79.nc"
if "91" in config_file:
eta_file = "tests/main/input/eta91.nc"
data = xr.open_dataset(eta_file)
return data["ak"].values, data["bk"].values


def test_set_hybrid_pressure_coefficients_correct():
def test_set_hybrid_pressure_coefficients_79_correct():

config_file = "tests/main/grid/input/test_config_79.yaml"
with open(config_file, "r") as f:
Expand All @@ -41,6 +44,32 @@ def test_set_hybrid_pressure_coefficients_correct():
raise ValueError("Unexpected value of bk")


# def test_set_hybrid_pressure_coefficients_91_correct():
#
# config_file = "tests/main/grid/input/test_config_91.yaml"
# with open(config_file, "r") as f:
# yaml_config = yaml.safe_load(f)
#
# driver_config = pace.driver.DriverConfig.from_dict(yaml_config)
# driver_config.comm_config = pace.driver.NullCommConfig(rank=0, total_ranks=6)
# driver = pace.driver.Driver(config=driver_config)
#
# p_results = driver.state.grid_data.p.data
# ak_results = driver.state.grid_data.ak.data
# bk_results = driver.state.grid_data.bk.data
# ak_answers, bk_answers = set_answers(config_file)
#
# if ak_answers.size != ak_results.size:
# raise ValueError("Unexpected size of bk")
# if bk_answers.size != bk_results.size:
# raise ValueError("Unexpected size of ak")
#
# if not np.array_equal(ak_answers, ak_results):
# raise ValueError("Unexpected value of ak")
# if not np.array_equal(bk_answers, bk_results):
# raise ValueError("Unexpected value of bk")


@pytest.mark.xfail
def test_set_hybrid_pressure_coefficients_nofile():

Expand Down

0 comments on commit a8a7df4

Please sign in to comment.