Skip to content

Commit

Permalink
Physical integration runs ok
Browse files Browse the repository at this point in the history
  • Loading branch information
nichollsh committed Nov 1, 2024
1 parent a99d0f4 commit 4f27f94
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/proteus/interior/aragog.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
2 changes: 1 addition & 1 deletion tests/data/integration/physical/physical.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
16 changes: 13 additions & 3 deletions tests/integration/test_integration_physical.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 4f27f94

Please sign in to comment.