Skip to content

add support for sectional dry deposition - #230

Open
zdaq12 wants to merge 4 commits into
compdyn:masterfrom
zdaq12:sect_drydep
Open

add support for sectional dry deposition#230
zdaq12 wants to merge 4 commits into
compdyn:masterfrom
zdaq12:sect_drydep

Conversation

@zdaq12

@zdaq12 zdaq12 commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds dry deposition support to the sectional representation. Also corrects the
deposition velocity formula shared by all representations to match
Zhang et al. (2001) and Emerson et al. (2020) as published.

Sectional dry deposition

scenario_binned_loss() applies per-bin loss each timestep via the same
scenario_loss_rate() dispatcher already used by the particle-resolved
and modal paths, so the sectional model supports every
loss_function_type (constant, volume, drydep, chamber), not just dry
deposition.

Each bin decays as m(t+dt) = m(t) * exp(-rate*dt) — the exact solution
of dm/dt = -rate*m. Mass (vol_conc) is
prognostic and num_conc is diagnosed, matching the convention already used by
sectional coagulation.

output_sectional()/input_sectional() gain a scenario argument so
dry deposition parameters are written to and read from NetCDF output,
mirroring output_modal()/input_modal().

Deposition velocity formula change

before: V_d = V_s + 1/(R_a + R_s + R_a*R_s*V_s)
after:  V_d = V_s + 1/(R_a + R_s)

The R_a*R_s*V_s term comes from the two-layer flux balance
(Seinfeld and Pandis, 1998); however, it is not a physically representative term, but
rather a direct artifact of the mathematical manipulation of the multilayer resistance analogy
system of equations with settling acting through all layers. Strictly speaking, neither
Zhang et al. (2001) nor Emerson et al. (2020) use this term. Both follow Slinn (1982)'s
derivation where settling is treated purely in parallel. Since drydep_params_t is explicitly
parameterized to switch between Z01-and E20 coefficient sets, retaining the cross
term would implement neither parameterization as published.

Applied in all three places: scenario_loss_rate_drydep
(particle/sectional), scenario_integrated_loss_rate_drydep (modal,
analytic), and dep_vel_integrand (modal, QUADPACK).

New spec-file option

do_aero_dilution (sectional runs) skips both background-exchange
dilution and the mixing-layer-growth correction when set to no. The
modal representation has no dilution treatment at all, so this is needed
for the modal/sectional comparison and lets dry deposition be
studied in isolation.

Tests

  • test_loss_16 — sectional dry deposition regression test
  • test_loss_17 — checks sectional against particle-resolved

Reference files for test_loss_13, test_loss_14 (QUADPACK), and
test_loss_16 are regenerated due to formula update.

@codecov

codecov Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 70.76923% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.47%. Comparing base (7984020) to head (c64dddd).

Files with missing lines Patch % Lines
src/scenario.F90 68.75% 10 Missing ⚠️
src/run_sect.F90 72.00% 7 Missing ⚠️
src/output.F90 71.42% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #230      +/-   ##
==========================================
- Coverage   78.49%   78.47%   -0.03%     
==========================================
  Files          56       56              
  Lines        9755     9806      +51     
==========================================
+ Hits         7657     7695      +38     
- Misses       2098     2111      +13     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@zdaq12
zdaq12 marked this pull request as ready for review September 9, 2026 16:46
Removed redundant comments about aerosol dilution treatment.
@jcurtis2
jcurtis2 self-requested a review September 9, 2026 20:40
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.

1 participant