From 4f27f94b737156f2b5c9a1eba2665b45e4894f06 Mon Sep 17 00:00:00 2001 From: Harrison Nicholls Date: Fri, 1 Nov 2024 12:20:07 +0000 Subject: [PATCH] Physical integration runs ok --- src/proteus/interior/aragog.py | 2 +- tests/data/integration/physical/physical.toml | 2 +- tests/integration/test_integration_physical.py | 16 +++++++++++++--- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/proteus/interior/aragog.py b/src/proteus/interior/aragog.py index f0926c4b..5258bebb 100644 --- a/src/proteus/interior/aragog.py +++ b/src/proteus/interior/aragog.py @@ -206,7 +206,7 @@ def GetAragogOutput(hf_row:dict): output["M_mantle"] = aragog_output.mantle_mass output["T_magma"] = aragog_output.solution_top_temperature output["Phi_global"] = float(aragog_output.melt_fraction_global[-1]) - output["RF_depth"] = aragog_output.rheological_front + output["RF_depth"] = float(aragog_output.rheological_front) output["F_int"] = aragog_output.convective_heat_flux_basic[-1,-1] # Need to be revised for consistency output["M_mantle_liquid"] = output["M_mantle"] * output["Phi_global"] diff --git a/tests/data/integration/physical/physical.toml b/tests/data/integration/physical/physical.toml index 3cdeb6f1..d9c79587 100644 --- a/tests/data/integration/physical/physical.toml +++ b/tests/data/integration/physical/physical.toml @@ -53,7 +53,7 @@ author = "Harrison Nicholls, Tim Lichtenberg" [params.stop.iters] enabled = true minimum = 3 - maximum = 4 + maximum = 6 # required time constraints [params.stop.time] diff --git a/tests/integration/test_integration_physical.py b/tests/integration/test_integration_physical.py index 45a83a68..ce6f2d0c 100644 --- a/tests/integration/test_integration_physical.py +++ b/tests/integration/test_integration_physical.py @@ -39,16 +39,26 @@ def test_physical_run(physical_run): def test_physical_atmosphere(physical_run): # Get output times - print(physical_run) times,_ = sample_output(physical_run, extension="_atm.nc") - # Check JANUS output + # Load atmosphere output atm_data = read_atmosphere_data(out_dir,times) + # Compare to config + for i,atm in enumerate(atm_data): + assert len(atm["t"]) == physical_run.config.atmos_clim.janus.num_levels*2+1 + + # Compare to expected + + + def test_physical_interior(physical_run): # Get output times - print(physical_run) times,_ = sample_output(physical_run, extension="_atm.nc") # Check Aragog output int_data = read_interior_data(out_dir,times) + + # Compare to config + for i,atm in enumerate(int_data): + assert len(atm["t"]) == physical_run.config.atmos_clim.janus.num_levels*2+1