PyMPDATA icon indicating copy to clipboard operation
PyMPDATA copied to clipboard

fix: missing (1+qv) factor in calculation of derivative of rho_d when…

Open yoctoyotta1024 opened this issue 7 months ago • 2 comments

… accounting for water vapour

rho_d(z) = rho(z) / (1 + qv(z)) therefore drho_d/dz = drho/dz / (1+ qv) - dqv/dz / (1 + qv)^2 not(!) drho_d/dz = drho/dz / (1+ qv) - dqv/dz / (1 + qv)

yoctoyotta1024 avatar Jul 28 '25 09:07 yoctoyotta1024

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 92.69%. Comparing base (a921acc) to head (f0c5b67). :warning: Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #614   +/-   ##
=======================================
  Coverage   92.69%   92.69%           
=======================================
  Files          39       39           
  Lines        1697     1697           
=======================================
  Hits         1573     1573           
  Misses        124      124           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Jul 29 '25 22:07 codecov[bot]

Stale pull request message

github-actions[bot] avatar Oct 28 '25 10:10 github-actions[bot]

@slayoo did this ever get merged? Also in PySDM?

yoctoyotta1024 avatar Dec 02 '25 09:12 yoctoyotta1024

@yoctoyotta1024 In PySDM I found this: https://github.com/open-atmos/PySDM/blob/e4ddacdbf7fdbb01a3e43ab947a152ac55bdcf92/examples/PySDM_examples/Shipway_and_Hill_2012/settings.py#L131-L133

Maybe we can do similar test to this: https://github.com/open-atmos/PySDM/blob/main/tests/smoke_tests/kinematic_1d/shipway_and_hill_2012/test_initial_condition.py - test_density_profile

AgnieszkaZaba avatar Dec 02 '25 16:12 AgnieszkaZaba

@AgnieszkaZaba Ah yes nice spot thank you, I had forgotten about this 😅 Good idea for the test too.

yoctoyotta1024 avatar Dec 03 '25 16:12 yoctoyotta1024