Skip to content

Commit

Permalink
fix: Fix bug in dry air density calculation
Browse files Browse the repository at this point in the history
Duplicated from pull request NOAA-PSL#3 from @milancurcic
  • Loading branch information
jtsiddons committed Jan 29, 2024
1 parent 604bc5a commit 64c9eef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Python/COARE3.5/meteo.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,14 @@ def rhod(t, p):
inputs: t (deg C), and p (mb or hPa)
output: Rd = dry air density in kg/m3
output: Rdry = dry air density in kg/m3
"""
Rd = 287.058 # gas const for dry air in J/kg K
tk = t+273.15 # deg Kelvin
Tk = t+273.15 # deg Kelvin
Pa = p*100 # Pascals
Rdry = Pa/(Rd*Tk) # dry air density, kg/m3
return Rd
return Rdry


def grv(latitude):
Expand Down

0 comments on commit 64c9eef

Please sign in to comment.