      subroutine fl2i(fp,fm,fln,qln,llstr,llens,lwvdef,lota)
c
      integer jcap_
      parameter(jcap_=62)
      integer jcap1_
      parameter(jcap1_=jcap_+1)
      integer lnt_
      parameter(lnt_=(jcap_+1)*(jcap_+2)/2)
      integer lnt2_
      parameter(lnt2_=(jcap_+1)*(jcap_+2))
      integer lnt22_
      parameter(lnt22_=(jcap_+1)*(jcap_+2)+1)
      integer jcapp_
      parameter(jcapp_=7)
      integer llnp_
      parameter(llnp_=204)
      integer lln2p_
      parameter(lln2p_=llnp_*2)
      integer lln22p_
      parameter(lln22p_=llnp_*2+1)
      parameter (len0p=jcapp_)                                                   
      parameter (len0m=jcapp_)                                                   
      parameter (lnt=lnt_)                                                      
      parameter (jcap=jcap_)                                                    
      dimension fp(2,0:len0p,lota), fm(2,0:len0m,lota),                         
     *          qln(lln2p_), fln(lln22p_,lota)
      dimension lwvdef(jcap1_)
c                                                                               
c     local scalars                                                             
c     -------------                                                             
c                                                                               
      integer n, l, k                                                           
c                                                                               
c     statement function                                                        
c     ------------------                                                        
c                                                                               
c     offset(n,l) is the offset in words                                        
c     to the (n,l)-element of a lower                                           
c     triangular matrix of complex numbers                                      
c     in an array containing the matrix                                         
c     packed in column-major order,                                             
c     where l and n range from 0 to jcap,                                       
c     inclusive                                                                 
c                                                                               
c          lower triangular matrix of complex numbers:                          
c                                                                               
c                     l -->                                                     
c                                                                               
c                   x                                                           
c               n   x x                                                         
c                   x x x                                                       
c               |   x x x x                                                     
c               v   x x x x x                                                   
c                   x x x x x x                                                 
c                                                                               
c          order of the matrix elements in memory:                              
c                                                                               
c          (0,0), (1,0), (2,0), ..., (jcap,0), (1,1), (2,1), (3,1), ...         
c                                                                               
      integer offset                                                            
      offset(n,l) = (jcap+1)*(jcap+2) - (jcap+1-l)*(jcap+2-l) + 2*(n-l)         
c                                                                               
c     ----------------------------------------------------------------          
c     compute the coefficients of the expansion in spherical harmonics          
c     of the field at each level                                                
c     ----------------------------------------------------------------          
c                                                                               
      lntx=0
      do 1000 lx=1,llens
        l=lwvdef(llstr+lx)
        lnt0=offset(l,l)-lntx
        lntx=lntx+offset(l+1,l+1)-offset(l,l)
        ll=lx-1
c
c                                                                               
c        compute the even (n-l) expansion coefficients for each level           
c        ------------------------------------------------------------           
c                                                                               
c        real part                                                              
c                                                                               
         do n = l, jcap, 2                                                      
            do k = 1, lota                                                      
               nl=offset(n,l)-lnt0
               fln(nl+1,k) = fln(nl+1,k)
     1                      + fp(1,ll,k)*qln(nl+1)
            end do                                                              
         end do                                                                 
c                                                                               
c        imaginary part                                                         
c                                                                               
         do n = l, jcap, 2                                                      
            do k = 1, lota                                                      
               nl=offset(n,l)-lnt0
               fln(nl+2,k) = fln(nl+2,k)
     1                      + fp(2,ll,k)*qln(nl+2)
            end do                                                              
         end do                                                                 
c                                                                               
c        compute the odd (n-l) expansion coefficients for each level            
c        -----------------------------------------------------------            
c                                                                               
c        real part                                                              
c                                                                               
           do n = l+1, jcap, 2                                                  
              do k = 1, lota                                                    
                nl=offset(n,l)-lnt0
                fln(nl+1,k) = fln(nl+1,k)
     1                      + fm(1,ll,k)*qln(nl+1)          
              end do                                                            
           end do                                                               
c                                                                               
c        imaginary part                                                         
c                                                                               
           do n = l+1, jcap, 2                                                  
              do k = 1, lota                                                    
                nl=offset(n,l)-lnt0
                fln(nl+2,k) = fln(nl+2,k)
     1                       + fm(2,ll,k)*qln(nl+2)
              end do                                                            
           end do                                                               
c                                                                               
c
 1000 continue
c                                                                               
      return                                                                    
      end                                                                       
