subroutine gradzfmt(nr, nri, ri, wcr, zfmt, ld, gzfmt)
integer, dimension(maxspecies) nrmti
real(8), dimension(:,:,:), allocatable wcrmt
integer, dimension(maxspecies) nrmt
real(8), dimension(:,:), pointer, contiguous vsmt
integer, dimension(maxspecies) npmt
real(8), dimension(:,:,:), allocatable rlmt