      function vec_norm(nd,v) ! BB June 17 2008.
C Calculates Euclidean square root norm of vector v in nd dimension.
      include 'implicit.sta'
      include 'constants.par'
      dimension v(nd)
      vec_norm=zero
      do id=1,nd
        vec_norm=vec_norm+v(id)**2
      enddo
      vec_norm=sqrt(vec_norm)
      return
      end

