Skip to content

Commit

Permalink
Update bulk_richardson_number: fix null wind at bottom (comment Unida…
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasRieutord committed Jul 31, 2024
1 parent a99c908 commit 6bdf81b
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/metpy/calc/boundarylayer.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,15 @@ def bulk_richardson_number(
`pint.Quantity`
Bulk Richardson number profile
"""

u[0] = 0 * units.meter_per_second
v[0] = 0 * units.meter_per_second

if idxfoot == 0:
# Force the ground level to have null wind
Du = u
Dv = v
else:
Du = u - u[idxfoot]
Dv = v - v[idxfoot]

Dtheta = potential_temperature - potential_temperature[idxfoot]
Du = u - u[idxfoot]
Dv = v - v[idxfoot]
Dz = height - height[idxfoot]

idx0 = Du**2 + Dv**2 + ustar**2 == 0
Expand Down

0 comments on commit 6bdf81b

Please sign in to comment.