Repository navigation
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #230 +/- ##
=======================================
Coverage 78.49% 78.49%
=======================================
Files 56 56
Lines 9755 9812 +57
=======================================
+ Hits 7657 7702 +45
- Misses 2098 2110 +12 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
zdaq12
marked this pull request as ready for review
September 9, 2026 16:46
jcurtis2
self-requested a review
September 9, 2026 20:40
Corrected typo in README regarding coagulation kernel.
jcurtis2
requested changes
Sep 16, 2026
jcurtis2
left a comment
Collaborator
There was a problem hiding this comment.
Mostly looks straightforward to get this merged. Here are my comments:
- As I can't offer suggestions on files you haven't touched: quickly just add the output directory
scenarios/7_drydep/outto the.gitignore. Looks like we've gotten lazy about this for new scenarios but lets at least fix this one here. - You've added this
do_aero_dilutionto the sectional spec file to disable dilution because the modal lacks dilution entirely so that you can compare the two fairly. In general, this is likely unnecessary as we typically disable dilution by having our input files set in a particular way that causes this process to be zero. Dilution depends on (1) background mixing rate and (2) mixing height changes So for (1) we've controlled it by havingrate = 0inaero_back.datso that there is no mixing, but we've keep mixing from changes in box height inheight.dat. Mixing height does impact the dry deposition rates and the results will change if we changeheight.datto lose our boundary layer evolution. I don't know if we consider that important for this scenario at this time. So this feels like a workaround for a deficiency in modal model by introducing something permanent in the sectional model. But this all isn't 100% without impact, its just whether or not that impact matters. - Possibly worth a sentence in the PR description that you change the particle size distribution (larger size, broader distribution) where you discuss the example scenario.
- Not directly related to your changes but since you are making edits in that scenario directory and comparing the modal to sectional, you have the units of
tot_mass_concin the modal processing code to be micrograms per cubic meter.
Co-authored-by: Jeffrey Curtis <jcurtis2@illinois.edu>
Co-authored-by: Jeffrey Curtis <jcurtis2@illinois.edu>
Contributor
Author
Thank you for the review, @jcurtis2 ! All great points, and I believe I have resolved all of your comments. Main points:
|
jcurtis2
requested changes
Oct 10, 2026
jcurtis2
left a comment
Collaborator
There was a problem hiding this comment.
Everything looks in order now except for these minor things. Fix them up and we will get this merged.
Co-authored-by: Jeffrey Curtis <jcurtis2@illinois.edu>
Co-authored-by: Jeffrey Curtis <jcurtis2@illinois.edu>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 dry deposition loss each timestep, usingthe same
scenario_loss_rate()as the particle-resolved model. The sectional modelaccepts
loss_function noneordrydepand stops with an error forany other loss function.
Each bin decays as
m(t+dt) = m(t) * exp(-rate*dt)— the exact solutionof
dm/dt = -rate*m. Mass (vol_conc) isprognostic and
num_concis diagnosed, matching the convention already used bysectional coagulation.
output_sectional()/input_sectional()gain ascenarioargument so drydeposition parameters are written to and read from NetCDF output, mirroring
output_modal()/input_modal().Deposition velocity formula change
The
R_a*R_s*V_sterm 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_tis explicitlyparameterized 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, optional,loss_function drydeponly): whenset to
no, skips both background-exchange dilution and mixing-layer-growthdilution, so dry deposition can be studied with a time-varying mixing height. It
defaults to
yes, so existing spec files are unaffected. The modalmodel has no dilution treatment, so this is what makes the
modal and sectional results directly comparable.
Other sectional changes
do_coagulationisyes, sodo_coagulation nonow works.do_opticalis only read whendo_mosaicisyes, matchingrun_part.scenario_binned_loss()asserts a single aerosol species whichrun_sect()currently requires.
Tests
test_loss_16— sectional dry deposition regression testtest_loss_17— checks sectional against particle-resolvedReference files for
test_loss_13,test_loss_14(QUADPACK), andtest_loss_16are regenerated due to dry deposition velocity formula update.Example scenario
scenarios/7_drydepnow demonstrates both modal and sectional representations. Thesectional case is added as
drydep_sect.specwith1_run_sect.shand2_process_sect.sh, mirroring the existing modal scripts. It uses thestandard
extract_sectional_*tools.The initial distribution was changed from a narrow 10 nm mode (σg ≈ 1.1) to a
larger, broader 100 nm mode (σg ≈ 1.8).
scenarios/7_drydep/out/isnow in
.gitignore, and thetot_mass_concunit label indrydep_modal_processis corrected to kg m⁻³.