diff --git a/components/eam/src/physics/cam/od_common.F90 b/components/eam/src/physics/cam/od_common.F90 index 52658d2dbecb..be773ab70dc4 100644 --- a/components/eam/src/physics/cam/od_common.F90 +++ b/components/eam/src/physics/cam/od_common.F90 @@ -335,7 +335,7 @@ subroutine oro_drag_interface(state, cam_in, sgh, pbuf, dtime, nm, !get the layer index of pblh in layer for input in drag scheme pblh_idx = pbuf_get_index('pblh') call pbuf_get_field(pbuf, pblh_idx, pblh) - do i=1,pcols + do i=1,ncol kpbl2d_in(i)=pblh_get_level_idx(zbot(i,:)-(state%phis(i)/gravit),pblh(i)) kpbl2d_reverse_in(i)=pverp-kpbl2d_in(i)!pverp-k end do @@ -392,14 +392,16 @@ function pblh_get_level_idx(height_array,pblheight) pblh_get_level_idx = -1 found=.false. !get the pblh level index and return - do k = 1, pver - if((pblheight >= height_array(k+1).and.pblheight = height_array(k).and.pblheight