subroutine getlvls(param,ithfld,ifld,found_fld,kpv,pv) ! ! 03_10_2015 Lin Gan - Using flat file data ! use xml_perl_data, only : param_t use ctlblk_mod, only : lsm, spl, nsoil, isf_surface_physics, & me, nfd, htfd, nbnd, petabnd use RQSTFLD_mod, only : lvls, lvlsxml, mxlvl, lvls, iget, ident, & iavblfld use soil, only : SLDPTH,SLLEVEL implicit none ! type(param_t),intent(in) :: param integer, intent(in) :: ithfld,kpv integer, intent(inout) :: ifld logical, intent(inout) :: found_fld real,intent(in) :: pv(1:kpv) ! real,parameter :: small=1.e-5 real,parameter :: small1=1.e-3 real,parameter :: small2=1 integer i,j,nlevel,scalef,lvlcape,lvlcin logical :: lincfld ! lincfld=.false. nlevel=size(param%level) ! if(trim(param%fixed_sfc1_type)=='isobaric_sfc') then do j=1, nlevel iloop: do i=1, lsm if(abs(param%level(j)-SPL(i))300.) then LVLS(i,ifld)=1 else LVLS(i,ifld)=2 endif LVLSXML(i,ifld)=j exit iloop4 endif enddo iloop4 enddo endif ! if(trim(param%fixed_sfc1_type)=='spec_pres_above_grnd') then do j=1, nlevel iloop5: do i=1, NBND if(nint(param%level(j)/100.)==nint(PETABND(i)+15.))then LVLS(i,ifld)=1 LVLSXML(i,ifld)=j exit iloop5 endif enddo iloop5 if(nint(param%level(j)/100.)==255) then LVLS(NBND+1,ifld)=1 LVLSXML(NBND+1,ifld)=j endif enddo endif ! if(trim(param%fixed_sfc1_type)=='spec_hgt_lvl_above_grnd') then do j=1, nlevel LVLS(j,ifld)=1 LVLSXML(j,ifld)=j enddo endif ! end