From cacf4b1262aaca5345f1f4917b6cbfcae9152316 Mon Sep 17 00:00:00 2001 From: amylu00 Date: Wed, 11 Sep 2024 13:49:40 -0700 Subject: [PATCH] adding a test while im at it --- test/ice_nucleation_calibration.jl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/ice_nucleation_calibration.jl b/test/ice_nucleation_calibration.jl index 266bf0f14..b7e808799 100644 --- a/test/ice_nucleation_calibration.jl +++ b/test/ice_nucleation_calibration.jl @@ -24,8 +24,11 @@ function test_J_calibration(FT, IN_mode) perfect_model = true, ) calibrated_parameters = [output[1], output[2]] + calibrated_soln = run_calibrated_model(FT, IN_mode, calibrated_parameters, params, IC) + true_soln = run_calibrated_model(FT, IN_mode, coeff_true, params, IC) - TT.@test calibrated_parameters[1] ≈ coeff_true[1] rtol = FT(0.2) + + # test that coeffs are close to "true" values if IN_mode == "ABDINM" TT.@test calibrated_parameters[1] ≈ coeff_true[1] rtol = FT(0.3) TT.@test calibrated_parameters[2] ≈ coeff_true[2] atol = FT(3) @@ -36,6 +39,9 @@ function test_J_calibration(FT, IN_mode) TT.@test calibrated_parameters[1] ≈ coeff_true[1] rtol = FT(0.3) TT.@test calibrated_parameters[2] ≈ coeff_true[2] atol = FT(20) end + + # test that resulting ICNC are similar + TT.@test calibrated_soln[end] ≈ true_soln[end] rtol = FT(0.1) end @info "Ice Nucleation Calibration Test"