T_t :: (real ~ " K / s" field (x(grid), y(grid), z(half)) on
(i = 1 .. nlon by j = 1 .. nlat by k = 1 .. nlev)
)
Scalar Form
T_t := ( kappa * ( ( ( T
* (q * (1 / epsilon - 1) + 1)
* ( ( 1 / (h_x * h_y)
* (df(h_y * u_aux, x) + df(h_x * v_aux, y))
* ((( df(log(p), z ~ "1")
- ((1 - ( ( df(log(p), z ~ "1")
* shift(p, z, - 1 / 2)
)
/ df(p, z ~ "1")
) if
2 <= k and k <= nlev
) \\
0.693147180559945
)
) if
2 <= k and k <= nlev
) \\
- 0.693147180559945
)
)
+ ((( df(log(p), z ~ "1")
* (p_s_t + protect(int(( 1 / (h_x * h_y)
* ( df(h_y * u_aux, x)
+ df(h_x * v_aux, y)
)
), z ~ "1" = k + 1 .. nlev + 1), z))
) if
2 <= k and k <= nlev
) \\ 0.0)
)
)
+ ( 1 / (h_x * h_y)
* ( ave(( h_y
* u_aux
* ave(T * (q * (1 / epsilon - 1) + 1), x)
* df(ln_p, x)
), x)
+ ave(( h_x
* v_aux
* ave(T * (q * (1 / epsilon - 1) + 1), y)
* df(ln_p, y)
), y)
)
)
)
/ (df(p, z ~ "1") * (q * (delta - 1) + 1))
)
- ( ave(( df(T, z ~ "1")
* (eta_p if 2 <= k and k <= nlev \\ 0.0)
), z)
/ df(p, z ~ "1")
)
- ( 1 / (h_x * h_y)
* ( (ave(h_y * u_aux * df(T, x), x) + ave(h_x * v_aux * df(T, y), y))
/ df(p, z ~ "1")
)
)
)
Dimensioned
T_t := ( kappa * ( ( ( T
* (q * (1 / epsilon - 1 ~ "1") + 1 ~ "1")
* ( ( 1 / (h_x * h_y)
* (df(h_y * u_aux, x) + df(h_x * v_aux, y))
* ((( df(log(p), z ~ "1")
- ((( 1 ~ "1"
- ( ( df(log(p), z ~ "1")
* shift(p, z, - 1 / 2)
)
/ df(p, z ~ "1")
)
) if
2 ~ "1" <= k and k <= nlev
) \\
0.693147180559945 ~ "1"
)
) if
2 ~ "1" <= k and k <= nlev
) \\
- 0.693147180559945 ~ "1"
)
)
+ ((( df(log(p), z ~ "1")
* (p_s_t + protect(int(( 1 / (h_x * h_y)
* ( df(h_y * u_aux, x)
+ df(h_x * v_aux, y)
)
), z ~ "1" = k + 1 ~ "1" .. nlev + 1 ~
"1"), z))
) if
2 ~ "1" <= k and k <= nlev
) \\
0.0 ~ " kg s^-3 / m"
)
)
)
+ ( 1 / (h_x * h_y)
* ( ave(( h_y
* u_aux
* ave(T * ( q * (1 / epsilon - 1 ~ "1")
+ 1 ~ "1"
), x)
* df(ln_p, x)
), x)
+ ave(( h_x
* v_aux
* ave(T * ( q * (1 / epsilon - 1 ~ "1")
+ 1 ~ "1"
), y)
* df(ln_p, y)
), y)
)
)
)
/ (df(p, z ~ "1") * (q * (delta - 1 ~ "1") + 1 ~ "1"))
)
- ( ave(( df(T, z ~ "1")
* (eta_p if 2 ~ "1" <= k and k <= nlev \\
0.0 ~ " kg s^-3 / m"
)
), z)
/ df(p, z ~ "1")
)
- ( 1 / (h_x * h_y)
* ( (ave(h_y * u_aux * df(T, x), x) + ave(h_x * v_aux * df(T, y), y))
/ df(p, z ~ "1")
)
)
)
Discretized
T_t := ( ( ( T
* kappa
* ( 1 / (q * (delta - 1) + 1)
+ q * (1 / epsilon - 1) / (q * (delta - 1) + 1)
)
* ( ( 1 / (hxt * hyt)
* (df_h(hyu * u_aux, x) + df_h(hxv * v_aux, y))
* ((( df_g(log(p), z)
- ((1 - ( (df_g(log(p), z) * shift_g(p, z, - 1 / 2))
/ df_g(p, z)
) if
2 <= k and k <= nlev
) \\
0.693147180559945
)
) if
2 <= k and k <= nlev
) \\
- 0.693147180559945
)
)
+ ((( df_g(log(p), z)
* ( ave_g(p_s_t, z)
+ protect(( 1 / (hxt * hyt)
* ( df_h(hyu * mid_h(u_aux, z = k + 1 .. nlev + 1), x)
+ df_h(hxv * mid_h(v_aux, z = k + 1 .. nlev + 1), y)
)
), z)
)
) if
2 <= k and k <= nlev
) \\ 0.0)
)
)
+ ( 1 / (hxt * hyt)
* ( kappa * ( ( ave_h(( hyu
* u_aux
* ave_g(T * (1 - q), x)
* df_g(ln_p, x)
), x)
+ ave_h(( hxv
* v_aux
* ave_g(T * (1 - q), y)
* df_g(ln_p, y)
), y)
+ ( 1 / epsilon
* ( ave_h(( hyu
* u_aux
* ave_g(T * q, x)
* df_g(ln_p, x)
), x)
+ ave_h(( hxv
* v_aux
* ave_g(T * q, y)
* df_g(ln_p, y)
), y)
)
)
)
/ (q * (delta - 1) + 1)
)
- ave_h(hyu * u_aux * df_g(T, x), x)
- ave_h(hxv * v_aux * df_g(T, y), y)
)
)
)
- ave_g(df_h(T, z) * (eta_p if 2 <= k and k <= nlev \\ 0.0), z)
) / df_g(p, z)
CSE Eliminated
T_t := (( ( 1 / 2 * varidx(t_144, [i, j, 2])
+ ( ( ( ( 1.55424620615724E-8
* varidx(T, [i, j, k])
* ( 1 / (0.860825768434464 * varidx(q, [i, j, 1]) + 1)
+ ( 0.607824693422519
* ( varidx(q, [i, j, 1])
/ (0.860825768434464 * varidx(q, [i, j, 1]) + 1)
)
)
)
* ( ( rdlam
* ( ( varidx(hyu, [i, j])
* varidx(t_47, [i, j, 1])
* varidx(u, [i, j, 1])
)
- ( varidx(hyu, [i - 1, j])
* varidx(t_47, [i - 1, j, 1])
* varidx(u, [i - 1, j, 1])
)
)
)
+ rdth * ( ( varidx(hxv, [i, j])
* varidx(t_49, [i, j, 1])
* varidx(v, [i, j, 1])
)
- ( varidx(hxv, [i, j - 1])
* varidx(t_49, [i, j - 1, 1])
* varidx(v, [i, j - 1, 1])
)
)
)
)
+ ( 7.84806152880239E-8
* ( ( rdlam
* ( - varidx(t_116, [i, j, 1])
- varidx(t_116, [i + 1, j, 1])
)
)
+ ( rdth
* ( - varidx(t_120, [i, j, 1])
- varidx(t_120, [i, j + 1, 1])
)
)
)
)
)
- ( 0.285714285714286
* ( ( ( 3.92403076440119E-8
* ( ( rdlam
* ( - varidx(t_90, [i, j, 1])
- varidx(t_90, [i + 1, j, 1])
)
)
+ ( rdth
* ( - varidx(t_95, [i, j, 1])
- varidx(t_95, [i, j + 1, 1])
)
)
)
)
+ ( 6.30915356075388E-8
* ( ( rdlam
* ( - varidx(t_103, [i, j, 1])
- varidx(t_103, [i + 1, j, 1])
)
)
+ ( rdth
* ( - varidx(t_108, [i, j, 1])
- varidx(t_108, [i, j + 1, 1])
)
)
)
)
)
/ (0.860825768434464 * varidx(q, [i, j, 1]) + 1)
)
)
)
/ (varidx(hxt, [i, j]) * varidx(hyt, [i, j]))
)
)
/ (varidx(p, [i, j, k + 1]) - varidx(p, [i, j, k]))
) if k <= 1 \\
(( ( ( 0.285714285714286
* varidx(T, [i, j, k])
* ( ( 7.84806152880239E-8
* ( ( (varidx(t_18, [i, j, nlev]) + varidx(t_26, [i, j, nlev]))
* ( ( rdlam
* ( ( varidx(hyu, [i, j])
* varidx(t_47, [i, j, nlev])
* varidx(u, [i, j, nlev])
)
- ( varidx(hyu, [i - 1, j])
* varidx(t_47, [i - 1, j, nlev])
* varidx(u, [i - 1, j, nlev])
)
)
)
+ rdth * ( ( varidx(hxv, [i, j])
* varidx(t_49, [i, j, nlev])
* varidx(v, [i, j, nlev])
)
- ( varidx(hxv, [i, j - 1])
* varidx(t_49, [i, j - 1, nlev])
* varidx(v, [i, j - 1, nlev])
)
)
)
)
/ (varidx(hxt, [i, j]) * varidx(hyt, [i, j]))
)
)
- ( varidx(t_18, [i, j, nlev])
* (varidx(p_s_t, [i, j]) + varidx(t_70, [i, j, nlev + 1]))
)
)
* ( 1 / (0.860825768434464 * varidx(q, [i, j, nlev]) + 1)
+ ( 0.607824693422519
* ( varidx(q, [i, j, nlev])
/ (0.860825768434464 * varidx(q, [i, j, nlev]) + 1)
)
)
)
)
+ 1 / 2 * varidx(t_144, [i, j, nlev])
+ ( ( ( 7.84806152880239E-8
* ( ( rdlam
* ( - varidx(t_116, [i, j, nlev])
- varidx(t_116, [i + 1, j, nlev])
)
)
+ ( rdth
* ( - varidx(t_120, [i, j, nlev])
- varidx(t_120, [i, j + 1, nlev])
)
)
)
)
- ( 0.285714285714286
* ( ( ( 3.92403076440119E-8
* ( ( rdlam
* ( - varidx(t_90, [i, j, nlev])
- varidx(t_90, [i + 1, j, nlev])
)
)
+ ( rdth
* ( - varidx(t_95, [i, j, nlev])
- varidx(t_95, [i, j + 1, nlev])
)
)
)
)
+ ( 6.30915356075388E-8
* ( ( rdlam
* ( - varidx(t_103, [i, j, nlev])
- varidx(t_103, [i + 1, j, nlev])
)
)
+ ( rdth
* ( - varidx(t_108, [i, j, nlev])
- varidx(t_108, [i, j + 1, nlev])
)
)
)
)
)
/ (0.860825768434464 * varidx(q, [i, j, nlev]) + 1)
)
)
)
/ (varidx(hxt, [i, j]) * varidx(hyt, [i, j]))
)
)
/ (varidx(p, [i, j, k + 1]) - varidx(p, [i, j, k]))
) if
nlev <= k
) \\
( ( ( 0.285714285714286
* varidx(T, [i, j, k])
* ( ( 7.84806152880239E-8
* ( ( (varidx(t_18, [i, j, k]) + varidx(t_26, [i, j, k]))
* ( ( rdlam
* ( ( varidx(hyu, [i, j])
* varidx(t_47, [i, j, k])
* varidx(u, [i, j, k])
)
- ( varidx(hyu, [i - 1, j])
* varidx(t_47, [i - 1, j, k])
* varidx(u, [i - 1, j, k])
)
)
)
+ rdth * ( ( varidx(hxv, [i, j])
* varidx(t_49, [i, j, k])
* varidx(v, [i, j, k])
)
- ( varidx(hxv, [i, j - 1])
* varidx(t_49, [i, j - 1, k])
* varidx(v, [i, j - 1, k])
)
)
)
)
/ (varidx(hxt, [i, j]) * varidx(hyt, [i, j]))
)
)
- ( varidx(t_18, [i, j, k])
* (varidx(p_s_t, [i, j]) + varidx(t_70, [i, j, k + 1]))
)
)
* ( 1 / (0.860825768434464 * varidx(q, [i, j, k]) + 1)
+ ( 0.607824693422519
* ( varidx(q, [i, j, k])
/ (0.860825768434464 * varidx(q, [i, j, k]) + 1)
)
)
)
)
+ 1 / 2 * (varidx(t_144, [i, j, k]) + varidx(t_144, [i, j, k + 1]))
+ ( ( ( 7.84806152880239E-8
* ( ( rdlam
* (- varidx(t_116, [i, j, k]) - varidx(t_116, [i + 1, j, k]))
)
+ ( rdth
* (- varidx(t_120, [i, j, k]) - varidx(t_120, [i, j + 1, k]))
)
)
)
- ( 0.285714285714286
* ( ( ( 3.92403076440119E-8
* ( ( rdlam
* ( - varidx(t_90, [i, j, k])
- varidx(t_90, [i + 1, j, k])
)
)
+ ( rdth
* ( - varidx(t_95, [i, j, k])
- varidx(t_95, [i, j + 1, k])
)
)
)
)
+ ( 6.30915356075388E-8
* ( ( rdlam
* ( - varidx(t_103, [i, j, k])
- varidx(t_103, [i + 1, j, k])
)
)
+ ( rdth
* ( - varidx(t_108, [i, j, k])
- varidx(t_108, [i, j + 1, k])
)
)
)
)
)
/ (0.860825768434464 * varidx(q, [i, j, k]) + 1)
)
)
)
/ (varidx(hxt, [i, j]) * varidx(hyt, [i, j]))
)
)
/ (varidx(p, [i, j, k + 1]) - varidx(p, [i, j, k]))
)
)