From a5276c02b63950c93d6f967bb854e87bd65d5a41 Mon Sep 17 00:00:00 2001 From: Sven Kiefer Date: Mon, 11 Mar 2024 11:23:48 +0100 Subject: [PATCH] added potential temperatrue to output --- gcm_toolkit/exorad/utils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gcm_toolkit/exorad/utils.py b/gcm_toolkit/exorad/utils.py index 7661eb9..356fc9c 100755 --- a/gcm_toolkit/exorad/utils.py +++ b/gcm_toolkit/exorad/utils.py @@ -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