subroutine reassure_fluxtop_boundary use modglobal, only : ltempeq, lmoist, nsv, & BCtopm, BCtopT, BCtopq, BCtops, & BCtopm_freeslip, BCtopm_pressure, & BCtopT_flux, BCtopq_flux, BCtops_flux use modfields, only : u0, v0, um, vm, thl0, thlm, qt0, qtm use modsubgriddata, only : ekh, ekm use modsurfdata, only : wttop, wqtop, wsvtop implicit none select case(BCtopm) case(BCtopm_freeslip) !free-slip = zero-flux call fluxtop(um, ekm, 0.0) call fluxtop(u0, ekm, 0.0) call fluxtop(vm, ekm, 0.0) call fluxtop(v0, ekm, 0.0) case(BCtopm_pressure) call fluxtop(um, ekm, 0.0) call fluxtop(u0, ekm, 0.0) call fluxtop(vm, ekm, 0.0) call fluxtop(v0, ekm, 0.0) case default end select if (ltempeq .and. (BCtopT .eq. BCtopT_flux)) then call fluxtop(thlm, ekh, wttop) call fluxtop(thl0, ekh, wttop) end if if (lmoist .and. (BCtopq .eq. BCtopq_flux)) then call fluxtop(qtm, ekh, wqtop) call fluxtop(qt0, ekh, wqtop) end if if (nsv > 0 .and. (BCtops .eq. BCtops_flux)) then call fluxtopscal(wsvtop) call fluxtopscal(wsvtop) end if end subroutine reassure_fluxtop_boundary