Skip to content

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 curlₕ in the vorticity components ᶠωʰ, ᶠωʲʰ, and ᶜω³ to wcurlₕ
    • 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 compute_gm_mixing_length! instead of recomputing it
    • Use ᶠu⁰ in set_prognostic_edmf_precomputed_quantities_closures! instead of recomputing it
  • Split set_velocity_quantities! into two lazy functions center_velocity(ᶜuₕ, ᶠu₃) and face_velocity(ᶜρ, ᶜu, ᶠu₃), where the latter is a function of the grid-scale density ᶜρ
    • Modify set_diagnostic_edmf_precomputed_quantities_env_closures! to use center_velocity and face_velocity instead of redefining them, and clarify where we are ignoring the effects of topography
  • 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
  • Fix the metric terms in set_velocity_at_surface!

  • 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
Copy link
Member Author

As explained in #4015, this reconstruction is unstable for our model configurations because of some complicated math reason. It has been superseded by the reconstruction in #4028, which is equivalent to the first bullet point of this PR's description.

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