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

Modify velocity, kinetic energy, and curl terms to match dycore paper #3552

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dennisYatunin
Copy link
Member

@dennisYatunin dennisYatunin commented Jan 28, 2025

Purpose

This PR modifies the reconstructions of cell face velocity, cell center kinetic energy, and the curl terms in the velocity tendencies to exactly match the dycore paper.

Content

  • Change wcurlₕ in the vorticity components ᶠωʰ, ᶠωʲʰ, and ᶜω³ to curlₕ
    • This should give us discrete conservation of vorticity, which we didn't have before
  • Change ᶠu³ from ᶠ⌈ᶜg³ʰ ᶜuₕ⌋ + ᶠg³³ ᶠu₃ to ᶠ⌈ᶜgʰᵛ ᶜuᵥ⌋ + ᶠ⌈ᶜg³³⌋ ᶠu₃
    • To preserve discrete conservation of kinetic energy, change ᶜ⟨ᶠg³³ ᶠu₃ ᶠu₃⟩ in the kinetic energy to ᶜg³³ ᶜ⟨ᶠu₃ ᶠu₃⟩
    • To preserve the consistency of diagnostic EDMF, change ᶠg³³ ᶠu₃ ᶠu₃ in the SGS kinetic energy to ᶜg³³ ᶠu₃ ᶠu₃
  • Add ᶠu = ᶠ⌈ᶜuʰ⌋ + ᶠu³ to the list of precomputed quantities, along with ᶠu⁰ and ᶠuʲs for prognostic EDMF
    • We were previously assuming that ᶠu = ᶠ⟨ᶜuʰ⟩ + ᶠu³, but this was not clarified anywhere
    • To preserve discrete conservation of kinetic energy, change ᶜ⌈ᶠωʰ × ᶠuᵛ⌋ in the tendency of ᶜuₕ to ᶜ⟨ᶠωʰ × ᶠuᵛ⟩, and change ᶠωʰ × ᶠ⟨ᶜuʰ⟩ in the tendency of ᶠu₃ to ᶠωʰ × ᶠuʰ
    • Change ᶠωʲʰ × ᶠ⟨ᶜuʲʰ⟩ in the tendency of ᶠu₃ʲ to ᶠωʲʰ × ᶠuʲʰ
    • Use ᶠu⁰ in set_prognostic_edmf_precomputed_quantities_closures! instead of recomputing it
  • Split set_velocity_quantities! into set_ᶜu_and_ᶜK! and set_ᶠu³_and_ᶠu!, where the latter depends on ᶜρ
    • Modify set_precomputed_quantities! and its prognostic EDMF counterparts to use set_ᶜu_and_ᶜK! and set_ᶠu³_and_ᶠu!
  • Simplify vector conversions in compute_kinetic! (for grid-mean and prognostic EDMF) and kinetic_energy (for diagnostic EDMF)
    • Fix the topography-related term in the SGS kinetic energy, which was previously wrong for diagnostic EDMF
  • Clarify metric terms in set_velocity_at_surface!
  • Bump the ref counter

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

@dennisYatunin dennisYatunin requested a review from szy21 January 28, 2025 01:27
@szy21
Copy link
Member

szy21 commented Jan 28, 2025

The ci is failing - maybe a typo somewhere? And we probably need to change the set_velocity_quantities! functions in prognostic edmf too?

@dennisYatunin dennisYatunin force-pushed the dy/reconstructions branch 8 times, most recently from ddb2af6 to 32960cf Compare January 30, 2025 02:37
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.

2 participants