anchor.diff:    !
     logical :: partfunc_do = .true., filter = .false., histogram = .false., hitran_do = .false.,  histogramJ = .false., stick_hitran = .false.
     logical :: microns = .false.
  +  logical :: use_resolving_power = .true.  ! using resolving for creating the grid
     !
     contains
     !
  
positive.code:        do ipoint =  npoints,1,-1
           !
           write(tunit,'(2(1x,es16.8))') 10000.0_rk/freq(ipoint),intens(ipoint)
           !
         enddo
         !
  
negative.code:       !
      endif
      !
      if (proftype(1:3)/='BIN'.and.microns) then
        !
        write(out,"('Microns or um is currently only working with BIN, not ',a)") proftype(1:3)
        call report ("Illegal profile for Microns"//trim(w),.true.)
        !
      endif
      !
      if (use_resolving_power ) then 
        !
        npoints0 = nint(real((log(freqr)-log(freql))/resolving_f,rk))+1
        !
        if (npoints0>npoints) then
          write(out,"('For the resolving power of ',f15.1,' and range of',2f12.2,' npoints(max) must be > ',i18,'; please increase npoints = ',i15)") resolving_power,freql,freqr,npoints0
          write(out,"('Consider increasing npoints > ',i15)") npoints
          write(out,"('Npoints(max) = ln(nu2/nu1)/ln(1+1/R)+1')") 
          stop "Too small number of points for resolving_power and range given!"
        endif
        !
        npoints = npoints0
        !
        if (freql<small_) then 
          write(out,"('use_resolving_power cannot be used for range starting at zero',2f11.3)") freql,freqr
          stop "Illegal use_resolving_power with zero nu1"
        endif 
        !
      endif
      !
      !   half width for Doppler profiling
      if (proftype(1:3)=='VOI'.or.proftype(1:3)=='PSE'.or.proftype(1:3)=='LOR'.and.Nspecies>0) then
        !
  