      SUBROUTINE rnl_XYZd(rln,drln,dxyz)
      implicit none
      real*8::XYZ(3),rln(3),drln(3),dxyz(3),RAD
      real*8::sinu,cosu,sinl,cosl,rr,dr,du,dl
!-----------------------------------------------------------------------
	RAD=datan(1.d0)/45.d0;rr=rln(3) !令rr=1
      sinu=dsin(rln(2)*RAD);cosu=dcos(rln(2)*RAD)
      sinl=dsin(rln(3)*RAD);cosl=dcos(rln(3)*RAD)
      dl=drln(1);du=drln(2);dr=drln(3)
      dxyz(1)=dr*cosu*cosl-du*sinu*cosl-dl*sinl
      dxyz(2)=dr*cosu*sinl-du*sinu*sinl+dl*cosl
      dxyz(3)=dr*sinu+du*cosu
      return
      end
