Skip to content

Commit

Permalink
Fix inline comment for ccl
Browse files Browse the repository at this point in the history
  • Loading branch information
Z-Richard committed Jun 28, 2022
1 parent cf9d87f commit 268874d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/metpy/calc/thermo.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,14 +510,13 @@ def ccl(pressure, temperature, dewpoint, height=None, mixed_layer_depth=None, wh
pressure = pressure.to(units.hPa)

# If the mixed layer is not defined, take the starting dewpoint to be the
# first element of the dewpoint array.
# first element of the dewpoint array and calculate the corresponding mixing ratio.
if mixed_layer_depth is None:
p_start, dewpoint_start = pressure[0], dewpoint[0]
vapor_pressure_start = saturation_vapor_pressure(dewpoint_start)
r_start = mixing_ratio(vapor_pressure_start, p_start)

# If it is defined, sample 10 values from the mixed layer and calculate the
# corresponding mixing ratio. Take the numeric average of these 10 values.
# Else, calculate the mixing ratio of the mixed layer.
else:
vapor_pressure_profile = saturation_vapor_pressure(dewpoint)
r_profile = mixing_ratio(vapor_pressure_profile, pressure)
Expand Down

0 comments on commit 268874d

Please sign in to comment.