subroutine initsubgrid use modglobal, only : ih,ib,ie,jh,jb,je,kb,ke,kh,delta,zf,fkar, & pi,ifnamopt,fname_options use modmpi, only : myid implicit none integer :: i, k real :: ceps, ch real :: mlen call subgridnamelist allocate(ekm(ib-ih:ie+ih,jb-jh:je+jh,kb-kh:ke+kh)) allocate(ekh(ib-ih:ie+ih,jb-jh:je+jh,kb-kh:ke+kh)) allocate(zlt(ib-ih:ie+ih,jb-jh:je+jh,kb:ke+kh)) allocate(sbdiss(ib-ih:ie+ih,jb-jh:je+jh,kb:ke+kh)) allocate(sbshr(ib-ih:ie+ih,jb-jh:je+jh,kb:ke+kh)) allocate(sbbuo(ib-ih:ie+ih,jb-jh:je+jh,kb:ke+kh)) allocate(csz(ib-ih:ie+ih,kb:ke+kh)) allocate(damp(ib:ie,jb:je,kb:ke)) damp = 1. cm = cf / (2. * pi) * (1.5*alpha_kolm)**(-1.5) ch = prandtl ch2 = ch-ch1 ceps = 2. * pi / cf * (1.5*alpha_kolm)**(-1.5) ce1 = (cn**2)* (cm/Rigc - ch1*cm ) ce2 = ceps - ce1 if(cs == -1.) then csz(:,:) = (cm**3/ceps)**0.25 !< Smagorinsky constant else csz(:,:) = cs end if end subroutine initsubgrid