Skip to content

Adds saturation fraction#2149

Open
David Flack (daflack) wants to merge 12 commits into
mainfrom
1965_saturation_fraction
Open

Adds saturation fraction#2149
David Flack (daflack) wants to merge 12 commits into
mainfrom
1965_saturation_fraction

Conversation

@daflack

@daflack David Flack (daflack) commented May 19, 2026

Copy link
Copy Markdown
Collaborator

Also includes operators for precipitable water and saturation precipitable water as needed within saturation fraction code.

Fixes #1965

Contribution checklist

Aim to have all relevant checks ticked off before merging. See the developer's guide for more detail.

  • Documentation has been updated to reflect change.
  • New code has tests, and affected old tests have been updated.
  • All tests and CI checks pass.
  • Ensured the pull request title is descriptive.
  • Ensure rose-suite.conf.example has been updated if new diagnostic added.
  • Conda lock files have been updated if dependencies have changed.
  • Attributed any Generative AI, such as GitHub Copilot, used in this PR.
  • Marked the PR as ready to review.

@daflack David Flack (daflack) self-assigned this May 19, 2026
@github-actions

github-actions Bot commented May 19, 2026

Copy link
Copy Markdown
Contributor

Coverage

@jwarner8 James Warner (jwarner8) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good, a few small queries/clarifications.

Comment thread src/CSET/operators/humidity.py
)
# Determine array information of input cube to get
# correct cube to copy across to.
if len(w.coord("realization").points) != 1 and len(w.coord("time").points) != 1:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

are we making assumptions of the cube structure/how dimensions are ordered?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think there is some code somewhere in CSET which returns the axis names and which index they are. It might be in one of Huw's merged branches. If we do assume a structure, be good to be clear about this in code in comments so easier to debug later on

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Currently we are assuming a structure, will add to documentation/notes and log it. Will be updated along with the other MAUL diagnostics in #2114. Priority is to get a fundamentally working version in and optimisations come at a later point.


It can be calculated as

.. math:: spw = frac{1}{\rho_w} \int \frac{w}{RH} dz

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

any ref/book citation we can use to ground this?

Comment thread src/CSET/operators/humidity.py Outdated
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.

Saturation Fraction operator

2 participants