Skip to content

Commit 353e57a

Browse files
Modify test to show in-progress. To be completed once work from contrail persistency fix has been merged.
1 parent 3a2b0ac commit 353e57a

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

improver_tests/psychrometric_calculations/condensation_trails/test_CondensationTrailFormation.py

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -879,7 +879,13 @@ def test_process_values(
879879
relative_humidity: float,
880880
forms_contrail: bool,
881881
) -> None:
882-
"""Docstring goes here"""
882+
"""
883+
Check that 'process' returns the expected values.
884+
885+
TODO:
886+
- Add 'may form' inputs with known outputs
887+
- Improve inputs after persistency fix
888+
"""
883889

884890
pressure_levels = np.array([pressure])
885891
temperatures = np.array([temperature])
@@ -908,3 +914,24 @@ def test_process_values(
908914
assert result.data[0, 0] == 1 or 2
909915
else:
910916
assert result.data[0, 0] == 0
917+
918+
# TODO: remove once test is complete
919+
# svp_ice_table = SaturatedVapourPressureTable(ice_only = True, t_min = temperature, t_max = temperature + 0.15).process()
920+
# svp_ice = svp_ice_table.data[0]
921+
922+
# condition_1 = plugin.local_vapour_pressure[0] - plugin.engine_mixing_ratios[0, 0] * temperature > plugin.critical_intercepts[0, 0]
923+
# condition_2 = temperature < plugin.critical_temperatures[0, 0]
924+
# condition_3 = plugin.local_vapour_pressure[0] > svp_ice
925+
# condition_4 = temperature < 273.15
926+
927+
# c1c2 = condition_1 and condition_2
928+
# c3c4 = condition_3 and condition_4
929+
930+
# if c1c2 and not c3c4:
931+
# expected_category = 1
932+
# elif c1c2 and c3c4:
933+
# expected_category = 2
934+
# else:
935+
# expected_category = 0
936+
937+
# assert result.data[0, 0] == expected_category

0 commit comments

Comments
 (0)