-
Notifications
You must be signed in to change notification settings - Fork 8
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
Refactor parcel #331
Refactor parcel #331
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #331 +/- ##
=======================================
Coverage 98.72% 98.72%
=======================================
Files 33 33
Lines 1101 1101
=======================================
Hits 1087 1087
Misses 14 14 ☔ View full report in Codecov by Sentry. |
d043a9e
to
5ea2106
Compare
5ea2106
to
b7d6097
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much Anna! It looks beautiful!
- I think you may have used the deposition water activity based parameterization for Jensen instead of the homogeneous one. Maybe those can be renamed to avoid confusion in the future. This might fix the problem of the plot not looking the same but let me know if otherwise. Jensen also assumes the aerosols are lognormally distributed and not the droplets so that may also be affecting the results.
- I think lognormal droplets account for q_liq and N_liq through R_mode_liq and σ. I'll see if I can find out how they relate and fix it. For now, none of the files actually use it so it's fine but maybe we should have it throw a warning? I'll open an issue rn
b7d6097
to
012c64c
Compare
6bbc39e
to
234754b
Compare
234754b
to
55a3ea5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love it
Purpose
Refactor the adiabatic parcel code to get rid of convoluted if/else logic that frew on us
Content
The parcel model code is now structured into
Parcel.jl
- includes all the files. Needs to be included in all examplesParcelCommon.jl
- defines some functions that are reused when computing initial conditions, etc.ParcelDistributions.jl
- computes the mean radius, area and volume for particles for monodisperse, Gamma and Lambda distributionsParcelModel.jl
- defines the parcel problem for ODE solverParcelParameters.jl
- creates structs with parameters that will be used to dispatch over different parameterizationsParcelTendencies.jl
- defines different ice nucleation and growth tendencies. Note that for each of them the first argument is a parameter struct that serves as type for dispatching.To-do
Couple of problems that I noticed while coding
Lognormal
distribution. It seems like it is not connected at all with the predictedql
andNl
. Is it meant to be used only for background aerosol?ParcelDistributions
Jensen
example gives different results than before. I think it is because of the issues with theLognormal
size distribution.