subroutine ibmnorm use modglobal, only : ih, jh, kh, ihc, jhc, khc, nsv, dzf, zh, kb, ke, kh, nsv, libm, ltempeq, lmoist, iadv_sv, iadv_cd2, iadv_thl use modfields, only : um, vm, wm, thlm, qtm, svm, up, vp, wp, thlp, qtp, svp, thl0, qt0, sv0, thl0av use modboundary, only : halos use decomp_2d, only : zstart, zend use modmpi, only : myid integer i, j, k, n, m if (.not. libm) return ! Set internal velocities to zero call solid(solid_info_u, um, up, 0., ih, jh, kh) call solid(solid_info_v, vm, vp, 0., ih, jh, kh) call solid(solid_info_w, wm, wp, 0., ih, jh, kh) ! Scalars ! Solid value does not matter when using second order scheme ! Set interior to a constant and boundary to average of fluid neighbours if (ltempeq) then call solid(solid_info_c, thlm, thlp, sum(thl0av(kb:ke)*dzf(kb:ke))/zh(ke+1), ih, jh, kh, mask_c) if (iadv_thl == iadv_cd2) call advecc2nd_corr_liberal(thl0, thlp) end if if (lmoist) then call solid(solid_info_c, qtm, qtp, 0., ih, jh, kh, mask_c) call advecc2nd_corr_liberal(qt0, qtp) end if do n=1,nsv call solid(solid_info_c, svm(:,:,:,n), svp(:,:,:,n), 0., ihc, jhc, khc, mask_c) if (iadv_sv(n) == iadv_cd2) call advecc2nd_corr_liberal(sv0(:,:,:,n), svp(:,:,:,n)) end do end subroutine ibmnorm