Skip to content

Adding new data to AIDA calibrations #520

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 20, 2025
Merged

Adding new data to AIDA calibrations #520

merged 1 commit into from
Mar 20, 2025

Conversation

amylu00
Copy link
Member

@amylu00 amylu00 commented Feb 26, 2025

Purpose

  • adding TROPIC04 experiment 4, ACI04_22, EXP19, EXP45, and EXP28 to AIDA ice nuc calibrations
  • TROPIC04 experiment 4 added to HOM batch

To-do

  • in separate PR, overwrite tps to have reference state be more representative of experimental state

Content


  • I have read and checked the items on the review checklist.

@amylu00 amylu00 self-assigned this Feb 26, 2025
Copy link

codecov bot commented Feb 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.65%. Comparing base (c04a178) to head (e977f1f).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #520      +/-   ##
==========================================
+ Coverage   91.53%   92.65%   +1.11%     
==========================================
  Files          45       45              
  Lines        1654     1660       +6     
==========================================
+ Hits         1514     1538      +24     
+ Misses        140      122      -18     
Components Coverage Δ
src 94.05% <ø> (+1.17%) ⬆️
ext 69.79% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@amylu00 amylu00 force-pushed the al/add_TROPIC04 branch 2 times, most recently from 260f5db to a1d573f Compare March 14, 2025 23:35
@amylu00 amylu00 changed the title Adding TROPIC04 to AIDA calibrations Adding new data to AIDA calibrations Mar 17, 2025
@amylu00 amylu00 force-pushed the al/add_TROPIC04 branch 3 times, most recently from 19d4dc9 to b46b7ec Compare March 18, 2025 22:54
@amylu00 amylu00 requested a review from trontrytel March 18, 2025 22:54
@trontrytel
Copy link
Member

Looks like the calibration tests are failing on this PR:

Perfect model calibration on ABDINM: Error During Test at /Users/runner/work/CloudMicrophysics.jl/CloudMicrophysics.jl/test/ice_nucleation_calibration.jl:91
  Got exception outside of a @test
  UndefVarError: `perf_model_params` not defined
  Stacktrace:
    [1] test_J_calibration(FT::Type{Float64}, IN_mode::String)
      @ Main ~/work/CloudMicrophysics.jl/CloudMicrophysics.jl/test/ice_nucleation_calibration.jl:9
    [2] macro expansion
      @ ~/work/CloudMicrophysics.jl/CloudMicrophysics.jl/test/ice_nucleation_calibration.jl:92 [inlined]
    [3] macro expansion
      @ ~/hostedtoolcache/julia/1.10.9/aarch64/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
    [4] top-level scope
      @ ~/work/CloudMicrophysics.jl/CloudMicrophysics.jl/test/ice_nucleation_calibration.jl:92
    [5] include(fname::String)
      @ Base.MainInclude ./client.jl:494
    [6] top-level scope
      @ ~/work/CloudMicrophysics.jl/CloudMicrophysics.jl/test/runtests.jl:19
    [7] include(fname::String)
      @ Base.MainInclude ./client.jl:494
    [8] top-level scope
      @ none:6
    [9] eval
      @ ./boot.jl:385 [inlined]
   [10] exec_options(opts::Base.JLOptions)
      @ Base ./client.jl:296
   [11] _start()
      @ Base ./client.jl:557
Test Summary:                       | Error  Total  Time
Perfect model calibration on ABDINM |     1      1  1.2s

@@ -131,7 +131,7 @@ function immersion_freezing(params::ABIFM, PSD_liq, state)
Δa_w = CMO.a_w_eT(tps, e, T) - CMO.a_w_ice(tps, T)

J = CMI_het.ABIFM_J(aerosol, Δa_w)
return min((J * Nₗ * A_aer), (Nₗ / const_dt))
return min(max(FT(0), (J * Nₗ * A_aer)), (Nₗ / const_dt))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why can J become negative?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was keeping it consistent with the ABDINM, I can change it back. I think I implemented it before because the parcel was giving negative radii and N_l values because there wasn't a limit on the condensation/depositional growth tendencies

FT = eltype(state)
Sᵢ = ξ(tps, T) * Sₗ
Gᵢ = CMO.G_func(aps, tps, T, TD.Ice())
return 4 * FT(π) / ρ_air * (Sᵢ - 1) * Gᵢ * PSD_ice.r * Nᵢ
dqᵢ_dt = 4 * FT(π) / ρ_air * (Sᵢ - 1) * Gᵢ * PSD_ice.r * Nᵢ
return qᵢ + dqᵢ_dt * const_dt > 0 ? dqᵢ_dt : -qᵢ / const_dt
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you try limiting the tendency in a similar way as we do in other places? For example this is what we have in immersion freezing

  return ifelse(
       cond_rate > FT(0),
       min(cond_rate, limit(qᵥ, dt, 1)),
       -min(abs(cond_rate), limit(qₗ, dt, 1)),
   )

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I'll update the limiting in condensational growth the same way too

@@ -115,7 +116,10 @@ see DOI: 10.1039/C3FD00035D
Returns zero for unsupported aerosol types.
"""
function ABIFM_J(
dust::Union{CMP.DesertDust, CMP.Illite, CMP.Kaolinite, CMP.ArizonaTestDust},
dust::Union{
CMP.DesertDust, CMP.Illite, CMP.Kaolinite,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So much dust!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹💨

@amylu00 amylu00 force-pushed the al/add_TROPIC04 branch 3 times, most recently from 765cd3e to 0e080fd Compare March 20, 2025 06:45
@amylu00 amylu00 requested a review from trontrytel March 20, 2025 16:41
Copy link
Member

@trontrytel trontrytel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@amylu00 amylu00 enabled auto-merge March 20, 2025 17:01
@amylu00 amylu00 merged commit b0d417f into main Mar 20, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants