Skip to content

Commit

Permalink
added potential temperatrue to output
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven Kiefer committed Mar 11, 2024
1 parent 4b7a9ab commit a5276c0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion gcm_toolkit/exorad/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@ def convert_winds_and_t(dsi, temp_dim, w_dim):
"""
import cubedsphere as cs
import cubedsphere.const as c


# save potential temperature
dsi[temp_dim + '_pot'] = dsi[temp_dim]

#calculate temperature
kappa = dsi.attrs["R"] / dsi.attrs["cp"]
dsi[temp_dim] = dsi[temp_dim] * (dsi[c.Z] / dsi.attrs["p_ref"]) ** kappa

Expand Down

0 comments on commit a5276c0

Please sign in to comment.