Skip to content
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

Update deposition #11

Merged
merged 34 commits into from
Feb 16, 2024
Merged

Update deposition #11

merged 34 commits into from
Feb 16, 2024

Conversation

ctessum
Copy link
Member

@ctessum ctessum commented Jul 3, 2023

No description provided.

Copy link
Member Author

@ctessum ctessum left a comment

Choose a reason for hiding this comment

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

Looking good! Just a couple of comments/requests.

k = 1.3806488e-23u"m^2*kg*s^-2/K" # Boltzmann constant
M_air = 28.97e-3u"kg/mol" # molecular weight of air
R = 8.3144621u"J/K/mol" # Gas constant
@constants g = 9.81 [unit = u"m*s^-2"] # gravitational acceleration [m/s2]
Copy link
Member Author

Choose a reason for hiding this comment

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

For these constants (and other parameters and variables), instead of having the description as a comment, we can add it as description metadata, e.g.:

@constants g = 9.81 [unit = u"m*s^-2" description="gravitational acceleration"]

@constants κ = 0.4 # von Karman constant
@constants k = 1.3806488e-23 [unit = u"m^2*kg*s^-2/K"] # Boltzmann constant
@constants M_air = 28.97e-3 [unit = u"kg/mol"] # molecular weight of air
@constants R = 8.3144621 [unit = u"kg*m^2*s^−2*K^-1*mol^-1"] # Gas constant

"""
Function Ra calculates aerodynamic resistance to dry deposition
where z is the top of the surface layer [m], z₀ is the roughness length [m], u_star is friction velocity [m/s], and L is Monin-Obukhov length [m]
Based on Seinfeld and Pandis (2006) [Seinfeld and Pandis (2006)] equation 19.13 & 19.14.
Copy link
Member Author

Choose a reason for hiding this comment

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

Replace "[Sienfeld and Pandis (2006)]" with the full citation.

d = DrydepositionG(t)
```
"""

Copy link
Member Author

Choose a reason for hiding this comment

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

Remove empty line between function and function description

return Dₚ^2*ρₚ*g*Cc/(18*μ)
end
IfElse.ifelse((Dₚ > 20.e-6*unit_m), 99999999*unit_v, Dₚ^2*ρₚ*g*Cc/(18*μ))
# if Dₚ > 20.e-6u"m"
Copy link
Member Author

Choose a reason for hiding this comment

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

Delete obsolete code rather than commenting it out.


new(ODESystem(eqs, t, [SO2, O3], [cloudFrac, qrain, ρ_air, Δz]; name=:Wetdeposition))
end
end
Copy link
Member Author

Choose a reason for hiding this comment

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

If we have code to couple deposition and superfast, we should add that too.

Copy link
Contributor

Choose a reason for hiding this comment

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

I didn't put the code to couple deposition and superfast here because it requires using GasChem.jl, which is just a repo instead of a package. Should we make GasChem.jl a package first?

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link

codecov bot commented Dec 18, 2023

Codecov Report

Attention: 34 lines in your changes are missing coverage. Please review.

Comparison is base (eb22944) 93.67% compared to head (86cf8e8) 80.45%.

Files Patch % Lines
src/dry_deposition.jl 37.83% 23 Missing ⚠️
src/wet_deposition.jl 21.42% 11 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main      #11       +/-   ##
===========================================
- Coverage   93.67%   80.45%   -13.22%     
===========================================
  Files           4        4               
  Lines         158      174       +16     
===========================================
- Hits          148      140        -8     
- Misses         10       34       +24     

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

Copy link
Member Author

@ctessum ctessum left a comment

Choose a reason for hiding this comment

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

Looks good!

@ctessum ctessum merged commit 49fe3ca into EarthSciML:main Feb 16, 2024
3 of 5 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Feb 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants