Commit bbb55def authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Changed constexpr to const.

parent c0607b96
Pipeline #4823 passed with stages
in 16 minutes and 35 seconds
...@@ -281,7 +281,7 @@ sh2rh(int AnalysisData, double *sphum, double *rhum, double *t, int lev, int dim ...@@ -281,7 +281,7 @@ sh2rh(int AnalysisData, double *sphum, double *rhum, double *t, int lev, int dim
/* ***************************************************** */ /* ***************************************************** */
constexpr double RGAMW = (C_RCW - C_RCPV) / C_RV; constexpr double RGAMW = (C_RCW - C_RCPV) / C_RV;
constexpr double RBETW = C_RLVTT / C_RV + RGAMW * C_RTT; constexpr double RBETW = C_RLVTT / C_RV + RGAMW * C_RTT;
constexpr double RALPW = std::log(C_RESTT) + RBETW / C_RTT + RGAMW * std::log(C_RTT); const double RALPW = std::log(C_RESTT) + RBETW / C_RTT + RGAMW * std::log(C_RTT);
/* ***************************************************** */ /* ***************************************************** */
/* Define constants for calculation in presence of ice */ /* Define constants for calculation in presence of ice */
...@@ -300,7 +300,7 @@ sh2rh(int AnalysisData, double *sphum, double *rhum, double *t, int lev, int dim ...@@ -300,7 +300,7 @@ sh2rh(int AnalysisData, double *sphum, double *rhum, double *t, int lev, int dim
/***************************************************/ /***************************************************/
constexpr double RGAM = RGAMW; constexpr double RGAM = RGAMW;
constexpr double RBET = RBETW; constexpr double RBET = RBETW;
constexpr double RALP = RALPW; const double RALP = RALPW;
for (lp = 0; lp < lev; lp++) for (lp = 0; lp < lev; lp++)
{ {
for (i = 0; i < dimgpout; i++) for (i = 0; i < dimgpout; i++)
...@@ -334,7 +334,7 @@ rh2sh(double *sphum, double *rhum, double *t, int lev, int dimgpout, const doubl ...@@ -334,7 +334,7 @@ rh2sh(double *sphum, double *rhum, double *t, int lev, int dimgpout, const doubl
/* ***************************************************** */ /* ***************************************************** */
constexpr double RGAMW = (C_RCW - C_RCPV) / C_RV; constexpr double RGAMW = (C_RCW - C_RCPV) / C_RV;
constexpr double RBETW = C_RLVTT / C_RV + RGAMW * C_RTT; constexpr double RBETW = C_RLVTT / C_RV + RGAMW * C_RTT;
constexpr double RALPW = std::log(C_RESTT) + RBETW / C_RTT + RGAMW * std::log(C_RTT); const double RALPW = std::log(C_RESTT) + RBETW / C_RTT + RGAMW * std::log(C_RTT);
/* ***************************************************** */ /* ***************************************************** */
/* Define constants for calculation in presence of ice */ /* Define constants for calculation in presence of ice */
...@@ -351,7 +351,7 @@ rh2sh(double *sphum, double *rhum, double *t, int lev, int dimgpout, const doubl ...@@ -351,7 +351,7 @@ rh2sh(double *sphum, double *rhum, double *t, int lev, int dimgpout, const doubl
constexpr double RGAM = RGAMW; constexpr double RGAM = RGAMW;
constexpr double RBET = RBETW; constexpr double RBET = RBETW;
constexpr double RALP = RALPW; const double RALP = RALPW;
for (lp = 0; lp < lev; lp++) for (lp = 0; lp < lev; lp++)
{ {
for (i = 0; i < dimgpout; i++) for (i = 0; i < dimgpout; i++)
...@@ -961,7 +961,7 @@ Omega(double *omega_in, double *divergence, double *u_wind, double *v_wind, doub ...@@ -961,7 +961,7 @@ Omega(double *omega_in, double *divergence, double *u_wind, double *v_wind, doub
void void
MakeGeopotHeight(double *geop, double *gt, double *gq, double *ph, int nhor, int nlev) MakeGeopotHeight(double *geop, double *gt, double *gq, double *ph, int nhor, int nlev)
{ {
constexpr double z2log2 = 2.0 * std::log(2.0); const double z2log2 = 2.0 * std::log(2.0);
const double vtmp = (C_RV / PlanetRD) - 1.0; const double vtmp = (C_RV / PlanetRD) - 1.0;
const double zrg = 1.0 / PlanetGrav; const double zrg = 1.0 / PlanetGrav;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment