Skip to content

Commit df3aeb3

Browse files
committed
misc fixes
1 parent eb1cf85 commit df3aeb3

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

components/eam/src/dynamics/se/gravity_waves_sources.F90

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module gravity_waves_sources
22
use derivative_mod, only : derivative_t
3-
use dimensions_mod, only : np,nlev
3+
use dimensions_mod, only : np,nlev,nlevp
44
use edgetype_mod, only : EdgeBuffer_t
55
use element_mod, only : element_t
66
use hybrid_mod, only : hybrid_t
@@ -123,7 +123,7 @@ subroutine compute_frontogenesis( frontgf, frontga, tl, &
123123
use dyn_comp, only: hvcoord
124124
use spmd_utils, only: iam
125125
use parallel_mod, only: par
126-
use element_ops, only: get_temperature, get_hydro_pressure, get_phi
126+
use element_ops, only: get_temperature, get_hydro_pressure_i, get_phi
127127
use dyn_grid, only: fv_nphys
128128
use prim_driver_mod, only: deriv1
129129
use gllfvremap_mod, only: gfr_g2f_scalar, gfr_g2f_vector
@@ -141,9 +141,9 @@ subroutine compute_frontogenesis( frontgf, frontga, tl, &
141141
integer :: k,kptr,i,j,ie,component
142142
real(kind=real_kind) :: frontgf_gll(np,np,nlev,nets:nete)
143143
real(kind=real_kind) :: gradth_gll(np,np,2,nlev,nets:nete) ! grad(theta)
144-
real(kind=real_kind) :: zint(np,np,nlev) ! interface altitude
144+
real(kind=real_kind) :: zint(np,np,nlevp) ! interface altitude
145145
real(kind=real_kind) :: zmid(np,np,nlev) ! mid-point altitude
146-
real(kind=real_kind) :: pint(np,np,nlev) ! interface hydrostatic pressure
146+
real(kind=real_kind) :: pint(np,np,nlevp) ! interface hydrostatic pressure
147147
real(kind=real_kind) :: pmid(np,np,nlev) ! mid-point hydrostatic pressure
148148
real(kind=real_kind) :: temperature(np,np,nlev) ! Temperature
149149
real(kind=real_kind) :: C(np,np,2), wf1(nphys*nphys,nlev), wf2(nphys*nphys,nlev)
@@ -193,7 +193,7 @@ subroutine compute_frontogenesis( frontgf, frontga, tl, &
193193
if (use_fgf_pgrad_correction .or. use_fgf_zgrad_correction) then
194194

195195
! compute pressure at interfaces and mid-points
196-
call get_hydro_pressure_interface(pint,elem(ie)%state%dp3d(:,:,:,tl),hvcoord)
196+
call get_hydro_pressure_i(pint,elem(ie)%state%dp3d(:,:,:,tl),hvcoord)
197197

198198
call get_temperature(elem(ie),temperature,hvcoord,tl)
199199

@@ -343,8 +343,8 @@ subroutine compute_vertical_derivative(vert_int, data_mid, ddata_dvert)
343343
else
344344
data_above = ( data_mid(:,:,k-1) + data_mid(:,:,k) ) / 2.0 ! interpolate to interface k
345345
data_below = ( data_mid(:,:,k+1) + data_mid(:,:,k) ) / 2.0 ! interpolate to interface k+1
346-
vert_above = pint(:,:,k)
347-
vert_below = pint(:,:,k+1)
346+
vert_above = vert_int(:,:,k)
347+
vert_below = vert_int(:,:,k+1)
348348
end if
349349
ddata_dvert(:,:,k) = ( data_above - data_below ) / ( vert_above - vert_below )
350350
end do

components/homme/src/theta-l/share/element_ops.F90

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
! get_pottemp()
4444
! get_dpnh_dp()
4545
! get_hydro_pressure()
46-
! get_hydro_pressure_interface()
46+
! get_hydro_pressure_i()
4747
! get_nonhydro_pressure()
4848
! get_phi()
4949
! get_cp_star()
@@ -69,7 +69,7 @@ module element_ops
6969
type(elem_state_t), dimension(:), allocatable :: state0 ! storage for save_initial_state routine
7070

7171
public get_field, get_field_i, get_state, get_pottemp
72-
public get_temperature, get_phi, get_R_star, get_hydro_pressure, get_hydro_pressure_interface
72+
public get_temperature, get_phi, get_R_star, get_hydro_pressure, get_hydro_pressure_i
7373
public set_thermostate, set_state, set_state_i, set_elem_state
7474
public set_forcing_rayleigh_friction
7575
public initialize_reference_states, set_theta_ref
@@ -309,11 +309,11 @@ subroutine get_hydro_pressure(p,dp,hvcoord)
309309
end subroutine get_hydro_pressure
310310

311311
!_____________________________________________________________________
312-
subroutine get_hydro_pressure_interface(p_i,dp,hvcoord)
312+
subroutine get_hydro_pressure_i(p_i,dp,hvcoord)
313313
!
314314
implicit none
315315

316-
real (kind=real_kind), intent(out) :: p_i(np,np,nlev)
316+
real (kind=real_kind), intent(out) :: p_i(np,np,nlevp)
317317
real (kind=real_kind), intent(in) :: dp(np,np,nlev)
318318
type (hvcoord_t), intent(in) :: hvcoord ! hybrid vertical coordinate struct
319319

@@ -324,7 +324,7 @@ subroutine get_hydro_pressure_interface(p_i,dp,hvcoord)
324324
p_i(:,:,k+1)=p_i(:,:,k) + dp(:,:,k)
325325
enddo
326326

327-
end subroutine get_hydro_pressure_interface
327+
end subroutine get_hydro_pressure_i
328328

329329

330330
!_____________________________________________________________________

0 commit comments

Comments
 (0)