Skip to content

add quadratures for precipitation - #4783

Draft
szy21 wants to merge 2 commits into
mainfrom
zs/sgs_precip
Draft

szy21 wants to merge 2 commits into
mainfrom
zs/sgs_precip

Conversation

@szy21

@szy21 szy21 commented Aug 22, 2026

Copy link
Copy Markdown
Member

Purpose

wip. do not review it yet.

To-do

Content


  • I have read and checked the items on the review checklist.

@szy21 szy21 added the do-not-merge-yet Block from bors label Aug 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📖 Docs preview for this PR: https://clima.github.io/ClimaAtmos.jl/previews/PR4783/

@szy21 szy21 changed the title add discrete cloud fraction add quadratures for precipitation Aug 23, 2026
@szy21
szy21 force-pushed the zs/sgs_precip branch 6 times, most recently from df9dd87 to 3991cfe Compare August 25, 2026 20:22
@szy21 szy21 added the Launch Buildkite Add to launch buildkite run label Aug 25, 2026
Comment on lines +1017 to +1029
# input = @. lazy(tuple(ᶜCF_d, ᶜq_precip))
# Operators.column_accumulate!(
# ᶜprecip_frac,
# input;
# init = zero(FT),
# reverse = true,
# ) do a_p_above, (CF_d_level, q_precip_level)
# ifelse(
# q_precip_level > q_precip_min,
# max(CF_d_level, f_decay * a_p_above),
# zero(FT),
# )
# end

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This results in large allocation. The for loop below doesn't allocate, and should give the same result. @nefrathenrici do you have an idea why column_accumulate allocates here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge-yet Block from bors Launch Buildkite Add to launch buildkite run

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant