From 4366ed86538ac208c2dad51fcc0efb82ded6f25e Mon Sep 17 00:00:00 2001 From: Aaron David Schneider Date: Fri, 17 Nov 2023 10:30:38 +0100 Subject: [PATCH] rename of R to R_s to be consistent --- gcm_toolkit/utils/manipulations.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcm_toolkit/utils/manipulations.py b/gcm_toolkit/utils/manipulations.py index e5159ec..664ba1d 100644 --- a/gcm_toolkit/utils/manipulations.py +++ b/gcm_toolkit/utils/manipulations.py @@ -222,7 +222,7 @@ def _calc_hydrostat_eq(dsi, temp_key): Helper function that calculated rho and dz/dp based on the ideal gas equation and on hydrostatic eq. """ - rho = dsi[c["Z"]] / dsi.attrs[c["R"]] / dsi[temp_key] + rho = dsi[c["Z"]] / dsi.attrs[c["R_s"]] / dsi[temp_key] dzdp = -1 / rho / dsi.attrs[c["g"]] return dzdp, rho @@ -305,7 +305,7 @@ def m_add_theta(dsi, var_key_out=None, temp_key="T"): A dataArray with reduced dimensionality, containing the potential temperature """ theta = dsi[c[temp_key]] * (dsi.attrs[c["p_ref"]] / dsi[c["Z"]]) ** ( - dsi.attrs[c["R"]] / dsi.attrs[c["cp"]] + dsi.attrs[c["R_s"]] / dsi.attrs[c["cp"]] ) if var_key_out is not None: