Skip to content

Conversation

@haakon-e
Copy link
Member

@haakon-e haakon-e commented Nov 11, 2025

This pull request introduces a new "kinematic driver" configuration and framework for running prescribed flow field simulations based on the Shipway & Hill (2012) setup. The main changes add support for prescribed velocity profiles, new initial and surface conditions, and associated configuration and plotting tools. These updates enable direct comparison and testing of microphysics schemes in a controlled, kinematic environment.

Key changes include:

Support for Prescribed Flow (Kinematic Driver):

  • Added a new prescribed_flow option to the configuration system, allowing users to specify a prescribed velocity profile (currently ShipwayHill2012VelocityProfile). The model infrastructure and types are updated to support this option and propagate it through the simulation. [1] [2] [3] [4] [5] [6] [7]
  • Implemented logic in the solver and prognostic equations to apply the prescribed flow, including setting velocities and fixing energy to initial temperature profiles as needed. [1] [2]

New Initial and Surface Conditions:

  • Added ShipwayHill2012 initial condition and surface setup, matching the profiles and boundary conditions described in Shipway & Hill (2012). These are now selectable via configuration. [1] [2] [3]

Kinematic Driver Configuration and Example:

  • Introduced a new model configuration file (kinematic_driver.yml) and a corresponding example script (KiD_driver.jl) to demonstrate and test the kinematic driver setup. [1] [2]

Upwinding and Advection Improvements:

  • Added a new upwinding scheme (first_order_kid) for vertical advection, with special handling for the prescribed flow scenario. [1] [2] [3]

Postprocessing and Documentation Updates:

  • Added plotting routines and bibliography entry for Shipway & Hill (2012), supporting analysis and reproducibility of the kinematic driver results. [1] [2]

These changes collectively enable controlled, reproducible kinematic microphysics experiments within the modeling framework.


Illustrative results

Simulation with Equil+0M, with precipitation turned off:

KiD comparison: https://buildkite.com/clima/kinematicdriver-ci/builds/913/steps/canvas?sid=019a1277-c888-440f-a2b7-8eb2e6b6242e

image image image
Simulation with Equil+0M, with precipitation turned on:

KiD comparison: https://buildkite.com/clima/kinematicdriver-ci/builds/913/steps/canvas?sid=019a1277-c889-4001-b378-396d34aa2a8a

image image image

@haakon-e haakon-e marked this pull request as draft November 11, 2025 23:59
@haakon-e haakon-e force-pushed the he/ft-add-kinematic-driver-kid branch 4 times, most recently from 7160992 to 874b360 Compare November 20, 2025 17:39
@haakon-e haakon-e marked this pull request as ready for review November 21, 2025 01:37
@haakon-e
Copy link
Member Author

@dennisYatunin, @trontrytel

Probably needs some more cleanup, but would value your input.

Dennis: Could you provide feedback on whether the proposed interface isn't too obtrusive for everyone else who wants to do "normal" ClimaAtmos simulations?

Anna: We can externalize some parameters later, but given the results (expand the sections above), I think this is a great start and we should merge this!

@haakon-e haakon-e linked an issue Nov 21, 2025 that may be closed by this pull request
8 tasks
@haakon-e haakon-e force-pushed the he/ft-add-kinematic-driver-kid branch from c8252b9 to 6fe6b70 Compare November 25, 2025 00:55
z_max: 2e3
z_elem: 128
z_stretch: false
use_auto_jacobian: true # Needed!! (+only 1 Newton iteration, which is the default)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
use_auto_jacobian: true # Needed!! (+only 1 Newton iteration, which is the default)

This shouldn't be needed if you leave the current implicit tendency unchanged.

@trontrytel trontrytel self-requested a review November 27, 2025 00:04
Copy link
Member

@trontrytel trontrytel left a comment

Choose a reason for hiding this comment

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

LGTM! But I was also there when most of it was written so I may be biased ;)

@haakon-e haakon-e force-pushed the he/ft-add-kinematic-driver-kid branch 7 times, most recently from 6ddd2b2 to 8e32eab Compare December 4, 2025 23:52
@haakon-e
Copy link
Member Author

haakon-e commented Dec 5, 2025

Summary of variants

With reference to the current code, I observe different behavior depending on whether I comment out treatment of sound waves

Comparisons below are (left to right):

  • The PR, as-is: kinematic_driver/output_0222
  • Normal sound waves: kinematic_driver/output_0223
figures

summary_comparison-1

summary_comparison-2

@haakon-e haakon-e force-pushed the he/ft-add-kinematic-driver-kid branch from 8e32eab to 5684f5c Compare December 5, 2025 01:03
@haakon-e
Copy link
Member Author

haakon-e commented Dec 5, 2025

For clarity, here's how it looks with precipitation sources zeroed out:

figures

summary_comparison-1

summary_comparison-2

@haakon-e haakon-e force-pushed the he/ft-add-kinematic-driver-kid branch 2 times, most recently from f319497 to 4e4e9b2 Compare December 5, 2025 19:03
@haakon-e
Copy link
Member Author

haakon-e commented Dec 5, 2025

After discussions with Dennis yesterday, this PR now treats the implicit tendencies as explicit. This exactly cancels the advection term that approximates propagation of sound waves between the "explicit" and "implicit" tendencies.


Also, I have to set z_max quite high, since the top boundary condition for humidity advection is zero flux. To more closely resemble the reference implementation, I should override the top boundary condition in the same way I override the bottom bc. I leave this for a future PR if we need it.

@haakon-e haakon-e force-pushed the he/ft-add-kinematic-driver-kid branch from 4e4e9b2 to 4979c36 Compare December 5, 2025 19:45
@haakon-e haakon-e force-pushed the he/ft-add-kinematic-driver-kid branch from 78f41b5 to e47c70a Compare December 8, 2025 20:12
@haakon-e haakon-e force-pushed the he/ft-add-kinematic-driver-kid branch from e47c70a to c57445f Compare December 8, 2025 22:45
@haakon-e haakon-e enabled auto-merge December 8, 2025 22:46
@haakon-e haakon-e force-pushed the he/ft-add-kinematic-driver-kid branch from c57445f to dd55d27 Compare December 8, 2025 23:11
@haakon-e haakon-e added this pull request to the merge queue Dec 9, 2025
Merged via the queue into main with commit 66ed40b Dec 9, 2025
17 of 22 checks passed
@haakon-e haakon-e deleted the he/ft-add-kinematic-driver-kid branch December 9, 2025 01:27
@haakon-e haakon-e mentioned this pull request Dec 9, 2025
@haakon-e haakon-e added enhancement New feature or request Numerics labels Dec 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Numerics

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants