Skip to content

computation of relative humidity not sensible for upper troposphere #2320

@joernu76

Description

@joernu76

What went wrong?

Computing relative humidity with metpy and comparing the results with our old code following the lines of
https://www.ecmwf.int/sites/default/files/elibrary/2016/17117-part-iv-physical-processes.pdf
Section 7.4.2 showed strong discrepancies at high altitudes (e.g. 8km and above). Particularly in ice clouds, relative humidity was not close (or above) 100%, which limits its usefulness quire a bit.

The current code only computes relative humidity in relation to saturation pressure above liquids. At higher altitudes, ice is more prevalent and thus saturation pressure over ice should be used.

See also here
Open-MSS/MSS#1341

This could also be seen as a Feature request; but from the perspective of analysing rel. hum at 10km for situations where ice clouds may form, this is a bug.

I can provide a MR for fixing this, the question is whether the current function should be updated or a new one created.

Operating System

Linux

Version

1.1.0

Python Version

3.9

Code to Reproduce

import metpy.calc as mc
import metpy.units as munits
mu = munits.units

pres = 10000
temp = 250
q = 0.005
print(100 * mc.relative_humidity_from_specific_humidity(pres * mu.Pa, temp * mu.K, q * mu.dimensionless).m, "%")
print("should be ~106%")

Errors, Traceback, and Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: CalcPertains to calculationsSubarea: ThermoPertains to thermodynamic calculations and their physical correctnessType: EnhancementEnhancement to existing functionality

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions