@@ -128,7 +128,12 @@ subroutine compute_frontogenesis( frontgf, frontga, tl, &
128128 use dyn_comp, only: hvcoord
129129 use spmd_utils, only: iam
130130 use parallel_mod, only: par
131- use element_ops, only: get_temperature, get_hydro_pressure_i, get_phi
131+ use element_ops, only: get_temperature, get_hydro_pressure_i
132+ #ifdef MODEL_THETA_L
133+ use element_ops, only: get_phi
134+ #else
135+ use element_ops, only: get_phi, get_phi_i
136+ #endif
132137 use dyn_grid, only: fv_nphys
133138 use prim_driver_mod, only: deriv1
134139 use gllfvremap_mod, only: gfr_g2f_scalar, gfr_g2f_vector
@@ -215,7 +220,12 @@ subroutine compute_frontogenesis( frontgf, frontga, tl, &
215220
216221 if (use_fgf_zgrad_correction) then
217222 ! compute geopotential
223+ #ifdef MODEL_THETA_L
218224 call get_phi(elem(ie), zmid, zint, hvcoord, tl)
225+ #else
226+ call get_phi(elem(ie), zmid, hvcoord, tl, - 1 )
227+ call get_phi_i(elem(ie), zint, hvcoord, tl, - 1 )
228+ #endif
219229 ! compute d(theta)/dz
220230 call compute_vertical_derivative(zint,theta,theta_dvert)
221231 end if
0 commit comments