Skip to content

Instantly share code, notes, and snippets.

@fralc
Created September 15, 2022 12:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fralc/4bbdfb162e4ff88380f8f56813bb382b to your computer and use it in GitHub Desktop.
Save fralc/4bbdfb162e4ff88380f8f56813bb382b to your computer and use it in GitHub Desktop.
Weather radar formulas
import numpy as np
def rad2mmh(dbz, a_coeff=200, b_coeff=1.6):
Z = 10. ** (dbz / 10)
mmh = (Z / a_coeff) ** (1 / b_coeff)
return mmh
def mmh2rad(mmh, a_coeff=200, b_coeff=1.6):
Z = (mmh ** b_coeff) * a_coeff
dbz = 10 * np.log10(Z)
return dbz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment