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

Seeding example for 1D environment of S&H 2012 #1396

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

jtbuch
Copy link
Collaborator

@jtbuch jtbuch commented Oct 3, 2024

Update toward solving a subset of goals raised in #1387.

Specifically, I included functionality for selecting cell id, cell origin, and position in cell of the seeded super-droplets (SDs) in Shipway and Hill's (SH2012) kinematic driver environment. For this I had to modify seeding.py, particulator.py, as well as the backend seeding_methods.py files in a way that does not seem to be straightforwardly backward compatible with the parcel model example that @slayoo introduced earlier.

I also made another major assumption: rather than simply using a default value of water mass for the seeded SDs, I update it using the volume attribute derived from the wet, rather than dry, radius of seed SDs at the time of injection. If I use the dry radius, the resulting precipitation is significantly lower. This might be a subtle point that is worth discussing in some detail, even if it is for my own personal clarification.

Here's the .ipynb file containing the full example.

Copy link
Collaborator

@claresinger claresinger left a comment

Choose a reason for hiding this comment

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

Some initial comments.

Something looks odd to me in the plot of superdroplet count over time for the seeding vs. no seeding case. Why in the seeding case is the sd count constant at 32 during the seeding interval?

PySDM/dynamics/seeding.py Outdated Show resolved Hide resolved
extensive_attributes,
seeded_particle_index,
seeded_particle_multiplicity,
seeded_particle_cell_id,
seeded_particle_cell_origin,
Copy link
Collaborator

Choose a reason for hiding this comment

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

what is the cell origin and position in cell? where are these used?

Copy link
Member

Choose a reason for hiding this comment

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

position-within-cell attribute (multi-dimensional, values normalised to one)

grid-cell origin (multi-dimensional)

These are used to define and track positions of particles in the domain (only used for >0D environments, so do not apply in the case of parcel env)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I will use the particulator.environment argument to call the seeding function with default arguments when seeding in the parcel environment

) # TODO #1387: does not have to be the same?
v_dry = settings.formulae.trivia.volume(radius=r_dry)
self.seeded_particle_extensive_attributes = {
"water mass": np.array([0.0001 * si.ng] * settings.n_sd_seeding),
Copy link
Collaborator

Choose a reason for hiding this comment

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

should we use equilibrate_wet_radii rather than prescribing a water_mass for the seeds?

@jtbuch
Copy link
Collaborator Author

jtbuch commented Oct 8, 2024

Something looks odd to me in the plot of superdroplet count over time for the seeding vs. no seeding case. Why in the seeding case is the sd count constant at 32 during the seeding interval?

That is due to the int type casting while plotting the mean SD count. I have fixed it now and it looks better here

However, this made me wonder: why are the number of SDs decreasing with time initially even in the no seeding case?

@claresinger
Copy link
Collaborator

However, this made me wonder: why are the number of SDs decreasing with time initially even in the no seeding case?

This is a good question... I thought it was just precip, but the sd_count is decreasing even before precip onset (and actually faster in the initial time than during the precip period). Is there some spin-up that's happening? I don't know why that wouldn't conserve SDs though.

@slayoo
Copy link
Member

slayoo commented Oct 10, 2024

However, this made me wonder: why are the number of SDs decreasing with time initially even in the no seeding case?

This is a good question... I thought it was just precip, but the sd_count is decreasing even before precip onset (and actually faster in the initial time than during the precip period). Is there some spin-up that's happening? I don't know why that wouldn't conserve SDs though.

I expect it to be caused by the updraft which is only present during the first settings.t_1 seconds (10 minutes). It pushes super droplets beyond the top of the domain.

@claresinger
Copy link
Collaborator

I expect it to be caused by the updraft which is only present during the first settings.t_1 seconds (10 minutes). It pushes super droplets beyond the top of the domain.

Oh, this totally makes sense. Thanks, Sylwester!

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.

3 participants